coreboot-kgpe-d16/util/liveiso/common.nix
Felix Singer 5e44322532 util/liveiso: Install UEFITool packages
Install both versions of UEFITool, the one with the old engine and the
new one.

It's not possible to use both packages in the same environment, since
there is a collision between the names of the binary files. To make sure
a specific package is used, a new environment needs to be spawned with
the following command:

  $ nix-shell -p <package_name>

The UEFITool binaries can be executed from the shell then.

Change-Id: Ia5d679c6e7cd01c2ab819bd6c085596a926c494d
Signed-off-by: Felix Singer <felix.singer@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57624
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2021-09-15 11:42:59 +00:00

166 lines
2.9 KiB
Nix

# SPDX-License-Identifier: GPL-2.0-only
{ config, options, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
<nixpkgs/nixos/modules/installer/cd-dvd/iso-image.nix>
];
system.stateVersion = "21.05";
isoImage = {
makeEfiBootable = true;
makeUsbBootable = true;
isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
};
# Tell the Nix evaluator to garbage collect more aggressively.
# This is desirable in memory-constrained environments that don't
# (yet) have swap set up.
environment.variables.GC_INITIAL_HEAP_SIZE = "1M";
boot = {
kernelParams = [
"console=ttyS0,115200"
"console=tty0"
"iomem=relaxed"
];
# pkgs.linuxPackages == lts
# pkgs.linuxPackages_latest == stable
kernelPackages = pkgs.linuxPackages;
extraModulePackages = with config.boot.kernelPackages; [
acpi_call
chipsec
zfs
];
# Make programs more likely to work in low memory
# environments. The kernel's overcommit heustistics bite us
# fairly often, preventing processes from forking even if
# there is plenty of free memory.
kernel.sysctl."vm.overcommit_memory" = "1";
loader.grub.memtest86.enable = true;
postBootCommands = ''
mkdir -p /mnt
'';
};
console.packages = options.console.packages.default ++ [ pkgs.terminus_font ];
nixpkgs.config.allowUnfree = true;
hardware = {
cpu.intel.updateMicrocode = true;
cpu.amd.updateMicrocode = true;
enableAllFirmware = true;
bluetooth = {
enable = true;
powerOnBoot = false;
package = pkgs.bluezFull;
};
};
services = {
fwupd.enable = true;
udev.packages = with pkgs; [
rfkill_udev
];
openssh = {
enable = true;
permitRootLogin = "yes";
};
};
networking = {
hostName = "devsystem";
networkmanager.enable = true;
};
security.sudo.wheelNeedsPassword = false;
users = {
groups.user = {};
users = {
root.initialHashedPassword = "";
user = {
isNormalUser = true;
group = "user";
extraGroups = [ "users" "wheel" "networkmanager" "uucp" ];
initialHashedPassword = "";
};
};
};
environment.systemPackages = with pkgs; [
acpica-tools
btrfs-progs
bzip2
ccrypt
chipsec
coreboot-utils
cryptsetup
curl
ddrescue
dmidecode
dosfstools
e2fsprogs
efibootmgr
efivar
exfat
f2fs-tools
flashrom
fuse
fuse3
fwts
gptfdisk
gitAndTools.gitFull
gitAndTools.tig
gzip
hdparm
hexdump
htop
i2c-tools
iasl
intel-gpu-tools
inxi
iotools
jfsutils
jq
mdadm
minicom
mkpasswd
ms-sys
msr-tools
neovim
nixos-install-tools
ntfsprogs
openssl
p7zip
pacman
parted
pciutils
phoronix-test-suite
powertop
psmisc
python3Full
rsync
screen
sdparm
smartmontools
socat
sshfs-fuse
testdisk
tmate
tmux
uefitool
uefitoolPackages.old-engine
unzip
upterm
usbutils
wget
xfsprogs.bin
zfs
zip
zstd
];
}