summaryrefslogtreecommitdiff
path: root/users/gkleen@hel.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/gkleen@hel.nix')
-rw-r--r--users/gkleen@hel.nix14
1 files changed, 6 insertions, 8 deletions
diff --git a/users/gkleen@hel.nix b/users/gkleen@hel.nix
index fb65e343..fa4989e2 100644
--- a/users/gkleen@hel.nix
+++ b/users/gkleen@hel.nix
@@ -10,18 +10,16 @@
10 ''; 10 '';
11 }; 11 };
12 gnupg = pkgs.lib.overrideDerivation pkgs.gnupg (oldAttrs: { 12 gnupg = pkgs.lib.overrideDerivation pkgs.gnupg (oldAttrs: {
13 buildInputs = [ pkgs.makeWrapper ];
14 postBuild = ''
15 wrapProgram $out/bin/gpg \
16 --run "while ! systemctl --user show-environment | grep -qE '^DISPLAY='; do sleep 1; done" \
17 --run "systemctl --user import-environment DISPLAY"
18 '';
13 postInstall = '' 19 postInstall = ''
14 ln -s $out/bin/gpg2 $out/bin/gpg 20 ln -s $out/bin/gpg2 $out/bin/gpg
15 ''; 21 '';
16 }); 22 });
17 gnupg-script = with pkgs; writeScript "gnupg-script" ''
18 #!${stdenv.shell}
19
20 while ! systemctl --user show-environment | grep -qE '^DISPLAY='; do sleep 1; done
21
22 systemctl --user import-environment DISPLAY
23 exec ${gnupg}/bin/gpg2 --daemon
24 '';
25 } // (import ../utils/nix/default.nix) {}; 23 } // (import ../utils/nix/default.nix) {};
26 24
27 allowUnfree = true; 25 allowUnfree = true;