feat: configure age plugins for SOPS in buildClan
This commit is contained in:
committed by
Michael Hoang
parent
e281b689df
commit
651b277bb9
@@ -108,6 +108,14 @@ in
|
||||
default = { };
|
||||
};
|
||||
|
||||
secrets = lib.mkOption {
|
||||
type = types.submodule { imports = [ ./secrets/interface.nix ]; };
|
||||
description = ''
|
||||
Secrets related options such as AGE plugins required to encrypt/decrypt secrets using the CLI.
|
||||
'';
|
||||
default = { };
|
||||
};
|
||||
|
||||
pkgsForSystem = lib.mkOption {
|
||||
type = types.functionTo (types.nullOr types.attrs);
|
||||
default = _system: null;
|
||||
@@ -165,6 +173,7 @@ in
|
||||
clanModules = lib.mkOption { type = lib.types.raw; };
|
||||
source = lib.mkOption { type = lib.types.raw; };
|
||||
meta = lib.mkOption { type = lib.types.raw; };
|
||||
secrets = lib.mkOption { type = lib.types.raw; };
|
||||
clanLib = lib.mkOption { type = lib.types.raw; };
|
||||
all-machines-json = lib.mkOption { type = lib.types.raw; };
|
||||
machines = lib.mkOption { type = lib.types.raw; };
|
||||
|
||||
@@ -219,6 +219,7 @@ in
|
||||
templates = config.templates;
|
||||
inventory = config.inventory;
|
||||
meta = config.inventory.meta;
|
||||
secrets = config.secrets;
|
||||
|
||||
source = "${clan-core}";
|
||||
|
||||
|
||||
18
lib/build-clan/secrets/interface.nix
Normal file
18
lib/build-clan/secrets/interface.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) types;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
age.plugins = lib.mkOption {
|
||||
type = types.listOf (types.strMatching "age-plugin-.*");
|
||||
default = [ ];
|
||||
description = ''
|
||||
A list of age plugins which must be available in the shell when encrypting and decrypting secrets.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user