mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
28 lines
642 B
Nix
28 lines
642 B
Nix
{ 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";
|
|
};
|
|
};
|
|
};
|
|
}
|