52 lines
1 KiB
Nix
52 lines
1 KiB
Nix
|
{ pkgs, lib, config, ... }: {
|
||
|
environment.defaultPackages = [
|
||
|
pkgs.inetutils
|
||
|
pkgs.tcpdump
|
||
|
pkgs.iperf
|
||
|
];
|
||
|
|
||
|
networking = {
|
||
|
useNetworkd = true;
|
||
|
firewall.enable = false;
|
||
|
};
|
||
|
systemd.network.enable = true;
|
||
|
|
||
|
nix = {
|
||
|
nixPath = [
|
||
|
"nixpkgs=${toString <nixpkgs>}"
|
||
|
];
|
||
|
channel.enable = false;
|
||
|
settings = {
|
||
|
nix-path = config.nix.nixPath;
|
||
|
experimental-features = [
|
||
|
"pipe-operator"
|
||
|
"nix-command"
|
||
|
];
|
||
|
};
|
||
|
package = pkgs.lix;
|
||
|
};
|
||
|
|
||
|
users.users.root = {
|
||
|
password = "vxlan";
|
||
|
initialHashedPassword = lib.mkForce null;
|
||
|
};
|
||
|
|
||
|
systemd = {
|
||
|
timers."tx-onload" = {
|
||
|
wantedBy = [ "timers.target" ];
|
||
|
timerConfig.OnStartupSec = 30;
|
||
|
};
|
||
|
services."tx-onload" = {
|
||
|
script = ''
|
||
|
${lib.getExe' pkgs.busybox "ip"} l |\
|
||
|
grep '^[0-9]' |\
|
||
|
sed 's/^[0-9]*: \(.*\)\(@.*\)\?: .*$/\1/' |\
|
||
|
xargs --replace=%I ${lib.getExe pkgs.ethtool} -K %I tx off tx-checksumming off
|
||
|
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
|
||
|
system.stateVersion = "25.05";
|
||
|
}
|