mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-10 04:49:19 -08:00
Rework of the personal profile. Whittled down trusted.
This commit is contained in:
parent
cee19f8d3b
commit
a55342d0a4
16 changed files with 338 additions and 45 deletions
|
|
@ -1,15 +1,33 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, lib, nixos, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
||||
let
|
||||
secretType = types.submodule ({ name, ... }: {
|
||||
options = {
|
||||
source = mkOption {
|
||||
type = types.path;
|
||||
};
|
||||
text = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
});
|
||||
in
|
||||
{
|
||||
options.kw = {
|
||||
secrets = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
};
|
||||
repoSecrets = mkOption {
|
||||
type = types.nullOr (types.attrsOf secretType);
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
config = mkIf (config.kw.secrets != null) {
|
||||
deploy.tf.variables = genAttrs config.kw.secrets (n: { externalSecret = true; });
|
||||
kw.repoSecrets = nixos.kw.repoSecrets;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,28 @@
|
|||
|
||||
with lib;
|
||||
|
||||
let
|
||||
secretType = types.submodule ({ name, ... }: {
|
||||
options = {
|
||||
source = mkOption {
|
||||
type = types.path;
|
||||
};
|
||||
text = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
});
|
||||
in
|
||||
{
|
||||
options.kw = {
|
||||
secrets = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
};
|
||||
repoSecrets = mkOption {
|
||||
type = types.nullOr (types.attrsOf secretType);
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
config = mkIf (config.kw.secrets != null) {
|
||||
deploy.tf.variables = genAttrs config.kw.secrets (n: { externalSecret = true; });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue