Add old kernel specialisation in fox

Allow booting an old LTS kernel to compare performance.
This commit is contained in:
2026-01-21 10:28:48 +01:00
parent dda6a66782
commit 9e8c610d8c

View File

@@ -19,6 +19,9 @@
# Select the this using the ID to avoid mismatches
boot.loader.grub.device = "/dev/disk/by-id/wwn-0x500a07514b0c1103";
# Increase time so we can boot other entries
boot.loader.timeout = 60;
# No swap, there is plenty of RAM
swapDevices = lib.mkForce [];
@@ -31,7 +34,10 @@
# Use performance for benchmarks
powerManagement.cpuFreqGovernor = "performance";
services.amd-uprof.enable = true;
# Enable amd-uprof in >= 6.15 kernels only
services.amd-uprof.enable =
let ver = config.boot.kernelPackages.kernel.version;
in (lib.strings.compareVersions ver "6.15") >= 0;
# Disable NUMA balancing
boot.kernel.sysctl."kernel.numa_balancing" = 0;
@@ -42,6 +48,11 @@
# Disable NMI watchdog to save one hw counter (for AMD uProf)
boot.kernel.sysctl."kernel.nmi_watchdog" = 0;
specialisation.oldKernel.configuration = {
system.nixos.tags = [ "old-kernel" ];
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_6_12;
};
services.openssh.settings.X11Forwarding = true;
services.fail2ban.enable = true;