Hi,
Is there any way to provide a correct .config file to build a custom kernel
in nixos? Currently I set my configuration.nix to build the latest LTS hardened
kernel by using:
[...]
boot.kernelPackages = let
linux_hardened_pkg = { fetchurl, buildLinux, ... } @ args:
buildLinux (args // rec {
version = "5.10.92-hardened1";
modDirVersion = version;
src = fetchurl {
url = "https://github.com/anthraxx/linux-hardened/archive/refs/tags/5.10.92-hardened1.tar.gz";
sha256 = "be8fab989a432906c71c13c43a120a290730df040b1e89dec14e97121506a7f3";
};
kernelPatches = [];
extraConfig = ''
'';
extraMeta.branch = "5.10";
} // (args.argsOverride or {}));
linux_hardened = pkgs.callPackage linux_hardened_pkg{};
in
pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_hardened);
[...]
And it works fine, but when I put my kernel configs in the extraConfig section I run
into a war field of errors, like failing the parse the end of file, or values that are set
and resolve to ‘n’, between other dragons.
Thanks!