network auto negotiate network speed service
This commit is contained in:
+2
-3
@@ -8,6 +8,8 @@
|
|||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan...
|
[ # Include the results of the hardware scan...
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./hwaccel.nix
|
||||||
|
./network.nix
|
||||||
|
|
||||||
# ...and additional configurations...
|
# ...and additional configurations...
|
||||||
./var_reg.nix
|
./var_reg.nix
|
||||||
@@ -19,9 +21,6 @@
|
|||||||
./ssh.nix
|
./ssh.nix
|
||||||
./program-tmux.nix
|
./program-tmux.nix
|
||||||
|
|
||||||
# Hardware
|
|
||||||
./hwaccel.nix
|
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
./docker.nix
|
./docker.nix
|
||||||
|
|||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
systemd.services.force-gigabit-speed = {
|
||||||
|
description = "Force 1Gbps link speed on enp1s0";
|
||||||
|
# This service should run before the network is considered "up"
|
||||||
|
wantedBy = [ "network-pre.target" ];
|
||||||
|
before = [ "network-pre.target" ];
|
||||||
|
|
||||||
|
# The command to execute
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.ethtool}/bin/ethtool -s enp1s0 speed 1000 duplex full autoneg on";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user