cgmanager: add module

+28
+1
nixos/modules/module-list.nix
··· 483 483 ./services/security/torify.nix 484 484 ./services/security/tor.nix 485 485 ./services/security/torsocks.nix 486 + ./services/system/cgmanager.nix 486 487 ./services/system/cloud-init.nix 487 488 ./services/system/dbus.nix 488 489 ./services/system/kerberos.nix
+27
nixos/modules/services/system/cgmanager.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + cfg = config.services.cgmanager; 7 + in { 8 + meta.maintainers = [ maintainers.mic92 ]; 9 + 10 + ###### interface 11 + options.services.cgmanager.enable = mkEnableOption "cgmanager"; 12 + 13 + ###### implementation 14 + config = mkIf cfg.enable { 15 + systemd.services.cgmanager = { 16 + wantedBy = [ "multi-user.target" ]; 17 + after = [ "local-fs.target" ]; 18 + description = "Cgroup management daemon"; 19 + restartIfChanged = false; 20 + serviceConfig = { 21 + ExecStart = "${pkgs.cgmanager}/bin/cgmanager -m name=systemd"; 22 + KillMode = "process"; 23 + Restart = "on-failure"; 24 + }; 25 + }; 26 + }; 27 + }