From c934bb67717c04a4069182423ad1b200ac40c381 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Fri, 13 Aug 2021 15:16:21 -0700 Subject: [PATCH] nixos/hqplayerd: don't add config to restartTriggers when it doesn't exist Previously when the use didn't set `hqplayer.config`, we would still attempt to reference the config file in the restartTriggers, causing an error. --- nixos/modules/services/audio/hqplayerd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/audio/hqplayerd.nix b/nixos/modules/services/audio/hqplayerd.nix index ed8de390417..d549ac77e0e 100644 --- a/nixos/modules/services/audio/hqplayerd.nix +++ b/nixos/modules/services/audio/hqplayerd.nix @@ -110,7 +110,7 @@ in unitConfig.ConditionPathExists = [ configDir stateDir ]; - restartTriggers = [ config.environment.etc."hqplayer/hqplayerd.xml".source ]; + restartTriggers = optionals (cfg.config != null) [ config.environment.etc."hqplayer/hqplayerd.xml".source ]; preStart = '' cp -r "${pkg}/var/lib/hqplayer/web" "${stateDir}"