summary refs log tree commit diff
path: root/nixos/modules/services/home-automation
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-01-29 16:36:42 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-02-15 23:15:17 +0100
commit9896247fb6d2c646f19fcd90ade45d6abd89930b (patch)
treecac4189f3a1b5cbf38126dea8110210663a9c7e0 /nixos/modules/services/home-automation
parent82f0df4d688315fd0ce4d4e850fc4dab47ee5741 (diff)
downloadnixpkgs-9896247fb6d2c646f19fcd90ade45d6abd89930b.tar
nixpkgs-9896247fb6d2c646f19fcd90ade45d6abd89930b.tar.gz
nixpkgs-9896247fb6d2c646f19fcd90ade45d6abd89930b.tar.bz2
nixpkgs-9896247fb6d2c646f19fcd90ade45d6abd89930b.tar.lz
nixpkgs-9896247fb6d2c646f19fcd90ade45d6abd89930b.tar.xz
nixpkgs-9896247fb6d2c646f19fcd90ade45d6abd89930b.tar.zst
nixpkgs-9896247fb6d2c646f19fcd90ade45d6abd89930b.zip
nixos/home-assistant: Wait for network-online.target
If people take the time to setup network-online.target correctly we
should wait for it. If they don't it's basically the same as
network.target anyway, so no harm done.

Over time I've seen multiple integrations that have dealt badly with
missing network connectivity at startup, this should alleviate further
pains.
Diffstat (limited to 'nixos/modules/services/home-automation')
-rw-r--r--nixos/modules/services/home-automation/home-assistant.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix
index 79368416d71..db6fc39c306 100644
--- a/nixos/modules/services/home-automation/home-assistant.nix
+++ b/nixos/modules/services/home-automation/home-assistant.nix
@@ -247,7 +247,7 @@ in {
 
     systemd.services.home-assistant = {
       description = "Home Assistant";
-      after = [ "network.target" ];
+      after = [ "network-online.target" ];
       preStart = optionalString (cfg.config != null) (if cfg.configWritable then ''
         cp --no-preserve=mode ${configFile} "${cfg.configDir}/configuration.yaml"
       '' else ''