mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-10 10:47:02 +00:00
Instead of having to manually stub packages that should not be downloaded we instead automatically stub all packages (except a small list of whitelisted ones). Tests can re-introduce the real package by using the `realPkgs` module argument.
19 lines
554 B
Nix
19 lines
554 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
lib.mkIf pkgs.stdenv.isLinux {
|
|
services.gpg-agent.enable = true;
|
|
services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
|
|
programs.gpg.enable = true;
|
|
|
|
nmt.script = ''
|
|
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
|
|
if [[ $in != "%t/gnupg/S.gpg-agent" ]]
|
|
then
|
|
echo $in
|
|
fail "gpg-agent socket directory not set to default value"
|
|
fi
|
|
|
|
configFile=home-files/.gnupg/gpg-agent.conf
|
|
assertFileRegex $configFile "pinentry-program @pinentry-gnome3@/bin/pinentry"
|
|
'';
|
|
}
|