mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 10:16:44 +01:00
31 lines
545 B
Nix
31 lines
545 B
Nix
#
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.irqbalance;
|
|
|
|
in
|
|
{
|
|
options.services.irqbalance.enable = mkEnableOption "irqbalance daemon";
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
systemd.services = {
|
|
irqbalance = {
|
|
description = "irqbalance daemon";
|
|
path = [ pkgs.irqbalance ];
|
|
serviceConfig =
|
|
{ ExecStart = "${pkgs.irqbalance}/bin/irqbalance --foreground"; };
|
|
wantedBy = [ "multi-user.target" ];
|
|
};
|
|
};
|
|
|
|
environment.systemPackages = [ pkgs.irqbalance ];
|
|
|
|
};
|
|
|
|
}
|