diff options
author | Herwig Hochleitner <herwig@bendlas.net> | 2018-02-09 23:07:06 +0100 |
---|---|---|
committer | Herwig Hochleitner <hhochleitner@gmail.com> | 2018-02-15 09:10:32 +0100 |
commit | 0b621321cd8ca2e36790ddff686eb6e8da41ec70 (patch) | |
tree | ac267bd58093ade6b8b840d1068223d768e849a2 /nixos/modules/system/boot | |
parent | ea48495249acedfa541550085183cb13211e4f33 (diff) | |
download | nixlib-0b621321cd8ca2e36790ddff686eb6e8da41ec70.tar nixlib-0b621321cd8ca2e36790ddff686eb6e8da41ec70.tar.gz nixlib-0b621321cd8ca2e36790ddff686eb6e8da41ec70.tar.bz2 nixlib-0b621321cd8ca2e36790ddff686eb6e8da41ec70.tar.lz nixlib-0b621321cd8ca2e36790ddff686eb6e8da41ec70.tar.xz nixlib-0b621321cd8ca2e36790ddff686eb6e8da41ec70.tar.zst nixlib-0b621321cd8ca2e36790ddff686eb6e8da41ec70.zip |
boot.kernel.features: add nixos option for setting kernel features
this allows setting the features attribute for pkgs/os-specific/linux/kernel/common-config.nix
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r-- | nixos/modules/system/boot/kernel.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index d21908f84537..5eba2165435a 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -5,7 +5,7 @@ with lib; let inherit (config.boot) kernelPatches; - + inherit (config.boot.kernel) features; inherit (config.boot.kernelPackages) kernel; kernelModulesConf = pkgs.writeText "nixos.conf" @@ -21,11 +21,21 @@ in options = { + boot.kernel.features = mkOption { + default = {}; + example = literalExample "{ debug = true; }"; + description = '' + This option allows to enable or disable certain kernel features. + grep features pkgs/os-specific/linux/kernel/common-config.nix + ''; + }; + boot.kernelPackages = mkOption { default = pkgs.linuxPackages; apply = kernelPackages: kernelPackages.extend (self: super: { kernel = super.kernel.override { kernelPatches = super.kernel.kernelPatches ++ kernelPatches; + features = lib.recursiveUpdate super.kernel.features features; }; }); # We don't want to evaluate all of linuxPackages for the manual |