nixos/home-assistant: make service reloadable
This allows quick reloads using the following trick: $(nix-build --show-trace --no-out-link \ -E '(with import <nixpkgs/nixos> {}; pkgs.writeScript "update-hass-config" config.systemd.services.home-assistant.preStart)') systemctl reload home-assistant
This commit is contained in:
parent
e0ece5aebe
commit
26e9a3498b
@ -240,6 +240,7 @@ in {
|
|||||||
'');
|
'');
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${package}/bin/hass --config '${cfg.configDir}'";
|
ExecStart = "${package}/bin/hass --config '${cfg.configDir}'";
|
||||||
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
User = "hass";
|
User = "hass";
|
||||||
Group = "hass";
|
Group = "hass";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user