summary refs log tree commit diff
path: root/nixos/modules/services/hardware/irqbalance.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/hardware/irqbalance.nix')
-rw-r--r--nixos/modules/services/hardware/irqbalance.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixos/modules/services/hardware/irqbalance.nix b/nixos/modules/services/hardware/irqbalance.nix
new file mode 100644
index 00000000000..b139154432c
--- /dev/null
+++ b/nixos/modules/services/hardware/irqbalance.nix
@@ -0,0 +1,30 @@
+#
+{ 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 ];
+
+  };
+
+}