feat: refactoring + system types

This commit is contained in:
Kat Inskip 2022-10-02 12:34:00 -07:00
parent a0f9d0ab48
commit 9794026f6c
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
36 changed files with 653 additions and 537 deletions

View file

@ -0,0 +1,32 @@
{ config, lib, ... }: with lib; let
secretType = types.submodule ({ name, ... }: {
options = {
path = mkOption { type = types.str; };
field = mkOption {
type = types.str;
default = "";
};
};
});
repoSecretType = types.submodule ({ name, ... }: {
options = {
source = mkOption {
type = types.path;
};
text = mkOption {
type = types.str;
};
};
});
in {
options.secrets = {
variables = mkOption {
type = types.attrsOf secretType;
default = { };
};
repo = mkOption {
type = types.attrsOf repoSecretType;
default = { };
};
};
}