fix: correct systemd path and service configuration for Caddy route reload
This commit is contained in:
parent
d71e12b3dd
commit
fc9c6f1b81
1 changed files with 8 additions and 5 deletions
13
caddy.nix
13
caddy.nix
|
|
@ -32,16 +32,19 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.path."caddy-routes-reload" = {
|
|
||||||
|
systemd.paths."caddy-routes-reload" = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
pathConfig = {
|
pathConfig = {
|
||||||
PathChanged = "/var/lib/containers/routes/routes.caddy";
|
PathChanged = "/var/lib/containers/routes/routes.caddy";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.service."caddy-routes-reload" = {
|
systemd.services."caddy-routes-reload" = {
|
||||||
script = ''
|
serviceConfig = {
|
||||||
systemctl reload caddy
|
Type = "oneshot";
|
||||||
'';
|
ExecStart = "${pkgs.systemd}/bin/systemctl reload caddy.service";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue