summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/gkleen@hel.nix14
1 files changed, 8 insertions, 6 deletions
diff --git a/users/gkleen@hel.nix b/users/gkleen@hel.nix
index fa4989e2..fb65e343 100644
--- a/users/gkleen@hel.nix
+++ b/users/gkleen@hel.nix
@@ -10,16 +10,18 @@
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 '';
19 postInstall = '' 13 postInstall = ''
20 ln -s $out/bin/gpg2 $out/bin/gpg 14 ln -s $out/bin/gpg2 $out/bin/gpg
21 ''; 15 '';
22 }); 16 });
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 '';
23 } // (import ../utils/nix/default.nix) {}; 25 } // (import ../utils/nix/default.nix) {};
24 26
25 allowUnfree = true; 27 allowUnfree = true;