gpg: make homedir configurable
This commit is contained in:
parent
0a6227d667
commit
348b5a5a69
6 changed files with 95 additions and 9 deletions
|
|
@ -35,6 +35,13 @@ in
|
|||
<link xlink:href="https://gnupg.org/documentation/manpage.html"/>.
|
||||
'';
|
||||
};
|
||||
|
||||
homedir = mkOption {
|
||||
type = types.path;
|
||||
example = literalExample "${config.xdg.dataHome}/gnupg";
|
||||
default = "${config.home.homeDirectory}/.gnupg";
|
||||
description = "Directory to store keychains and configuration.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
@ -60,7 +67,10 @@ in
|
|||
};
|
||||
|
||||
home.packages = [ pkgs.gnupg ];
|
||||
home.sessionVariables = {
|
||||
GNUPGHOME = cfg.homedir;
|
||||
};
|
||||
|
||||
home.file.".gnupg/gpg.conf".text = cfgText;
|
||||
home.file."${cfg.homedir}/gpg.conf".text = cfgText;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue