Files
nix-config/modules/nixos/boot/systemd-boot/default.nix
mjallen18 70002a19e2 hmm
2026-04-07 18:39:42 -05:00

35 lines
631 B
Nix
Executable File

{
config,
lib,
namespace,
...
}:
with lib;
let
inherit (lib.${namespace}) mkOpt;
cfg = config.${namespace}.boot.systemd-boot;
in
{
options.${namespace}.boot.systemd-boot = {
enable = mkEnableOption "enable systemd-boot";
configLimit = mkOpt types.int 10 "Number of boot items to keep";
};
config = mkIf cfg.enable {
boot = {
loader = {
systemd-boot = {
enable = mkDefault true;
configurationLimit = cfg.configLimit;
};
efi = {
canTouchEfiVariables = mkDefault true;
efiSysMountPoint = "/boot";
};
};
};
};
}