Files
vps-nixos/hosts/common/core/boot.nix
T
aloslider c11e41669b Init
Initial commit, nodes are mostly done, panel is WIP
2026-11-16 01:01:01 +03:00

32 lines
503 B
Nix

{
config,
lib,
...
}:
with lib;
let
firmware = config.vps.boot.firmware;
in
{
options.vps.boot.firmware = mkOption {
type = types.enum [
"uefi"
"bios"
];
};
config = {
zramSwap.enable = true;
boot.loader =
if firmware == "uefi" then {
systemd-boot.enable = true;
efi.canTouchEfiVariables = false;
}
else if firmware == "bios" then {
grub.enable = true;
}
else throw "Unknown boot firmware type";
};
}