Personal Nix setup

Fix agenix/gpg init on darwin

Changed files
+2 -13
home
base
lib
+1 -10
home/base/gpg.nix
···
services.gpg-agent = {
enable = true;
-
# See: https://github.com/nix-community/home-manager/pull/5901
-
enableSshSupport = !helpers.isDarwin;
+
enableSshSupport = true;
verbose = true;
sshKeys = [
"E2BFF19637FDC25A02F45583176FAD1ED1F6BDD6"
···
};
systemd.user.services.gpg-agent.Service.Slice = "session.slice";
-
-
# See: https://github.com/nix-community/home-manager/pull/5901
-
programs.zsh.initContent = let
-
gpgPkg = config.programs.gpg.package;
-
in optionalString helpers.isDarwin ''
-
${gpgPkg}/bin/gpg-connect-agent --quiet updatestartuptty /bye > /dev/null 2>&1
-
export SSH_AUTH_SOCK=$(${gpgPkg}/bin/gpgconf --list-dirs agent-ssh-socket)
-
'';
modules.git.signingKey = mkDefault "303B6A9A312AA035";
+1 -3
lib/system.nix
···
lib = (import nixpkgs { inherit overlays system; }).lib;
age = {
-
identityPaths = let
-
identityPath = if isDarwin then "/usr/local/persistent/agenix" else "/var/lib/persistent/agenix";
-
in [ identityPath ];
+
identityPaths = [ "/usr/local/persistent/agenix" "/var/lib/persistent/agenix" ];
};
systemModules = modules ++ [