Fixes boot issues with installer.

This commit is contained in:
Bailey 2024-06-12 21:32:52 -04:00
parent ea8bd522f7
commit adb849d1ba

View file

@ -32,12 +32,32 @@ in
];
config = {
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.configurationLimit = 5;
boot = lib.mkIf (config.system.nixos.variant_id != "installer") {
initrd.systemd.enable = true;
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
boot.initrd.systemd.enable = true;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen;
loader = {
systemd-boot = {
enable = true;
configurationLimit = 5;
};
efi.canTouchEfiVariables = true;
};
binfmt = {
emulatedSystems = lib.optionals (!cfg.minimal) [ "aarch64-linux" "riscv64-linux" ];
# Run appimages normally
registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
};
};
services.fwupd.enable = true;
@ -121,15 +141,6 @@ in
'';
};
};
# Run appimages normally
boot.binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
services.udev.packages = with pkgs; [
android-udev-rules
@ -147,8 +158,6 @@ in
allowedUDPPorts = [ 22000 ];
};
boot.binfmt.emulatedSystems = lib.optionals (!cfg.minimal) [ "aarch64-linux" "riscv64-linux" ];
# Inserts flake.nix shim on install.
environment.etc."nixos/flake.nix" = {
source = inputs.self + "/templates/shim/flake.nix";