Merge pull request #83362 from bachp/boinc

nixos/boinc: simplify setup of boinc service
This commit is contained in:
Matthew Bauer 2020-04-14 15:55:54 -04:00 committed by GitHub
commit 57e20c5d87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,14 +99,16 @@ in
environment.systemPackages = [cfg.package];
users.users.boinc = {
group = "boinc";
createHome = false;
description = "BOINC Client";
home = cfg.dataDir;
isSystemUser = true;
};
users.groups.boinc = {};
systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' - boinc - - -"
"d '${cfg.dataDir}' - boinc boinc - -"
];
systemd.services.boinc = {
@ -114,7 +116,7 @@ in
after = ["network.target"];
wantedBy = ["multi-user.target"];
script = ''
${fhsEnvExecutable} --dir ${cfg.dataDir} --redirectio ${allowRemoteGuiRpcFlag}
${fhsEnvExecutable} --dir ${cfg.dataDir} ${allowRemoteGuiRpcFlag}
'';
serviceConfig = {
User = "boinc";