diff --git a/nixos/hosts/framework-server/default.nix b/nixos/hosts/framework-server/default.nix index 77c0534e..87c09401 100644 --- a/nixos/hosts/framework-server/default.nix +++ b/nixos/hosts/framework-server/default.nix @@ -43,5 +43,21 @@ ]; }; + boot.initrd.services.udev.rules = '' + # This is used to change the default configuration of Realtek USB ethernet adapters + + 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" + ''; + services.tailscale.authKeyFile = "/run/secrets/tailscale_keys/framework-server"; } \ No newline at end of file