mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[General+Packages] Add pinentry dynamic switcher wrapper
Dynamically accomodate different desktops
This commit is contained in:
parent
50f523ad0b
commit
3fa8298db2
2 changed files with 49 additions and 0 deletions
13
general.nix
13
general.nix
|
|
@ -108,6 +108,19 @@ in
|
|||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
systemd.user.services.gpg-agent = let
|
||||
pinentrySwitcher = pkgs.callPackage ./packages/pinentry.nix {};
|
||||
cfg = config.programs.gnupg;
|
||||
in {
|
||||
restartTriggers = [ pinentrySwitcher ];
|
||||
restartIfChanged = true;
|
||||
|
||||
serviceConfig.ExecStart = [ "" ''
|
||||
${cfg.package}/bin/gpg-agent --supervised \
|
||||
--pinentry-program ${pinentrySwitcher}/bin/pinentry
|
||||
'' ];
|
||||
};
|
||||
|
||||
documentation.man.generateCaches = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue