speer: Enable secure boot

This commit is contained in:
Fabian Hauser 2025-02-22 23:29:23 +02:00
parent 1f4d922fbe
commit 460ad8d057
5 changed files with 30 additions and 5 deletions

View file

@ -35,7 +35,6 @@
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.systemd.enable = true;
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";

View file

@ -17,6 +17,4 @@
services.fwupd.daemonSettings.EspLocation = pkgs.lib.mkForce config.disko.devices.disk.system-1.content.partitions.boot.content.mountpoint;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

View file

@ -1,4 +1,29 @@
{ inputs, ... }:
{
inputs,
pkgs,
lib,
...
}:
{
imports = [ inputs.lanzaboote.nixosModules.lanzaboote ];
environment.systemPackages = [
# For debugging and troubleshooting Secure Boot.
pkgs.sbctl
];
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.systemd.enable = true;
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
}

View file

@ -26,7 +26,6 @@
pwgen
powertop
lm_sensors
sbctl
]
++ [
nixfmt-rfc-style

4
setup.md Normal file
View file

@ -0,0 +1,4 @@
# Setup
See https://github.com/nix-community/lanzaboote/blob/master/docs/QUICK_START.md for instructions on how to enroll lanzaboote secure boot.