15 lines
449 B
Nix
15 lines
449 B
Nix
{ 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";
|
|
};
|
|
};
|
|
}
|