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 = {
|
options = {
|
||||||
system.timezone = lib.mkOption { default = "America/Los_Angeles"; };
|
system.timezone = lib.mkOption { default = "America/Los_Angeles"; };
|
||||||
system.extraFonts = lib.mkOption { default = []; };
|
system.extraFonts = lib.mkOption { default = []; };
|
||||||
|
system.isNonEFI = lib.mkEnableOption
|
||||||
|
"Enable if you are running a non-EFI system";
|
||||||
system.users.bigWheels = lib.mkOption { default = []; };
|
system.users.bigWheels = lib.mkOption { default = []; };
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = lib.mkMerge [
|
||||||
# Use the systemd-boot EFI boot loader.
|
(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.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.timeout = 1;
|
boot.loader.timeout = 1;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
})
|
||||||
|
{
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
|
@ -59,5 +66,6 @@
|
||||||
source-han-sans # Pan-CJK font
|
source-han-sans # Pan-CJK font
|
||||||
] ++ config.system.extraFonts;
|
] ++ config.system.extraFonts;
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue