Commit 9b8c5b15bc9a

Vincent Demeester <vincent@sbr.pm>
2026-02-13 17:05:01
style: formatted laptop-keyboard-inhibit module with nixfmt
1 parent ca74e89
Changed files (1)
modules
laptop-keyboard-inhibit
modules/laptop-keyboard-inhibit/default.nix
@@ -56,13 +56,11 @@ let
   '') cfg.keyboards;
 
   # Generate udev rules for USB vendor:product matching
-  usbRules = concatMapStringsSep "\n" (
-    kb: ''
-      # Inhibit internal keyboard when USB keyboard ${kb.vendor}:${kb.product} connects
-      ACTION=="add", SUBSYSTEM=="input", ATTR{id/vendor}=="${kb.vendor}", ATTR{id/product}=="${kb.product}", ATTR{name}!="", RUN+="${toggleScript} inhibit"
-      ACTION=="remove", SUBSYSTEM=="input", ENV{ID_VENDOR_ID}=="${kb.vendor}", ENV{ID_MODEL_ID}=="${kb.product}", RUN+="${toggleScript} uninhibit"
-    ''
-  ) cfg.usbKeyboards;
+  usbRules = concatMapStringsSep "\n" (kb: ''
+    # Inhibit internal keyboard when USB keyboard ${kb.vendor}:${kb.product} connects
+    ACTION=="add", SUBSYSTEM=="input", ATTR{id/vendor}=="${kb.vendor}", ATTR{id/product}=="${kb.product}", ATTR{name}!="", RUN+="${toggleScript} inhibit"
+    ACTION=="remove", SUBSYSTEM=="input", ENV{ID_VENDOR_ID}=="${kb.vendor}", ENV{ID_MODEL_ID}=="${kb.product}", RUN+="${toggleScript} uninhibit"
+  '') cfg.usbKeyboards;
 in
 {
   options = {
@@ -72,7 +70,10 @@ in
       keyboards = mkOption {
         type = with types; listOf str;
         default = [ ];
-        example = [ "Eyelash Corne" "My Custom Keyboard" ];
+        example = [
+          "Eyelash Corne"
+          "My Custom Keyboard"
+        ];
         description = ''
           List of external keyboard device names to watch for.
           When a keyboard with this name connects, the internal laptop keyboard