37 lines
692 B
Nix
37 lines
692 B
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
machineProps,
|
|
...
|
|
}:
|
|
with lib;
|
|
{
|
|
options.my.systemd-boot.enable = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
example = false;
|
|
description = ''
|
|
Whether or not enable the default systemd boot system.
|
|
Can be useful for devices using u-boot.
|
|
'';
|
|
};
|
|
|
|
config.environment.systemPackages = lib.mkIf config.my.systemd-boot.enable [ pkgs.sbctl ];
|
|
config.boot =
|
|
{
|
|
loader.systemd-boot.enable = false;
|
|
}
|
|
// (
|
|
if config.my.systemd-boot.enable then
|
|
{
|
|
lanzaboote = {
|
|
enable = true;
|
|
pkiBundle = "/etc/secureboot";
|
|
};
|
|
}
|
|
else
|
|
{ }
|
|
);
|
|
}
|