From: o8opi Date: Thu, 29 Dec 2022 09:02:02 +0000 (+0100) Subject: add get-nixos-kconfig nix script X-Git-Tag: v0.6.1~14^2 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=refs%2Fpull%2F77%2Fhead;p=kconfig-hardened-check.git add get-nixos-kconfig nix script --- diff --git a/kconfig_hardened_check/config_files/distros/get-nixos-kconfig.nix b/kconfig_hardened_check/config_files/distros/get-nixos-kconfig.nix new file mode 100644 index 0000000..cd91eea --- /dev/null +++ b/kconfig_hardened_check/config_files/distros/get-nixos-kconfig.nix @@ -0,0 +1,32 @@ +{ pkgs ? import {} +}: +with pkgs; +stdenv.mkDerivation { + name = "kconf"; + nativeBuildInputs = [ + linuxPackages_hardened.kernel + linuxPackages_latest.kernel + linuxPackages.kernel + ]; + + dontUnpack = true; + dontInstall = true; + + buildPhase = '' + mkdir $out + + mkdir $out/linuxPackages_hardened/ + cp ${pkgs.linuxPackages_hardened.kernel.configfile} $out/linuxPackages_hardened/kernel.conf + echo ${pkgs.linuxPackages_hardened.kernel.version} > $out/linuxPackages_hardened/kernel.version + + mkdir $out/linuxPackages_latest/ + cp ${pkgs.linuxPackages_latest.kernel.configfile} $out/linuxPackages_latest/kernel.conf + echo ${pkgs.linuxPackages_latest.kernel.version} > $out/linuxPackages_latest/kernel.version + + mkdir $out/linuxPackages_lts/ + cp ${pkgs.linuxPackages.kernel.configfile} $out/linuxPackages_lts/kernel.conf + echo ${pkgs.linuxPackages.kernel.version} > $out/linuxPackages_lts/kernel.version + ''; + + +}