Switch to zen kernel optimized for znver4.
This commit is contained in:
parent
5d23126205
commit
e09eea2049
@ -42,7 +42,7 @@
|
||||
];
|
||||
nix.settings.trusted-users = [ "@wheel" ];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_6_11;
|
||||
# boot.kernelPackages = pkgs.linuxPackages_6_11;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
services.getty = {
|
||||
|
@ -3,6 +3,7 @@
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./disk-config.nix
|
||||
./optimized_build.nix
|
||||
];
|
||||
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
|
30
nix/configuration/hosts/odo/optimized_build.nix
Normal file
30
nix/configuration/hosts/odo/optimized_build.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(
|
||||
self: super:
|
||||
let
|
||||
optimizeWithFlags =
|
||||
pkg: flags:
|
||||
pkg.overrideAttrs (old: {
|
||||
NIX_CFLAGS_COMPILE = [ (old.NIX_CFLAGS_COMPILE or "") ] ++ flags;
|
||||
});
|
||||
in
|
||||
{
|
||||
linux_znver4 = optimizeWithFlags super.linux_zen [
|
||||
"-march=znver4"
|
||||
"-mtune=znver4"
|
||||
];
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
boot.kernelPackages = lib.mkIf (!config.me.buildingIso) (pkgs.linuxPackagesFor pkgs.linux_znver4);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user