use specializations to have multiple kernel versions

This commit is contained in:
Adithya 2024-02-04 18:13:39 +05:30
parent dd3c0e36b9
commit e2d2def20b
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
3 changed files with 27 additions and 1 deletions

View file

@ -9,6 +9,7 @@
./rollback.nix
./secureboot.nix
./security.nix
./specialisations.nix
./virtualisation.nix
];

View file

@ -18,7 +18,7 @@
systemd.enable = true;
};
kernelModules = [ "kvm-intel" ];
kernelPackages = pkgs.linuxPackages_xanmod_latest;
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
kernelParams = [ "quiet" ];
kernel.sysctl = {
"vm.swappiness" = 10;

View file

@ -0,0 +1,25 @@
{ lib
, pkgs
, ...
}: {
specialisation = {
xanmod = {
inheritParentConfig = true;
configuration = {
boot = {
kernelPackages = lib.mkForce pkgs.linuxPackages_xanmod_latest;
};
system.nixos.tags = [ "with-xanmod" ];
};
};
zen = {
inheritParentConfig = true;
configuration = {
boot = {
kernelPackages = lib.mkForce pkgs.linuxPackages_zen;
};
system.nixos.tags = [ "with-zen" ];
};
};
};
}