systemd-boot: copy the entire bootloader to the second disc on every switch

This commit is contained in:
Rouven Seifert 2024-04-14 11:35:47 +02:00
parent c534e2a8e1
commit be638b274d
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
2 changed files with 12 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ config, ... }:
{ config, pkgs, ... }:
{
imports =
@ -7,7 +7,12 @@
./network.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot = {
enable = true;
extraInstallCommands = ''
${pkgs.coreutils}/bin/cp -r /boot/* /boot2
'';
};
# boot.kernelParams = [ "video=VGA-1:1024x768@30" ];
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = [ "zfs" ];

View file

@ -45,6 +45,11 @@
device = "/dev/disk/by-uuid/3278-8D00";
fsType = "vfat";
};
fileSystems."/boot2" =
{
device = "/dev/disk/by-uuid/3366-F71E";
fsType = "vfat";
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";