Merge pull request #132624 from lovesegfault/hqplayerd-fixes

nixos/hqplayerd: set HOME to path in state directory
This commit is contained in:
Bernardo Meurer 2021-08-04 17:08:12 +00:00 committed by GitHub
commit 6b3d1790de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,8 +100,9 @@ in
systemd = { systemd = {
tmpfiles.rules = [ tmpfiles.rules = [
"d ${configDir} 0755 ${cfg.user} ${cfg.group} - -" "d ${configDir} 0755 ${cfg.user} ${cfg.group} - -"
"d ${stateDir} 0755 ${cfg.user} ${cfg.group} - -" "d ${stateDir} 0755 ${cfg.user} ${cfg.group} - -"
"d ${stateDir}/home 0755 ${cfg.user} ${cfg.group} - -"
]; ];
services.hqplayerd = { services.hqplayerd = {
@ -110,6 +111,8 @@ in
requires = [ "network-online.target" "sound.target" "systemd-udev-settle.service" ]; 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" ]; 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 ]; unitConfig.ConditionPathExists = [ configDir stateDir ];
preStart = preStart =