OS, add Non-EFI Support
This commit is contained in:
parent
5605c829b6
commit
0f7638ad40
1 changed files with 53 additions and 45 deletions
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue