mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 16:08:30 +02:00
falkenstein: switch to caddy
This commit is contained in:
parent
7811c95ecf
commit
c96d8b7103
13 changed files with 76 additions and 121 deletions
|
@ -36,9 +36,7 @@ let
|
|||
subdomains =
|
||||
let
|
||||
getVirtualHosts = hostname: map (name: builtins.substring 0 (builtins.stringLength name - (builtins.stringLength domain + 1)) name) (builtins.attrNames self.nixosConfigurations."${hostname}".config.services.caddy.virtualHosts);
|
||||
getVirtualHostsNginx = hostname: map (name: builtins.substring 0 (builtins.stringLength name - (builtins.stringLength domain + 1)) name) (builtins.attrNames self.nixosConfigurations."${hostname}".config.services.nginx.virtualHosts);
|
||||
genCNAMEs = hostname: lib.attrsets.genAttrs (getVirtualHosts hostname) (label: { CNAME = [ "${hostname}.${domain}." ]; });
|
||||
genCNAMEsNginx = hostname: lib.attrsets.genAttrs (getVirtualHostsNginx hostname) (label: { CNAME = [ "${hostname}.${domain}." ]; });
|
||||
in
|
||||
lib.attrsets.mergeAttrsList [
|
||||
rec {
|
||||
|
@ -56,9 +54,7 @@ let
|
|||
|
||||
}
|
||||
(genCNAMEs "nuc")
|
||||
(genCNAMEsNginx "nuc")
|
||||
(builtins.removeAttrs (genCNAMEs "falkenstein") [ "mail" ])
|
||||
(builtins.removeAttrs (genCNAMEsNginx "falkenstein") [ "mail" ])
|
||||
];
|
||||
});
|
||||
in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue