fork/home-manager
git clone https://git.julia.blue/fork/home-manager
5ffb0f1f
master
1{ config , lib , pkgs , ...} : 2 3{ 4programs . gpg = { 5enable = true ; 6 7publicKeys = [ 8{ 9source = builtins . toFile "key1" "key1" ; 10trust = 1 ; 11} 12{ source = builtins . toFile "key2" "key2" ; } 13]; 14}; 15 16test . stubs . gnupg = { }; 17test . stubs . systemd = { }; # depends on gnupg.override 18 19nmt . script = '' 20assertFileContains activate "export GNUPGHOME='/home/hm-user/.gnupg'" 21 22assertFileContains activate "unset GNUPGHOME QUIET_ARG keyId importTrust" 23 24assertFileRegex activate \ 25'^\$DRY_RUN_CMD @gnupg@/bin/gpg \$QUIET_ARG --import /nix/store/[0-9a-z]*-key1$' 26assertFileRegex activate \ 27'^\$DRY_RUN_CMD importTrust "/nix/store/[0-9a-z]*-key1" 1$' 28assertFileRegex activate \ 29'^\$DRY_RUN_CMD @gnupg@/bin/gpg \$QUIET_ARG --import /nix/store/[0-9a-z]*-key2$' 30'' ; 31}