feat(homelab): update network and swap configuration
This commit is contained in:
1 parent
627c848d1d
commit
af50f7f39d
1 file changed
+31
-10
@@ -37,7 +37,7 @@
|
|||||||
hostName = "miku-homelab";
|
hostName = "miku-homelab";
|
||||||
useNetworkManager = true;
|
useNetworkManager = true;
|
||||||
staticIp = {
|
staticIp = {
|
||||||
interface = "enp6s0";
|
interface = "enp9s0";
|
||||||
address = "10.1.1.21";
|
address = "10.1.1.21";
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
gateway = "10.1.1.1";
|
gateway = "10.1.1.1";
|
||||||
@@ -111,7 +111,35 @@
|
|||||||
plymouth.enable = true;
|
plymouth.enable = true;
|
||||||
initrd.kernelModules = [ "amdgpu" ];
|
initrd.kernelModules = [ "amdgpu" ];
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
kernelParams = [ "quiet" "splash" "boot.shell_on_fail" "loglevel=3" "iommu=pt" ];
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"splash"
|
||||||
|
"boot.shell_on_fail"
|
||||||
|
"loglevel=3"
|
||||||
|
"iommu=pt"
|
||||||
|
"zswap.enabled=1"
|
||||||
|
"zswap.compressor=zstd"
|
||||||
|
"zswap.max_pool_percent=20"
|
||||||
|
"zswap.zpool=zsmalloc"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-label/optane-swap-1";
|
||||||
|
priority = 50;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-label/optane-swap-2";
|
||||||
|
priority = 50;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
algorithm = "zstd";
|
||||||
|
memoryPercent = 50;
|
||||||
|
priority = 100;
|
||||||
};
|
};
|
||||||
|
|
||||||
time.timeZone = "America/Argentina/Buenos_Aires";
|
time.timeZone = "America/Argentina/Buenos_Aires";
|
||||||
@@ -147,7 +175,7 @@
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.ethtool}/bin/ethtool -K enp6s0 rx-udp-gro-forwarding on rx-gro-list on";
|
ExecStart = "${pkgs.ethtool}/bin/ethtool -K enp9s0 rx-udp-gro-forwarding on rx-gro-list on";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -157,12 +185,5 @@
|
|||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
zramSwap = {
|
|
||||||
enable = true;
|
|
||||||
algorithm = "zstd";
|
|
||||||
memoryPercent = 50;
|
|
||||||
priority = 100;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user