summaryrefslogtreecommitdiff
path: root/users/gkleen@hel.nix
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2016-09-23 15:41:05 +0200
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2016-09-23 15:41:05 +0200
commita17c9c5dcb9c958683ab571ec1261ce459217569 (patch)
tree86f46afc8488ca30fd9583cd28e184d636ab4f98 /users/gkleen@hel.nix
parent8d62b019f19ca07f416f2aed368c6d4a94ec5a6f (diff)
downloadnixos-a17c9c5dcb9c958683ab571ec1261ce459217569.tar
nixos-a17c9c5dcb9c958683ab571ec1261ce459217569.tar.gz
nixos-a17c9c5dcb9c958683ab571ec1261ce459217569.tar.bz2
nixos-a17c9c5dcb9c958683ab571ec1261ce459217569.tar.xz
nixos-a17c9c5dcb9c958683ab571ec1261ce459217569.zip
move scripting to own derivation
Diffstat (limited to 'users/gkleen@hel.nix')
-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;