Merge pull request #83362 from bachp/boinc
nixos/boinc: simplify setup of boinc service
This commit is contained in:
commit
57e20c5d87
|
@ -99,14 +99,16 @@ in
|
||||||
environment.systemPackages = [cfg.package];
|
environment.systemPackages = [cfg.package];
|
||||||
|
|
||||||
users.users.boinc = {
|
users.users.boinc = {
|
||||||
|
group = "boinc";
|
||||||
createHome = false;
|
createHome = false;
|
||||||
description = "BOINC Client";
|
description = "BOINC Client";
|
||||||
home = cfg.dataDir;
|
home = cfg.dataDir;
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
};
|
};
|
||||||
|
users.groups.boinc = {};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d '${cfg.dataDir}' - boinc - - -"
|
"d '${cfg.dataDir}' - boinc boinc - -"
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.services.boinc = {
|
systemd.services.boinc = {
|
||||||
|
@ -114,7 +116,7 @@ in
|
||||||
after = ["network.target"];
|
after = ["network.target"];
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
script = ''
|
script = ''
|
||||||
${fhsEnvExecutable} --dir ${cfg.dataDir} --redirectio ${allowRemoteGuiRpcFlag}
|
${fhsEnvExecutable} --dir ${cfg.dataDir} ${allowRemoteGuiRpcFlag}
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "boinc";
|
User = "boinc";
|
||||||
|
|
Loading…
Reference in New Issue