]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/buildbot/default.nix
Put services in slices in systemd
[perso/Immae/Config/Nix.git] / modules / private / buildbot / default.nix
index 3dc6a044acf8933996e811e0ac9001c2416c2540..6674ad72f622326eadde698ed2831797df3fd7a0 100644 (file)
@@ -126,6 +126,10 @@ in
       ] ++ lib.attrsets.mapAttrsToList (k: v: "/var/secrets/buildbot/${project.name}/${k}") project.secrets;
     }) config.myEnv.buildbot.projects;
 
+    systemd.slices.buildbot = {
+      description = "buildbot slice";
+    };
+
     systemd.services = lib.attrsets.mapAttrs' (k: project: lib.attrsets.nameValuePair "buildbot-${project.name}" {
       description = "Buildbot Continuous Integration Server ${project.name}.";
       after = [ "network-online.target" ];
@@ -207,6 +211,7 @@ in
       in project_env // { inherit PYTHONPATH HOME; };
 
       serviceConfig = {
+        Slice = "buildbot.slice";
         Type = "forking";
         User = "buildbot";
         Group = "buildbot";