diff --git a/applications/acme.nix b/applications/acme.nix index b4761f7..e4aec7a 100644 --- a/applications/acme.nix +++ b/applications/acme.nix @@ -5,21 +5,21 @@ ... }: with lib; let - cfg = config.skynet_acme; + name = "acme"; + cfg = config.services.skynet."${name}"; in { imports = []; - options = { - skynet_acme = { - domains = lib.mkOption { - default = []; - type = lib.types.listOf lib.types.str; - description = '' - A list of domains to use for this server. - ''; - }; + options.services.skynet."${name}" = { + domains = lib.mkOption { + default = []; + type = lib.types.listOf lib.types.str; + description = '' + A list of domains to use for this server. + ''; }; }; + config = { # group that will own the certificates users.groups.acme = {}; diff --git a/applications/bitwarden/vaultwarden.nix b/applications/bitwarden/vaultwarden.nix index 1ae912c..c4ab5a2 100644 --- a/applications/bitwarden/vaultwarden.nix +++ b/applications/bitwarden/vaultwarden.nix @@ -35,7 +35,7 @@ in { #backups = [ "/etc/silver_ul_ical/database.db" ]; # Website config - skynet_acme.domains = [ + services.skynet.acme.domains = [ domain ]; diff --git a/applications/games.nix b/applications/games.nix index f112ed1..7ab1511 100644 --- a/applications/games.nix +++ b/applications/games.nix @@ -55,7 +55,7 @@ in { } ]; - skynet_acme.domains = [ + services.skynet.acme.domains = [ "${cfg.domain.sub}.skynet.ie" ]; diff --git a/applications/games/minecraft.nix b/applications/games/minecraft.nix index 3f64108..9768b64 100644 --- a/applications/games/minecraft.nix +++ b/applications/games/minecraft.nix @@ -57,7 +57,7 @@ in { "ip daddr ${cfg.host.ip} tcp dport 25565 counter packets 0 bytes 0 accept" ]; - skynet_acme.domains = [ + services.skynet.acme.domains = [ "${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}" "*.${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}" ]; diff --git a/applications/gitlab.nix b/applications/gitlab.nix index fc15cd0..355d4cf 100644 --- a/applications/gitlab.nix +++ b/applications/gitlab.nix @@ -99,7 +99,7 @@ in { group = cfg.user; }; - skynet_acme.domains = [ + services.skynet.acme.domains = [ "${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}" # Lets Encrypt seems to have a 4 levels limit for certs "*.pages.${cfg.domain.base}.${cfg.domain.tld}" diff --git a/applications/grafana.nix b/applications/grafana.nix index 11efcfe..a7f4e00 100644 --- a/applications/grafana.nix +++ b/applications/grafana.nix @@ -45,7 +45,7 @@ in { } ]; - skynet_acme.domains = [ + services.skynet.acme.domains = [ "${name}.skynet.ie" ]; diff --git a/applications/ldap/backend.nix b/applications/ldap/backend.nix index c5630f4..d94a61a 100644 --- a/applications/ldap/backend.nix +++ b/applications/ldap/backend.nix @@ -56,7 +56,7 @@ in { age.secrets.ldap_mail.file = ../../secrets/email/details.age; age.secrets.ldap_wolves.file = ../../secrets/wolves/details.age; - skynet_acme.domains = [ + services.skynet.acme.domains = [ "${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}" ]; diff --git a/applications/ldap/server.nix b/applications/ldap/server.nix index d531cae..e54c7e5 100644 --- a/applications/ldap/server.nix +++ b/applications/ldap/server.nix @@ -79,7 +79,7 @@ in { group = "openldap"; }; - skynet_acme.domains = [ + services.skynet.acme.domains = [ domain ]; diff --git a/applications/nextcloud.nix b/applications/nextcloud.nix index 5ed9c9e..ae23a05 100644 --- a/applications/nextcloud.nix +++ b/applications/nextcloud.nix @@ -54,7 +54,7 @@ in { group = "nextcloud"; }; - skynet_acme.domains = [ + services.skynet.acme.domains = [ domain "onlyoffice.${domain}" ]; diff --git a/applications/nix_cache/nix_cache.nix b/applications/nix_cache/nix_cache.nix index fd6ae5f..3f4802d 100644 --- a/applications/nix_cache/nix_cache.nix +++ b/applications/nix_cache/nix_cache.nix @@ -40,7 +40,7 @@ in { }; config = { - skynet_acme.domains = [ + services.skynet.acme.domains = [ "${name}.skynet.ie" ]; diff --git a/applications/open_governance/keyserver.nix b/applications/open_governance/keyserver.nix index e86c314..56c9441 100644 --- a/applications/open_governance/keyserver.nix +++ b/applications/open_governance/keyserver.nix @@ -29,7 +29,7 @@ in { }; config = { - skynet_acme.domains = [ + services.skynet.acme.domains = [ "${name}.skynet.ie" ]; diff --git a/applications/open_governance/open_governance.nix b/applications/open_governance/open_governance.nix index dab1a8d..c855f30 100644 --- a/applications/open_governance/open_governance.nix +++ b/applications/open_governance/open_governance.nix @@ -31,7 +31,7 @@ in { }; config = { - skynet_acme.domains = [ + services.skynet.acme.domains = [ "${name}.skynet.ie" ]; diff --git a/applications/skynet.ie.nix b/applications/skynet.ie.nix index 6e7c542..63eae7a 100644 --- a/applications/skynet.ie.nix +++ b/applications/skynet.ie.nix @@ -25,7 +25,7 @@ in { }; config = { - skynet_acme.domains = [ + services.skynet.acme.domains = [ # the root one is already covered by teh certificate "2016.skynet.ie" "discord.skynet.ie" diff --git a/applications/skynet_users.nix b/applications/skynet_users.nix index 1b37c36..8e0b98f 100644 --- a/applications/skynet_users.nix +++ b/applications/skynet_users.nix @@ -38,7 +38,7 @@ in { }; # Website config - skynet_acme.domains = [ + services.skynet.acme.domains = [ "users.skynet.ie" "*.users.skynet.ie" ]; diff --git a/applications/ulfm.nix b/applications/ulfm.nix index 18e0ddd..d3073a4 100644 --- a/applications/ulfm.nix +++ b/applications/ulfm.nix @@ -53,7 +53,7 @@ in { 8000 ]; - skynet_acme.domains = [ + services.skynet.acme.domains = [ "${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}" ];