{ config, lib, ... }: with lib; { options.constants = { domain = mkOption { type = types.str; default = "invariantspace.com"; description = '' The domain for all devices. ''; }; homeDir = mkOption { type = types.str; default = "/home/${config.constants.userName}"; description = '' The home directory for the default user. ''; }; wildcard = mkOption { type = types.str; default = "0.0.0.0"; description = '' The localhost address. ''; }; localhost = mkOption { type = types.str; default = "127.0.0.1"; description = '' The localhost address. ''; }; port = mkOption { type = types.attrsOf types.port; default = { conduit = 29800; forgejo = 47674; headscale = 27327; http = 80; https = 443; jellyfin = 8096; vault-rkt = 25487; vault-ws = 40513; }; description = '' The mapping from service to ports. ''; }; postMaster = mkOption { type = types.str; default = "trivial@${config.constants.domain}"; description = '' The post master email address. ''; }; publicKeys = mkOption { type = types.listOf types.str; default = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHPT/zRq5fffcUmjxcwG2cTr09fOa9O4rBUb6ob2CyNy macronova@blitzar" ]; description = '' The public keys for SSH authentication. ''; }; privateKeyFiles = mkOption { type = types.listOf types.str; default = if config.services.openssh.enable then builtins.map (key: key.path) config.services.openssh.hostKeys else [ "/root/.ssh/${config.networking.hostName}" ]; description = '' The private key files for sops. ''; }; sopsFile = mkOption { type = types.path; default = ./secrets.yaml; description = '' The secrets file for device. ''; }; userName = mkOption { type = types.str; default = "macronova"; description = '' The username across all devices. ''; }; }; }