mirror of
https://github.com/Mic92/sops-nix.git
synced 2026-07-17 06:25:16 +08:00
feat: add age plugin and fido2 hmac support
Co-authored-by: brianmcgee <brian@41north.dev>
This commit is contained in:
parent
d7593b87b0
commit
899e202643
4 changed files with 31 additions and 0 deletions
|
|
@ -249,6 +249,14 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugins = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.package;
|
||||||
|
default = [ ];
|
||||||
|
description = ''
|
||||||
|
List of plugins to use for sops decryption.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
generateKey = lib.mkOption {
|
generateKey = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
|
@ -357,6 +365,8 @@ in
|
||||||
))
|
))
|
||||||
];
|
];
|
||||||
|
|
||||||
|
PATH = lib.makeBinPath cfg.age.plugins;
|
||||||
|
|
||||||
QUBES_GPG_DOMAIN = lib.mkIf cfg.gnupg.qubes-split-gpg.enable (
|
QUBES_GPG_DOMAIN = lib.mkIf cfg.gnupg.qubes-split-gpg.enable (
|
||||||
lib.mkDefault cfg.gnupg.qubes-split-gpg.domain
|
lib.mkDefault cfg.gnupg.qubes-split-gpg.domain
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -308,6 +308,14 @@ in
|
||||||
Paths to ssh keys added as age keys during sops description.
|
Paths to ssh keys added as age keys during sops description.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugins = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.package;
|
||||||
|
default = [ ];
|
||||||
|
description = ''
|
||||||
|
List of plugins to use for sops decryption.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gnupg = {
|
gnupg = {
|
||||||
|
|
@ -395,6 +403,7 @@ in
|
||||||
sops.environment.SOPS_GPG_EXEC = lib.mkIf (cfg.gnupg.home != null || cfg.gnupg.sshKeyPaths != [ ]) (
|
sops.environment.SOPS_GPG_EXEC = lib.mkIf (cfg.gnupg.home != null || cfg.gnupg.sshKeyPaths != [ ]) (
|
||||||
lib.mkDefault "${cfg.gnupg.package}/bin/gpg"
|
lib.mkDefault "${cfg.gnupg.package}/bin/gpg"
|
||||||
);
|
);
|
||||||
|
sops.environment.PATH = lib.mkIf (cfg.age.plugins != [ ]) (lib.makeBinPath cfg.age.plugins);
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ let
|
||||||
# [1] https://github.com/getsops/sops/pull/1692
|
# [1] https://github.com/getsops/sops/pull/1692
|
||||||
cfg = lib.recursiveUpdate cfg {
|
cfg = lib.recursiveUpdate cfg {
|
||||||
environment.HOME = "/var/empty";
|
environment.HOME = "/var/empty";
|
||||||
|
environment.PATH = lib.makeBinPath cfg.age.plugins;
|
||||||
};
|
};
|
||||||
inherit lib;
|
inherit lib;
|
||||||
};
|
};
|
||||||
|
|
@ -342,6 +343,14 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugins = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.package;
|
||||||
|
default = [ ];
|
||||||
|
description = ''
|
||||||
|
List of plugins to use for sops decryption.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
generateKey = lib.mkOption {
|
generateKey = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
|
@ -463,6 +472,7 @@ in
|
||||||
before = [ "sysinit-reactivation.target" ];
|
before = [ "sysinit-reactivation.target" ];
|
||||||
environment = cfg.environment;
|
environment = cfg.environment;
|
||||||
unitConfig.DefaultDependencies = "no";
|
unitConfig.DefaultDependencies = "no";
|
||||||
|
path = cfg.age.plugins;
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ let
|
||||||
# See also the default NixOS module.
|
# See also the default NixOS module.
|
||||||
cfg = lib.recursiveUpdate cfg {
|
cfg = lib.recursiveUpdate cfg {
|
||||||
environment.HOME = "/var/empty";
|
environment.HOME = "/var/empty";
|
||||||
|
environment.PATH = lib.makeBinPath cfg.age.plugins;
|
||||||
};
|
};
|
||||||
inherit lib;
|
inherit lib;
|
||||||
};
|
};
|
||||||
|
|
@ -36,6 +37,7 @@ in
|
||||||
before = [ "systemd-sysusers.service" ];
|
before = [ "systemd-sysusers.service" ];
|
||||||
environment = cfg.environment;
|
environment = cfg.environment;
|
||||||
unitConfig.DefaultDependencies = "no";
|
unitConfig.DefaultDependencies = "no";
|
||||||
|
path = cfg.age.plugins;
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue