1
0
forked from extern/zaneyos

Add an option to switch kernels THANK YOU JERRY

This commit is contained in:
Tyler Kelley 2024-02-10 19:19:01 +00:00
commit 90f5c7b379
9 changed files with 57 additions and 0 deletions

View File

@ -12,6 +12,7 @@
./intel-amd.nix
./intel-gpu.nix
./intel-nvidia.nix
./kernel.nix
./logitech.nix
./neovim.nix
./nfs.nix

16
config/system/kernel.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, ... }:
{
imports = [
./kernel/default.nix
./kernel/latest.nix
./kernel/lqx.nix
./kernel/xanmod.nix
./kernel/zen.nix
# For the adventurous people
# It's not listed in the list of possible options,
# but the ones who want to try it can do so.
./kernel/testing.nix
];
}

View File

@ -0,0 +1,6 @@
{ config, lib, pkgs, ... }:
let inherit (import ../../../options.nix) theKernel; in
lib.mkIf (theKernel == "default") {
boot.kernelPackages = pkgs.linuxPackages;
}

View File

@ -0,0 +1,6 @@
{ config, lib, pkgs, ... }:
let inherit (import ../../../options.nix) theKernel; in
lib.mkIf (theKernel == "latest") {
boot.kernelPackages = pkgs.linuxPackages_latest;
}

View File

@ -0,0 +1,6 @@
{ config, lib, pkgs, ... }:
let inherit (import ../../../options.nix) theKernel; in
lib.mkIf (theKernel == "lqx") {
boot.kernelPackages = pkgs.linuxPackages_lqx;
}

View File

@ -0,0 +1,9 @@
# For the adventurous people
# It's not listed in the list of possible options,
# but the ones who want to try it can do so.
{ config, lib, pkgs, ... }:
let inherit (import ../../../options.nix) theKernel; in
lib.mkIf (theKernel == "testing") {
boot.kernelPackages = pkgs.linuxPackages_testing;
}

View File

@ -0,0 +1,6 @@
{ config, lib, pkgs, ... }:
let inherit (import ../../../options.nix) theKernel; in
lib.mkIf (theKernel == "xanmod") {
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
}

View File

@ -0,0 +1,6 @@
{ config, lib, pkgs, ... }:
let inherit (import ../../../options.nix) theKernel; in
lib.mkIf (theKernel == "zen") {
boot.kernelPackages = pkgs.linuxPackages_zen;
}

View File

@ -26,6 +26,7 @@ in {
theLCVariables = "en_US.UTF-8";
theTimezone = "America/Chicago";
theShell = "bash"; # Possible options: bash, zsh
theKernel = "default"; # possible options: default, latest, lqx, xanmod, zen
# For Hybrid Systems intel-nvidia
# Should Be Used As gpuType
cpuType = "intel";