diff options
Diffstat (limited to 'common/options.nix')
| -rw-r--r-- | common/options.nix | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/common/options.nix b/common/options.nix new file mode 100644 index 0000000..e193dd1 --- /dev/null +++ b/common/options.nix @@ -0,0 +1,78 @@ +{ + lib, + config, + ... +}: let + cfg = config.customOps; +in { + options = with lib; { + customOps = mkOption { + description = "custom options"; + type = types.submodule { + options = { + owner = mkOption { + type = types.submodule { + options = { + username = mkOption { + type = types.str; + default = null; + }; + pubkey = mkOption { + type = types.str; + default = null; + }; + }; + }; + description = "machine owner"; + }; + domain = mkOption { + type = types.submodule { + options = { + name = mkOption { + type = types.str; + default = null; + }; + tld = mkOption { + type = types.str; + default = null; + }; + fqdn = mkOption { + type = types.str; + default = "${cfg.domain.name}.${cfg.domain.tld}"; + }; + }; + }; + description = "machine domain name"; + }; + mailAccounts = mkOption { + type = types.attrsOf (types.submodule { + options = { + passwdFile = mkOption { + type = types.str; + default = null; + }; + aliases = mkOption { + type = types.listOf types.str; + default = []; + }; + aliasesRegex = mkOption { + type = types.listOf types.str; + default = []; + }; + catchAll = mkOption { + type = types.listOf types.str; + default = []; + }; + sendOnly = mkOption { + type = types.bool; + default = false; + }; + }; + }); + description = "accounts for the mail server"; + }; + }; + }; + }; + }; +} |
