diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix index 427c1b641900..6de14687cfae 100644 --- a/nixos/modules/services/home-automation/home-assistant.nix +++ b/nixos/modules/services/home-automation/home-assistant.nix @@ -1043,9 +1043,7 @@ in ]; UMask = "0077"; }; - path = [ - pkgs.unixtools.ping # needed for ping - ]; + path = with pkgs; lib.optionals (any useComponent componentsUsingPing) [ unixtools.ping ]; }; systemd.targets.home-assistant = rec {