feat: standardise acme to using `services.skynet."${name}";` format

This commit is contained in:
silver 2024-05-30 13:34:59 +01:00
parent 023b491d89
commit 449ada5cec
Signed by: silver
GPG key ID: 54E2C71918E93B74
15 changed files with 24 additions and 24 deletions

View file

@ -5,12 +5,12 @@
... ...
}: }:
with lib; let with lib; let
cfg = config.skynet_acme; name = "acme";
cfg = config.services.skynet."${name}";
in { in {
imports = []; imports = [];
options = { options.services.skynet."${name}" = {
skynet_acme = {
domains = lib.mkOption { domains = lib.mkOption {
default = []; default = [];
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
@ -19,7 +19,7 @@ in {
''; '';
}; };
}; };
};
config = { config = {
# group that will own the certificates # group that will own the certificates
users.groups.acme = {}; users.groups.acme = {};

View file

@ -35,7 +35,7 @@ in {
#backups = [ "/etc/silver_ul_ical/database.db" ]; #backups = [ "/etc/silver_ul_ical/database.db" ];
# Website config # Website config
skynet_acme.domains = [ services.skynet.acme.domains = [
domain domain
]; ];

View file

@ -55,7 +55,7 @@ in {
} }
]; ];
skynet_acme.domains = [ services.skynet.acme.domains = [
"${cfg.domain.sub}.skynet.ie" "${cfg.domain.sub}.skynet.ie"
]; ];

View file

@ -57,7 +57,7 @@ in {
"ip daddr ${cfg.host.ip} tcp dport 25565 counter packets 0 bytes 0 accept" "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}"
"*.${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}" "*.${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}"
]; ];

View file

@ -99,7 +99,7 @@ in {
group = cfg.user; group = cfg.user;
}; };
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}"
# Lets Encrypt seems to have a 4 levels limit for certs # Lets Encrypt seems to have a 4 levels limit for certs
"*.pages.${cfg.domain.base}.${cfg.domain.tld}" "*.pages.${cfg.domain.base}.${cfg.domain.tld}"

View file

@ -45,7 +45,7 @@ in {
} }
]; ];
skynet_acme.domains = [ services.skynet.acme.domains = [
"${name}.skynet.ie" "${name}.skynet.ie"
]; ];

View file

@ -56,7 +56,7 @@ in {
age.secrets.ldap_mail.file = ../../secrets/email/details.age; age.secrets.ldap_mail.file = ../../secrets/email/details.age;
age.secrets.ldap_wolves.file = ../../secrets/wolves/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}" "${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}"
]; ];

View file

@ -79,7 +79,7 @@ in {
group = "openldap"; group = "openldap";
}; };
skynet_acme.domains = [ services.skynet.acme.domains = [
domain domain
]; ];

View file

@ -54,7 +54,7 @@ in {
group = "nextcloud"; group = "nextcloud";
}; };
skynet_acme.domains = [ services.skynet.acme.domains = [
domain domain
"onlyoffice.${domain}" "onlyoffice.${domain}"
]; ];

View file

@ -40,7 +40,7 @@ in {
}; };
config = { config = {
skynet_acme.domains = [ services.skynet.acme.domains = [
"${name}.skynet.ie" "${name}.skynet.ie"
]; ];

View file

@ -29,7 +29,7 @@ in {
}; };
config = { config = {
skynet_acme.domains = [ services.skynet.acme.domains = [
"${name}.skynet.ie" "${name}.skynet.ie"
]; ];

View file

@ -31,7 +31,7 @@ in {
}; };
config = { config = {
skynet_acme.domains = [ services.skynet.acme.domains = [
"${name}.skynet.ie" "${name}.skynet.ie"
]; ];

View file

@ -25,7 +25,7 @@ in {
}; };
config = { config = {
skynet_acme.domains = [ services.skynet.acme.domains = [
# the root one is already covered by teh certificate # the root one is already covered by teh certificate
"2016.skynet.ie" "2016.skynet.ie"
"discord.skynet.ie" "discord.skynet.ie"

View file

@ -38,7 +38,7 @@ in {
}; };
# Website config # Website config
skynet_acme.domains = [ services.skynet.acme.domains = [
"users.skynet.ie" "users.skynet.ie"
"*.users.skynet.ie" "*.users.skynet.ie"
]; ];

View file

@ -53,7 +53,7 @@ in {
8000 8000
]; ];
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}"
]; ];