summaryrefslogtreecommitdiff
path: root/sys/boot/chain.nix
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/chain.nix')
-rw-r--r--sys/boot/chain.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/boot/chain.nix b/sys/boot/chain.nix
index 43edcb4..b6a9ab2 100644
--- a/sys/boot/chain.nix
+++ b/sys/boot/chain.nix
@@ -9,7 +9,7 @@ with lib; let
in {
options.local.boot = {
loader = mkOption {
- type = types.enum ["none" "grub" "systemd-boot"];
+ type = types.enum ["none" "out-of-band" "grub" "systemd-boot"];
};
kernel = mkOption {
@@ -22,7 +22,11 @@ in {
kernelPackages = cfg.kernel;
loader =
- if cfg.loader == "grub"
+ if cfg.loader == "none" || cfg.loader == "out-of-band"
+ then {
+ grub.enable = false;
+ }
+ else if cfg.loader == "grub"
then {
grub = {
enable = true;
@@ -30,12 +34,14 @@ in {
efiSupport = true;
};
}
- else {
+ else if cfg.loader == "systemd-boot"
+ then {
systemd-boot = {
enable = true;
editor = true;
};
- };
+ }
+ else throw "unexpected config.local.boot.loader setting: ${cfg.loader}";
};
};
}