forked from mirrors/nixpkgs
nixos/boinc: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
parent
e734494a59
commit
8ac5973610
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue