Update udev rules
This commit is contained in:
parent
908c2d6def
commit
fbe39cacb4
3 changed files with 20 additions and 20 deletions
17
nixos/common/modules/udev-rules.nix
Normal file
17
nixos/common/modules/udev-rules.nix
Normal 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"
|
||||
'';
|
||||
}
|
|
@ -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"
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue