nixos-config/config/secureboot.nix

24 lines
529 B
Nix
Raw Normal View History

2022-06-12 15:39:15 +00:00
{
pkgs,
config,
...
}: {
2022-04-20 07:35:17 +00:00
imports = [
../modules/systemd-secure-boot
# ../modules/systemd-cryptsetup.nix # broken
2022-04-20 07:35:17 +00:00
];
2022-06-12 15:39:15 +00:00
sops.secrets."secureboot/DB.key" = {};
2022-04-20 07:35:17 +00:00
boot.loader.systemd-boot = {
editor = false;
secureBoot = {
enable = true;
keyPath = config.sops.secrets."secureboot/DB.key".path;
certPath = builtins.toString ../efi/DB.crt;
};
};
system.extraSystemBuilderCmds = ''
substituteAll ${../extra/switch-to-configuration.pl} $out/bin/switch-to-configuration
'';
2022-04-20 07:35:17 +00:00
}