{ config, lib, pkgs, ... }: with lib; let siteOpts = { site, ... }: { options = { site = mkOption { type = types.str; description = "Site name."; default = site; }; network = mkOption { type = types.str; description = "Network to be treated as local."; }; dynamic-network = mkOption { type = with types; nullOr str; description = "Network to be allocated by DHCP."; default = null; }; gateway-v4 = mkOption { type = with types; nullOr str; description = "Gateway to use for public ipv4 internet access."; default = null; }; gateway-v6 = mkOption { type = with types; nullOr str; description = "Gateway to use for public ipv6 internet access."; default = null; }; gateway-host = mkOption { type = with types; nullOr str; description = "Identity of the host to act as a gateway."; default = null; }; local-groups = mkOption { type = with types; listOf str; description = "List of groups which should exist at this site."; default = [ ]; }; local-users = mkOption { type = with types; listOf str; description = "List of users which should exist on all hosts at this site."; default = [ ]; }; local-admins = mkOption { type = with types; listOf str; description = "List of admin users which should exist on all hosts at this site."; default = [ ]; }; enable-monitoring = mkEnableOption "Enable site-wide monitoring with prometheus."; nameservers = mkOption { type = with types; listOf str; description = "List of nameservers to be used by hosts at this site."; default = [ ]; }; timezone = mkOption { type = types.str; description = "Timezone of the site."; example = "America/Winnipeg"; }; }; }; in { options.fudo.sites = mkOption { type = with types; attrsOf (submodule siteOpts); description = "Site configurations for all sites known to the system."; default = { }; }; }