mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
cgmanager: add module
This commit is contained in:
parent
af609b0254
commit
aa854f192e
@ -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
|
||||
|
27
nixos/modules/services/system/cgmanager.nix
Normal file
27
nixos/modules/services/system/cgmanager.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user