From 791b276e3705f194c511d5f24d441313cf20ad78 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 17 Aug 2023 13:57:30 -0500 Subject: [PATCH] Change to systemd-boot --- hosts/jude/boot.nix | 24 ++++++++++++++++-------- hosts/jude/default.nix | 10 ++++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/hosts/jude/boot.nix b/hosts/jude/boot.nix index ff5b492..501a351 100644 --- a/hosts/jude/boot.nix +++ b/hosts/jude/boot.nix @@ -1,26 +1,34 @@ -{ ... }: +{ lib, ... }: { - #fileSystems."/boot/efi" = { - # device = "/dev/by-uuid/9466C36266C34428"; - # fsType = "auto"; - #}; # Use the systemd-boot EFI boot loader. #boot.loader.systemd-boot.enable = true; boot = { supportedFilesystems = [ "ntfs" ]; loader = { + systemd-boot = { + enable = true; + configurationLimit = 10; + extraEntries = { + "Windows.conf" = (lib.strings.concatStringsSep "\n" [ + "title Windows" + "efi /EFI/Windows/bootmgfw.efi" + ]); + }; + }; grub = { + enable = false; device = "/dev/nvme0n1"; useOSProber = true; + efiSupport = true; extraEntries = '' menuentry "Windows" --class windows --class os { - insmod ntfs - chainloader (hd0,2)/Windows/Boot/EFI/bootmgfw.efi + insmod ntfs + chainloader (hd0,0)/EFI/Windows/bootmgfw.efi } ''; }; - efi.canTouchEfiVariables = true; + #efi.canTouchEfiVariables = true; }; }; networking.interfaces.enp4s0.useDHCP = true; diff --git a/hosts/jude/default.nix b/hosts/jude/default.nix index ca949ad..8401320 100644 --- a/hosts/jude/default.nix +++ b/hosts/jude/default.nix @@ -19,4 +19,14 @@ environment.systemPackages = with pkgs; [ oathToolkit ]; + fileSystems = { + "/boot" = { + device = "/dev/nvme0n1p1"; + fsType = "auto"; + }; + "/windows" = { + device = "/dev/nvme0n1p3"; + fsType = "ntfs-3g"; + }; + }; }