From 7a6f4790282d001e2c7adbdaa4806f8beed02ddb Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Wed, 23 Jul 2025 20:37:33 -0600 Subject: sys/boot: rename sb.nix -> secure-boot.nix --- sys/boot/default.nix | 2 +- sys/boot/sb.nix | 37 ------------------------------------- sys/boot/secure-boot.nix | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 sys/boot/sb.nix create mode 100644 sys/boot/secure-boot.nix (limited to 'sys') diff --git a/sys/boot/default.nix b/sys/boot/default.nix index 157ba0e..73fe5d6 100644 --- a/sys/boot/default.nix +++ b/sys/boot/default.nix @@ -7,7 +7,7 @@ ./fscrypt.nix ./impermanence.nix ./namespaced.nix - ./sb.nix + ./secure-boot.nix ./stack ]; } diff --git a/sys/boot/sb.nix b/sys/boot/sb.nix deleted file mode 100644 index bdf7f0f..0000000 --- a/sys/boot/sb.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, lib, pkgs, ... }: -with lib; let - cfg = config.local.boot.secureBoot; -in -{ - options.local.boot.secureBoot = { - enable = mkEnableOption "secure boot"; - }; - - config = mkIf cfg.enable { - assertions = [ - { - assertion = config.local.boot.efi.enable; - message = "secure boot requires EFI"; - } - { - assertion = config.local.boot.loader == "systemd-boot"; - message = "lanzaboote requires systemd-boot"; - } - ]; - - boot = { - loader.systemd-boot.enable = mkForce false; - - lanzaboote = { - enable = true; - pkiBundle = "/etc/secureboot"; - }; - }; - - environment.systemPackages = [ - pkgs.sbctl - ]; - - local.boot.impermanence.directories = [ "/etc/secureboot" ]; - }; -} diff --git a/sys/boot/secure-boot.nix b/sys/boot/secure-boot.nix new file mode 100644 index 0000000..bdf7f0f --- /dev/null +++ b/sys/boot/secure-boot.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: +with lib; let + cfg = config.local.boot.secureBoot; +in +{ + options.local.boot.secureBoot = { + enable = mkEnableOption "secure boot"; + }; + + config = mkIf cfg.enable { + assertions = [ + { + assertion = config.local.boot.efi.enable; + message = "secure boot requires EFI"; + } + { + assertion = config.local.boot.loader == "systemd-boot"; + message = "lanzaboote requires systemd-boot"; + } + ]; + + boot = { + loader.systemd-boot.enable = mkForce false; + + lanzaboote = { + enable = true; + pkiBundle = "/etc/secureboot"; + }; + }; + + environment.systemPackages = [ + pkgs.sbctl + ]; + + local.boot.impermanence.directories = [ "/etc/secureboot" ]; + }; +} -- cgit v1.2.3