Skip to content

Commit

Permalink
Added "runtimedir" as an option
Browse files Browse the repository at this point in the history
  • Loading branch information
C4F3Z1N committed May 16, 2024
1 parent 1221758 commit f164a05
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/nixos/services/host-gpg-agent.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let
cfg = config.services.host-gpg-agent;
envVars = {
GNUPGHOME = cfg.homedir;
SSH_AUTH_SOCK = "/run/host-gpg-agent/S.gpg-agent.ssh";
SSH_AUTH_SOCK = "${cfg.runtimedir}/S.gpg-agent.ssh";
};
in {
options.services.host-gpg-agent = with types; {
Expand All @@ -23,6 +23,11 @@ in {
default = config.programs.gnupg.package;
};

runtimedir = mkOption {
type = path;
default = "/run/host-gpg-agent";
};

verbose = mkOption {
type = bool;
default = true;
Expand Down Expand Up @@ -68,7 +73,7 @@ in {
DirectoryMode = "0700";
ExecStartPre = "${pkgs.coreutils}/bin/rm -fv ${Symlinks}";
FileDescriptorName = "std";
ListenStream = "/run/host-gpg-agent/S.gpg-agent";
ListenStream = "${cfg.runtimedir}/S.gpg-agent";
SocketMode = "0600";
Symlinks = "${cfg.homedir}/${builtins.baseNameOf ListenStream}";
};
Expand Down

0 comments on commit f164a05

Please sign in to comment.