nixos home-assistant: a couple of fixes (#36338)
a) set path to /run/wrappers so ping works b) run via a target so we can easily inject other components (config copier, appdaemon)
This commit is contained in:
parent
9a49811f66
commit
2859483fe9
@ -104,7 +104,6 @@ in {
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.services.home-assistant = {
|
systemd.services.home-assistant = {
|
||||||
description = "Home Assistant";
|
description = "Home Assistant";
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
preStart = lib.optionalString (cfg.config != null) ''
|
preStart = lib.optionalString (cfg.config != null) ''
|
||||||
rm -f ${cfg.configDir}/configuration.yaml
|
rm -f ${cfg.configDir}/configuration.yaml
|
||||||
@ -121,6 +120,16 @@ in {
|
|||||||
ReadWritePaths = "${cfg.configDir}";
|
ReadWritePaths = "${cfg.configDir}";
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
};
|
};
|
||||||
|
path = [
|
||||||
|
"/run/wrappers" # needed for ping
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.targets.home-assistant = rec {
|
||||||
|
description = "Home Assistant";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
wants = [ "home-assistant.service" ];
|
||||||
|
after = wants;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers.hass = {
|
users.extraUsers.hass = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user