nixos-config/modules/common/boot.nix

37 lines
692 B
Nix
Raw Permalink Normal View History

2024-07-28 11:15:10 +02:00
{
lib,
config,
pkgs,
machineProps,
2024-07-28 11:15:10 +02:00
...
}:
with lib;
{
2024-08-01 21:40:51 +02:00
options.my.systemd-boot.enable = mkOption {
type = types.bool;
default = true;
example = false;
description = ''
2024-07-28 11:15:10 +02:00
Whether or not enable the default systemd boot system.
Can be useful for devices using u-boot.
'';
};
2024-08-01 21:40:51 +02:00
config.environment.systemPackages = lib.mkIf config.my.systemd-boot.enable [ pkgs.sbctl ];
config.boot =
{
loader.systemd-boot.enable = false;
}
// (
2024-08-01 21:40:51 +02:00
if config.my.systemd-boot.enable then
{
lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
}
else
{ }
2024-04-11 20:15:47 +02:00
);
}