diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 5ae69ffd223..bf7a68c6cea 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -483,6 +483,7 @@ ./services/security/torify.nix ./services/security/tor.nix ./services/security/torsocks.nix + ./services/system/cgmanager.nix ./services/system/cloud-init.nix ./services/system/dbus.nix ./services/system/kerberos.nix diff --git a/nixos/modules/services/system/cgmanager.nix b/nixos/modules/services/system/cgmanager.nix new file mode 100644 index 00000000000..59d3deced86 --- /dev/null +++ b/nixos/modules/services/system/cgmanager.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.cgmanager; +in { + meta.maintainers = [ maintainers.mic92 ]; + + ###### interface + options.services.cgmanager.enable = mkEnableOption "cgmanager"; + + ###### implementation + config = mkIf cfg.enable { + systemd.services.cgmanager = { + wantedBy = [ "multi-user.target" ]; + after = [ "local-fs.target" ]; + description = "Cgroup management daemon"; + restartIfChanged = false; + serviceConfig = { + ExecStart = "${pkgs.cgmanager}/bin/cgmanager -m name=systemd"; + KillMode = "process"; + Restart = "on-failure"; + }; + }; + }; +}