network auto negotiate network speed service
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
imports =
|
||||
[ # Include the results of the hardware scan...
|
||||
./hardware-configuration.nix
|
||||
./hwaccel.nix
|
||||
./network.nix
|
||||
|
||||
# ...and additional configurations...
|
||||
./var_reg.nix
|
||||
@@ -19,9 +21,6 @@
|
||||
./ssh.nix
|
||||
./program-tmux.nix
|
||||
|
||||
# Hardware
|
||||
./hwaccel.nix
|
||||
|
||||
# Services
|
||||
./wireguard.nix
|
||||
./docker.nix
|
||||
|
14
network.nix
Normal file
14
network.nix
Normal file
@@ -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