diff --git a/nixos/modules/services/audio/hqplayerd.nix b/nixos/modules/services/audio/hqplayerd.nix index 3a703c97c0f7..b4d8468a2375 100644 --- a/nixos/modules/services/audio/hqplayerd.nix +++ b/nixos/modules/services/audio/hqplayerd.nix @@ -100,8 +100,9 @@ in systemd = { tmpfiles.rules = [ - "d ${configDir} 0755 ${cfg.user} ${cfg.group} - -" - "d ${stateDir} 0755 ${cfg.user} ${cfg.group} - -" + "d ${configDir} 0755 ${cfg.user} ${cfg.group} - -" + "d ${stateDir} 0755 ${cfg.user} ${cfg.group} - -" + "d ${stateDir}/home 0755 ${cfg.user} ${cfg.group} - -" ]; services.hqplayerd = { @@ -110,6 +111,8 @@ in requires = [ "network-online.target" "sound.target" "systemd-udev-settle.service" ]; after = [ "network-online.target" "sound.target" "systemd-udev-settle.service" "local-fs.target" "remote-fs.target" "systemd-tmpfiles-setup.service" ]; + environment.HOME = "${stateDir}/home"; + unitConfig.ConditionPathExists = [ configDir stateDir ]; preStart =