blob: f9bdf14461b52d85d976752579b37552d95b6670 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# gopass - Standard Unix password manager (Go implementation)
{
config,
lib,
pkgs,
...
}:
{
options.security.gopass = {
enable = lib.mkEnableOption "Enables gopass.";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.gopass.override { passAlias = true; };
defaultText = lib.literalExpression "pkgs.gopass.override { passAlias = true; }";
description = "The gopass package to use.";
};
ssh-agent.enable = lib.mkEnableOption "gopass-backed SSH keys for git";
};
config = lib.mkIf config.security.gopass.enable {
programs.password-store = {
enable = true;
package = config.security.gopass.package;
settings = {
PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.local/share/pass";
};
};
home.sessionVariables = {
PASSWORD_STORE_DIR = config.programs.password-store.settings.PASSWORD_STORE_DIR;
};
};
}
|