diff --git a/config/system/default.nix b/config/system/default.nix index 3f52a7b..5d92011 100644 --- a/config/system/default.nix +++ b/config/system/default.nix @@ -12,6 +12,7 @@ ./intel-amd.nix ./intel-gpu.nix ./intel-nvidia.nix + ./kernel.nix ./logitech.nix ./neovim.nix ./nfs.nix diff --git a/config/system/kernel.nix b/config/system/kernel.nix new file mode 100644 index 0000000..a95f2ea --- /dev/null +++ b/config/system/kernel.nix @@ -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 + ]; +} diff --git a/config/system/kernel/default.nix b/config/system/kernel/default.nix new file mode 100644 index 0000000..e3b4bfd --- /dev/null +++ b/config/system/kernel/default.nix @@ -0,0 +1,6 @@ +{ config, lib, pkgs, ... }: + +let inherit (import ../../../options.nix) theKernel; in +lib.mkIf (theKernel == "default") { + boot.kernelPackages = pkgs.linuxPackages; +} diff --git a/config/system/kernel/latest.nix b/config/system/kernel/latest.nix new file mode 100644 index 0000000..c1a5503 --- /dev/null +++ b/config/system/kernel/latest.nix @@ -0,0 +1,6 @@ +{ config, lib, pkgs, ... }: + +let inherit (import ../../../options.nix) theKernel; in +lib.mkIf (theKernel == "latest") { + boot.kernelPackages = pkgs.linuxPackages_latest; +} diff --git a/config/system/kernel/lqx.nix b/config/system/kernel/lqx.nix new file mode 100644 index 0000000..b83d112 --- /dev/null +++ b/config/system/kernel/lqx.nix @@ -0,0 +1,6 @@ +{ config, lib, pkgs, ... }: + +let inherit (import ../../../options.nix) theKernel; in +lib.mkIf (theKernel == "lqx") { + boot.kernelPackages = pkgs.linuxPackages_lqx; +} diff --git a/config/system/kernel/testing.nix b/config/system/kernel/testing.nix new file mode 100644 index 0000000..f4455c0 --- /dev/null +++ b/config/system/kernel/testing.nix @@ -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; +} diff --git a/config/system/kernel/xanmod.nix b/config/system/kernel/xanmod.nix new file mode 100644 index 0000000..e751d21 --- /dev/null +++ b/config/system/kernel/xanmod.nix @@ -0,0 +1,6 @@ +{ config, lib, pkgs, ... }: + +let inherit (import ../../../options.nix) theKernel; in +lib.mkIf (theKernel == "xanmod") { + boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; +} diff --git a/config/system/kernel/zen.nix b/config/system/kernel/zen.nix new file mode 100644 index 0000000..9f227d6 --- /dev/null +++ b/config/system/kernel/zen.nix @@ -0,0 +1,6 @@ +{ config, lib, pkgs, ... }: + +let inherit (import ../../../options.nix) theKernel; in +lib.mkIf (theKernel == "zen") { + boot.kernelPackages = pkgs.linuxPackages_zen; +} diff --git a/options.nix b/options.nix index c6c6f08..3ab5262 100644 --- a/options.nix +++ b/options.nix @@ -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";