snowfall lib migration wip

This commit is contained in:
Aleksandr Lebedev 2025-08-07 18:07:27 +02:00
parent b9dadac2af
commit ed08a98651
31 changed files with 1067 additions and 172 deletions

View file

@ -0,0 +1,38 @@
{
lib,
pkgs,
inputs,
namespace,
system,
target,
format,
virtual,
systems,
config,
...
}:
with lib;
with lib.${namespace}; let
cfg = config.${namespace}.hardware.secureBoot;
in {
options.${namespace}.hardware.secureBoot = with types; {
enable = mkBoolOpt false "Enable support for secure boot. Note: Secure boot should still be configured imperatively. This module only handles the declarative part.";
};
config = mkIf cfg.enable {
boot = {
initrd.systemd.enable = true;
lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
};
environment.systemPackages = with pkgs; [
# For debugging and troubleshooting Secure Boot.
sbctl
# For tpm auto unlock
tpm2-tss
];
};
}