diff options
author | Bernardo Meurer <bernardo@meurer.org> | 2021-08-13 15:16:21 -0700 |
---|---|---|
committer | Bernardo Meurer <bernardo@meurer.org> | 2021-08-13 15:16:21 -0700 |
commit | c934bb67717c04a4069182423ad1b200ac40c381 (patch) | |
tree | 760a201177614f8363176c0c9c82bae5b70d8c45 /nixos/modules/services/audio/hqplayerd.nix | |
parent | 196138ea6b9803a42c6720f421db023b953926d2 (diff) | |
download | nixpkgs-c934bb67717c04a4069182423ad1b200ac40c381.tar nixpkgs-c934bb67717c04a4069182423ad1b200ac40c381.tar.gz nixpkgs-c934bb67717c04a4069182423ad1b200ac40c381.tar.bz2 nixpkgs-c934bb67717c04a4069182423ad1b200ac40c381.tar.lz nixpkgs-c934bb67717c04a4069182423ad1b200ac40c381.tar.xz nixpkgs-c934bb67717c04a4069182423ad1b200ac40c381.tar.zst nixpkgs-c934bb67717c04a4069182423ad1b200ac40c381.zip |
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.
Diffstat (limited to 'nixos/modules/services/audio/hqplayerd.nix')
-rw-r--r-- | nixos/modules/services/audio/hqplayerd.nix | 2 |
1 files changed, 1 insertions, 1 deletions
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}" |