1
Fork 0

extraConfig: use mkDefault

This commit is contained in:
Motiejus Jakštys 2024-01-20 14:47:44 +02:00
parent 7d6143a832
commit ce0521ef77
2 changed files with 8 additions and 3 deletions

View File

@ -82,6 +82,7 @@ in {
};
services.caddy.virtualHosts."${cfg.vhost}".extraConfig =
builtins.readFile "${e11sync-caddyfile}";
lib.mkDefault
(builtins.readFile "${e11sync-caddyfile}");
};
}

8
vm.nix
View File

@ -1,4 +1,8 @@
{pkgs, ...}: {
{
lib,
pkgs,
...
}: {
e11sync = {
enable = true;
migrateOnStart = true;
@ -13,7 +17,7 @@
auto_https off
debug
'';
virtualHosts."http://:8003".extraConfig = ''
virtualHosts."http://:8003".extraConfig = lib.mkForce ''
redir / /admin/
${builtins.readFile "${pkgs.e11sync-caddyfile}"}
'';