modules/networking: Use mkDefault for caddy config
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Akshay Mankar 2023-04-17 20:05:42 +02:00
parent 029be00eab
commit 91353938af
Signed by: axeman
GPG key ID: CA08F3AB62369B89

View file

@ -56,12 +56,12 @@ in {
# Caddy reverse proxy for local services like cups
services.caddy = {
enable = cfg.enableCaddy;
globalConfig = ''
enable = lib.mkDefault cfg.enableCaddy;
globalConfig = lib.mkDefault ''
default_bind 127.0.0.1
auto_https off
'';
extraConfig = concatStringsSep "\n" [
extraConfig = lib.mkDefault (concatStringsSep "\n" [
(lib.optionalString
config.pub-solar.printing.enable
''
@ -79,7 +79,7 @@ in {
file_server
}
'')
];
]);
};
};
}