about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorEdward Tjörnhammar <ed@cflags.cc>2022-11-07 09:40:54 +0100
committerEdward Tjörnhammar <ed@cflags.cc>2022-11-07 09:05:23 +0000
commit83ecc90d1012eeb3dc379c737edc42974ddb41b1 (patch)
tree819588338f03a5cba94fd6366c112af2fe417a6c /nixos
parentea396831fa5d6bc6ad5ded7447d5e2d17a79c4c1 (diff)
nixos/mdevctl: init module
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/programs/mdevctl.nix18
2 files changed, 19 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index cffd73cd8b1fa..90825aa3401f2 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -186,6 +186,7 @@
   ./programs/less.nix
   ./programs/liboping.nix
   ./programs/light.nix
+  ./programs/mdevctl.nix
   ./programs/mosh.nix
   ./programs/mininet.nix
   ./programs/msmtp.nix
diff --git a/nixos/modules/programs/mdevctl.nix b/nixos/modules/programs/mdevctl.nix
new file mode 100644
index 0000000000000..2b72852333508
--- /dev/null
+++ b/nixos/modules/programs/mdevctl.nix
@@ -0,0 +1,18 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+let
+  cfg = config.programs.mdevctl;
+in {
+  options.programs.mdevctl = {
+    enable = mkEnableOption (lib.mdDoc "Mediated Device Management");
+  };
+
+  config = mkIf cfg.enable {
+    environment.systemPackages = with pkgs; [ mdevctl ];
+
+    environment.etc."mdevctl.d/scripts.d/notifiers/.keep".text = "";
+    environment.etc."mdevctl.d/scripts.d/callouts/.keep".text = "";
+
+  };
+}