Update udev rules

This commit is contained in:
iFargle 2023-12-06 15:32:21 +09:00
parent 908c2d6def
commit fbe39cacb4
3 changed files with 20 additions and 20 deletions

View file

@ -0,0 +1,17 @@
{ ... }: {
boot.initrd.services.udev.rules = ''
# This is used to load the correct kernel module for the Framework USB-C Ethernet Adapter
ACTION!="add", GOTO="usb_realtek_net_end"
SUBSYSTEM!="usb", GOTO="usb_realtek_net_end"
ENV{DEVTYPE}!="usb_device", GOTO="usb_realtek_net_end"
# Modify this to change the default value
ENV{REALTEK_MODE1}="1"
# Realtek
ATTR{idVendor}=="0bda", ATTR{idProduct}=="815[2,3,5,6]", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
LABEL="usb_realtek_net_end"
'';
}

View file

@ -5,8 +5,8 @@
(modulesPath + "/installer/scan/not-detected.nix")
./disks.nix
../../common/modules/secureboot.nix
../../common/modules/udev-rules.nix
../../common/services/fwupd.nix
../../common/services/forgejo-runner.nix
./builder.nix
./ssh-luks.nix
./docker.nix
@ -53,28 +53,10 @@
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = true;
};
environment.systemPackages = with pkgs; [
iproute2
];
environment.systemPackages = with pkgs; [ iproute2 ];
# Forward mail port 25 to sysctl.io / linode
networking.firewall.extraCommands = ''
ip route add table 25 0.0.0.0/0 dev wireguard0
ip route add table 25 default via 10.100.0.2
'';
boot.initrd.services.udev.rules = ''
# This is used to load the correct kernel module for the Framework USB-C Ethernet Adapter
ACTION!="add", GOTO="usb_realtek_net_end"
SUBSYSTEM!="usb", GOTO="usb_realtek_net_end"
ENV{DEVTYPE}!="usb_device", GOTO="usb_realtek_net_end"
# Modify this to change the default value
ENV{REALTEK_MODE1}="1"
# Realtek
ATTR{idVendor}=="0bda", ATTR{idProduct}=="815[2,3,5,6]", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
LABEL="usb_realtek_net_end"
'';
}

View file

@ -4,6 +4,7 @@
(modulesPath + "/installer/scan/not-detected.nix")
./disks.nix
../../common/modules/secureboot.nix
../../common/modules/udev-rules.nix
../../common/services/powertop.nix
../../common/services/fwupd.nix
../../common/services/tlp.nix