cgmanager: add module

This commit is contained in:
Jörg Thalheim 2016-12-02 12:38:41 +00:00
parent af609b0254
commit aa854f192e
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA
2 changed files with 28 additions and 0 deletions

View File

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

View File

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