diff options
| author | toufic ar <contact@toufy.me> | 2026-04-22 14:08:19 +0300 |
|---|---|---|
| committer | toufic ar <contact@toufy.me> | 2026-04-22 14:08:19 +0300 |
| commit | c7349e466fef7ecff5a46b1d0c819975a6bdcb8c (patch) | |
| tree | 2a3fc53016ae4d0b31d7583171bd4b8e60f4cc17 /common/options.nix | |
| download | servers-c7349e466fef7ecff5a46b1d0c819975a6bdcb8c.tar.gz servers-c7349e466fef7ecff5a46b1d0c819975a6bdcb8c.zip | |
initial commit
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"; + }; + }; + }; + }; + }; +} |
