forked from mirrors/nixpkgs
nixos/hqplayerd: set HOME to path in state directory
The service likes to write files uploaded by the user to the service user's $HOME. In our case the hqplayerd user has no home directory, since it's a system user, and regardless we'd like to keep the service's state contained. With this change the unit forces HOME to point to /var/lib/hqplayer/home, which works around the issue.
This commit is contained in:
parent
5e1e2914eb
commit
f949ce7449
|
@ -102,6 +102,7 @@ in
|
|||
tmpfiles.rules = [
|
||||
"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 =
|
||||
|
|
Loading…
Reference in a new issue