From cc2e0a8e01f4ca19bd9e9afaf75381b8edfbd3c8 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 12 Feb 2024 09:44:46 +0100 Subject: [PATCH] Disable the webcam on my notebook For some reason it draws a lot of power and I have an external one that works better. --- systems/gwyn/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/systems/gwyn/default.nix b/systems/gwyn/default.nix index ad7eec5..628ba85 100644 --- a/systems/gwyn/default.nix +++ b/systems/gwyn/default.nix @@ -88,6 +88,11 @@ fstrim.enable = true; # Enable TRIM for SD cards hardware.bolt.enable = true; # Enable Thunderbolt control logind.lidSwitchExternalPower = "ignore"; + + # Disable the integrated webcam + udev.extraRules = '' + ACTION=="add", ATTR{idVendor}=="0c45", ATTR{idProduct}=="671d", RUN="${pkgs.bash}/bin/sh -c 'echo 1 >/sys/\$devpath/remove'" + ''; }; virtualisation.virtualbox.host.enable = true;