Use inherit when applicable

This commit is contained in:
SebastianStork 2025-04-11 10:50:24 +02:00
parent d3a98a31cf
commit a2cab95647
2 changed files with 5 additions and 5 deletions

View file

@ -1,7 +1,7 @@
{ config, ... }: { config, ... }:
let let
myCfg = config.myConfig; inherit (config) myConfig;
caddyServe = myCfg.tailscale.caddyServe; inherit (myConfig.tailscale) caddyServe;
in in
{ {
system.stateVersion = "24.11"; system.stateVersion = "24.11";
@ -17,11 +17,11 @@ in
caddyServe = { caddyServe = {
nextcloud = { nextcloud = {
subdomain = "cloud"; subdomain = "cloud";
inherit (myCfg.nextcloud) port; inherit (myConfig.nextcloud) port;
}; };
hedgedoc = { hedgedoc = {
subdomain = "docs"; subdomain = "docs";
inherit (myCfg.hedgedoc) port; inherit (myConfig.hedgedoc) port;
}; };
}; };
}; };

View file

@ -31,7 +31,7 @@ in
settings = { settings = {
domain = "${cfg.subdomain}.${config.networking.domain}"; domain = "${cfg.subdomain}.${config.networking.domain}";
port = cfg.port; inherit (cfg) port;
protocolUseSSL = true; protocolUseSSL = true;
allowAnonymous = false; allowAnonymous = false;