forked from pub-solar/os
Merge pull request 'modules/networking: Use mkDefault for caddy config' (#220) from networking-mkDefault into main
Reviewed-on: pub-solar/os#220 Reviewed-by: teutat3s <teutates@mailbox.org>
This commit is contained in:
commit
ed532fa271
|
@ -56,12 +56,12 @@ in {
|
||||||
|
|
||||||
# Caddy reverse proxy for local services like cups
|
# Caddy reverse proxy for local services like cups
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = cfg.enableCaddy;
|
enable = lib.mkDefault cfg.enableCaddy;
|
||||||
globalConfig = ''
|
globalConfig = lib.mkDefault ''
|
||||||
default_bind 127.0.0.1
|
default_bind 127.0.0.1
|
||||||
auto_https off
|
auto_https off
|
||||||
'';
|
'';
|
||||||
extraConfig = concatStringsSep "\n" [
|
extraConfig = lib.mkDefault (concatStringsSep "\n" [
|
||||||
(lib.optionalString
|
(lib.optionalString
|
||||||
config.pub-solar.printing.enable
|
config.pub-solar.printing.enable
|
||||||
''
|
''
|
||||||
|
@ -79,7 +79,7 @@ in {
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
'')
|
'')
|
||||||
];
|
]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue