Added i2c support for ddcutil and fix firefox extension deprecation

This commit is contained in:
Nate Anderson 2025-06-09 10:20:23 -06:00
parent 4a6e36055c
commit 9c1298ce8b
5 changed files with 48 additions and 33 deletions

View File

@ -20,7 +20,7 @@ in
id = 0;
name = "default";
isDefault = true;
extensions = with pkgs; [
extensions.packages = with pkgs; [
nur.repos.rycee.firefox-addons.darkreader
nur.repos.rycee.firefox-addons.keepassxc-browser
nur.repos.crazazy.firefox-addons.ublock-origin

View File

@ -222,6 +222,15 @@ in
# Use latest kernel
# boot.kernelPackages = unstable.linuxPackages_latest;
services.udev.extraRules = ''
# For betaflight configurator
# DFU (Internal bootloader for STM32 and AT32 MCUs)
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
# For ddcutil monitor controls
KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660"
'';
services.xserver.videoDrivers = [ "nvidia" ];
hardware = {
graphics = {
@ -268,38 +277,41 @@ in
};
};
# Create special on the go boot entry
specialisation = {
on-the-go.configuration = {
system.nixos.tags = [ "on-the-go" ];
#
## Commenting out for now as it doesn't really work with the laptop well...
#
# specialisation = {
# on-the-go.configuration = {
# system.nixos.tags = [ "on-the-go" ];
boot.extraModprobeConfig = ''
blacklist nouveau
options nouveau modeset=0
'';
# boot.extraModprobeConfig = ''
# blacklist nouveau
# options nouveau modeset=0
# '';
services.udev.extraRules = ''
# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA Audio devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA VGA/3D controller devices
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
'';
hardware.nvidia = {
prime.offload.enable = lib.mkForce false;
prime.offload.enableOffloadCmd = lib.mkForce false;
powerManagement.finegrained = lib.mkForce false;
prime.sync.enable = lib.mkForce false;
};
boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
# Hint to kernel for integrated graphics, ID from command `$ nix-shell -p pciutils --run "lspci -nn | grep VGA"`
boot.kernelParams = [ "i915.force_probe=a7a0" "acpi_backlight=native" ];
# Default drivers
services.xserver.videoDrivers = [ "modesetting" "fbdev" ];
};
};
# services.udev.extraRules = ''
# # Remove NVIDIA USB xHCI Host Controller devices, if present
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
# # Remove NVIDIA USB Type-C UCSI devices, if present
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
# # Remove NVIDIA Audio devices, if present
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
# # Remove NVIDIA VGA/3D controller devices
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
# '';
# hardware.nvidia = {
# prime.offload.enable = lib.mkForce false;
# prime.offload.enableOffloadCmd = lib.mkForce false;
# powerManagement.finegrained = lib.mkForce false;
# prime.sync.enable = lib.mkForce false;
# };
# boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
# # Hint to kernel for integrated graphics, ID from command `$ nix-shell -p pciutils --run "lspci -nn | grep VGA"`
# boot.kernelParams = [ "i915.force_probe=a7a0" "acpi_backlight=native" ];
# # Default drivers
# services.xserver.videoDrivers = [ "modesetting" "fbdev" ];
# };
# };
nixpkgs.config.allowUnfree = true;
};
}

View File

@ -138,11 +138,13 @@
enable = true;
openFirewall = true;
};
# For betaflight configurator
services.udev.extraRules = ''
# For betaflight configurator
# DFU (Internal bootloader for STM32 and AT32 MCUs)
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
# For ddcutil monitor controls
KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660"
'';
# For yubioath desktop
services.pcscd.enable = true;

View File

@ -43,6 +43,7 @@ in
cfg.userName
"dialout"
"docker"
"i2c"
"lp"
"networkmanager"
"scanner"

View File

@ -11,7 +11,7 @@
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelParams = [ "acpi_backlight=native" "snd_seq_midi.output_buffer_size=131072" ];
boot.kernelModules = [ "kvm-intel" ];
boot.kernelModules = [ "kvm-intel" "i2c-dev" ];
boot.extraModulePackages = [ ];
fileSystems."/" =