aboutsummaryrefslogtreecommitdiff
path: root/nix/modules/secure-boot.nix
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@gmail.com>2025-01-13 22:11:02 -0800
committerPreston Pan <ret2pop@gmail.com>2025-01-13 22:11:02 -0800
commitdd461e48043dabee4694e2b200f4c1d9cfdbc3d9 (patch)
treebc6c481be908e92e52d7828caf17365d00f5e7b7 /nix/modules/secure-boot.nix
parentd878a0353ba8cec87df4f79d59864c92b1ea4cea (diff)
merge these two repos into one
Diffstat (limited to 'nix/modules/secure-boot.nix')
-rw-r--r--nix/modules/secure-boot.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nix/modules/secure-boot.nix b/nix/modules/secure-boot.nix
new file mode 100644
index 0000000..0785835
--- /dev/null
+++ b/nix/modules/secure-boot.nix
@@ -0,0 +1,20 @@
+{ pkgs, lib, config, inputs, ... }:
+{
+ imports = [
+ inputs.lanzaboote.nixosModules.lanzaboote
+ ];
+
+ options = {
+ secure-boot.enable = lib.mkEnableOption "Enables secure boot on system";
+ };
+
+ config = lib.mkIf config.secure-boot.enable {
+ boot = {
+ loader.systemd-boot.enable = lib.mkForce false;
+ lanzaboote = {
+ enable = true;
+ pkiBundle = "/etc/secureboot";
+ };
+ };
+ };
+}