diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-09-07 08:39:35 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-09-07 08:39:35 +0200 |
commit | 850adcf4b17afb6f5429b030f3c814d502d2b53e (patch) | |
tree | 9e30459cec309e4b04bed476f9444a9335dac0af /modules/private/buildbot/default.nix | |
parent | de6d17ec97a1946f628372e5b0854cb21a91a55f (diff) | |
download | Nix-850adcf4b17afb6f5429b030f3c814d502d2b53e.tar.gz Nix-850adcf4b17afb6f5429b030f3c814d502d2b53e.tar.zst Nix-850adcf4b17afb6f5429b030f3c814d502d2b53e.zip |
Put services in slices in systemd
Diffstat (limited to 'modules/private/buildbot/default.nix')
-rw-r--r-- | modules/private/buildbot/default.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/private/buildbot/default.nix b/modules/private/buildbot/default.nix index 3dc6a04..6674ad7 100644 --- a/modules/private/buildbot/default.nix +++ b/modules/private/buildbot/default.nix | |||
@@ -126,6 +126,10 @@ in | |||
126 | ] ++ lib.attrsets.mapAttrsToList (k: v: "/var/secrets/buildbot/${project.name}/${k}") project.secrets; | 126 | ] ++ lib.attrsets.mapAttrsToList (k: v: "/var/secrets/buildbot/${project.name}/${k}") project.secrets; |
127 | }) config.myEnv.buildbot.projects; | 127 | }) config.myEnv.buildbot.projects; |
128 | 128 | ||
129 | systemd.slices.buildbot = { | ||
130 | description = "buildbot slice"; | ||
131 | }; | ||
132 | |||
129 | systemd.services = lib.attrsets.mapAttrs' (k: project: lib.attrsets.nameValuePair "buildbot-${project.name}" { | 133 | systemd.services = lib.attrsets.mapAttrs' (k: project: lib.attrsets.nameValuePair "buildbot-${project.name}" { |
130 | description = "Buildbot Continuous Integration Server ${project.name}."; | 134 | description = "Buildbot Continuous Integration Server ${project.name}."; |
131 | after = [ "network-online.target" ]; | 135 | after = [ "network-online.target" ]; |
@@ -207,6 +211,7 @@ in | |||
207 | in project_env // { inherit PYTHONPATH HOME; }; | 211 | in project_env // { inherit PYTHONPATH HOME; }; |
208 | 212 | ||
209 | serviceConfig = { | 213 | serviceConfig = { |
214 | Slice = "buildbot.slice"; | ||
210 | Type = "forking"; | 215 | Type = "forking"; |
211 | User = "buildbot"; | 216 | User = "buildbot"; |
212 | Group = "buildbot"; | 217 | Group = "buildbot"; |