Begin the move to the import all, activate by config model
This commit is contained in:
parent
7397b614de
commit
07cb2d67a2
97 changed files with 776 additions and 633 deletions
8
modules/system/devices/boot/default.nix
Normal file
8
modules/system/devices/boot/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./extlinux
|
||||
./lanzaboote
|
||||
./systemd
|
||||
];
|
||||
}
|
|
@ -1,7 +1,18 @@
|
|||
{ ... }:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
boot.loader = {
|
||||
generic-extlinux-compatible.enable = true;
|
||||
grub.enable = false;
|
||||
options.system.extlinux = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Lanzaboote and force disable Systemd-boot";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.system.extlinux.enable {
|
||||
boot.loader = {
|
||||
generic-extlinux-compatible.enable = true;
|
||||
systemd-boot.enable = lib.mkForce false;
|
||||
grub.enable = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,15 +1,25 @@
|
|||
{ lanzaboote, pkgs, ... }:
|
||||
{ lanzaboote, lib, config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
imports = [ lanzaboote.nixosModules.lanzaboote ];
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
options.system.lanzaboote = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Lanzaboote and force disable Systemd-boot";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
sbctl
|
||||
];
|
||||
config = lib.mkIf config.system.lanzaboote.enable {
|
||||
boot = {
|
||||
loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ sbctl ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue