3
0
Fork 0
forked from mirrors/nixpkgs

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:
Jörg Thalheim 2020-05-31 09:22:22 +01:00
parent e0ece5aebe
commit 26e9a3498b
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -240,6 +240,7 @@ in {
'');
serviceConfig = {
ExecStart = "${package}/bin/hass --config '${cfg.configDir}'";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
User = "hass";
Group = "hass";
Restart = "on-failure";