diff --git a/src/platform/kgpe/default.nix b/src/platform/kgpe/default.nix index a7dcd91..31b27d6 100644 --- a/src/platform/kgpe/default.nix +++ b/src/platform/kgpe/default.nix @@ -18,6 +18,13 @@ in ''; }); + userspace = prev.userspace.overrideAttrs (a: { + postInstall = (a.postInstall or "") + '' + cp ${final.coreboot.src}/mainboard/asus/kgpe-d16/cmos.layout $out/etc/ + cp ${final.coreboot.src}/mainboard/asus/kgpe-d16/cmos.default $out/etc/ + ''; + }); + coreboot = let # does include spectre mitigations (performance hit) #linux-firmware = final.nixpkgsOnBuildForBuild.linux-firmware; diff --git a/src/userspace/default.nix b/src/userspace/default.nix index 48719cc..be5cdd4 100644 --- a/src/userspace/default.nix +++ b/src/userspace/default.nix @@ -15,11 +15,14 @@ , withLvm ? false , withCryptsetup ? false , withKexec ? false +, withNvramTool ? false # nixpkgsOnBuildForHost.stdenv.hostPlatform.isx86 }: let inherit (nixpkgsOnBuildForHost.pkgsStatic) stdenv busybox signify lvm2 cryptsetup kexec-tools findutils cpio; - + nvramtool = nixpkgsOnBuildForHost.pkgsStatic.nvramtool.overrideAttrs(a: { + NIX_CFLAGS_COMPILE = "-D__GLIBC__"; + }); in stdenv.mkDerivation { name = "ownerboot-initramfs-userspace"; dontUnpack = true; @@ -48,6 +51,8 @@ in stdenv.mkDerivation { cp ${cryptsetup}/bin/cryptsetup $out/bin/ '' + lib.optionalString withKexec '' cp ${kexec-tools}/bin/kexec $out/bin/ + '' + lib.optionalString withNvramTool '' + cp ${nvramtool}/bin/nvramtool $out/bin/ '' + '' runHook postInstall '';