From dd461e48043dabee4694e2b200f4c1d9cfdbc3d9 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Mon, 13 Jan 2025 22:11:02 -0800 Subject: merge these two repos into one --- nix/modules/secure-boot.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 nix/modules/secure-boot.nix (limited to 'nix/modules/secure-boot.nix') 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"; + }; + }; + }; +} -- cgit