OS, add Non-EFI Support

This commit is contained in:
Julia Lange 2024-12-24 17:06:05 -08:00
parent 5605c829b6
commit 0f7638ad40
Signed by: Julia
SSH key fingerprint: SHA256:KI8YxpkPRbnDRkXPgCuQCVz181++Vy7NAvmQj8alOhM

View file

@ -4,16 +4,23 @@
options = {
system.timezone = lib.mkOption { default = "America/Los_Angeles"; };
system.extraFonts = lib.mkOption { default = []; };
system.isNonEFI = lib.mkEnableOption
"Enable if you are running a non-EFI system";
system.users.bigWheels = lib.mkOption { default = []; };
};
config = {
# Use the systemd-boot EFI boot loader.
config = lib.mkMerge [
(lib.mkIf config.system.isNonEFI {
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
})
(lib.mkIf (!config.system.isNonEFI) {
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = true;
boot.loader.timeout = 1;
boot.loader.efi.canTouchEfiVariables = true;
})
{
networking.hostName = hostname;
system.stateVersion = "23.05";
@ -59,5 +66,6 @@
source-han-sans # Pan-CJK font
] ++ config.system.extraFonts;
};
};
}
];
}