3
0
Fork 0
forked from mirrors/nixpkgs

nixos/boinc: replace deprecated usage of PermissionsStartOnly

see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
Aaron Andersen 2019-02-24 13:05:44 -05:00
parent e734494a59
commit 8ac5973610

View file

@ -105,19 +105,18 @@ in
isSystemUser = true; isSystemUser = true;
}; };
systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' - boinc - - -"
];
systemd.services.boinc = { systemd.services.boinc = {
description = "BOINC Client"; description = "BOINC Client";
after = ["network.target" "local-fs.target"]; after = ["network.target" "local-fs.target"];
wantedBy = ["multi-user.target"]; wantedBy = ["multi-user.target"];
preStart = ''
mkdir -p ${cfg.dataDir}
chown boinc ${cfg.dataDir}
'';
script = '' script = ''
${fhsEnvExecutable} --dir ${cfg.dataDir} --redirectio ${allowRemoteGuiRpcFlag} ${fhsEnvExecutable} --dir ${cfg.dataDir} --redirectio ${allowRemoteGuiRpcFlag}
''; '';
serviceConfig = { serviceConfig = {
PermissionsStartOnly = true; # preStart must be run as root
User = "boinc"; User = "boinc";
Nice = 10; Nice = 10;
}; };