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
1 changed files with 4 additions and 2 deletions

View File

@ -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";