From a45c4551712c1ba5cb82eaf290f311ab0e8690e4 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Mon, 9 Jun 2025 17:40:46 +0000 Subject: big changes --- modules/boot/system/default.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 modules/boot/system/default.nix (limited to 'modules/boot/system/default.nix') diff --git a/modules/boot/system/default.nix b/modules/boot/system/default.nix new file mode 100644 index 0000000..e32601c --- /dev/null +++ b/modules/boot/system/default.nix @@ -0,0 +1,37 @@ +{ + pkgs, + config, + lib, + ... +}: let + cfg = config.collinux.boot; +in { + imports = [ + ./plymouth.nix + ]; + + boot = + { + initrd = { + verbose = false; + systemd.enable = true; + }; + loader = { + systemd-boot = lib.optionalAttrs (cfg.bootloader == "systemd-boot" && !cfg.secureBoot.enable) { + enable = true; + configurationLimit = 3; + }; + grub = lib.optionalAttrs (cfg.bootloader == "grub") {enable = true;}; + efi.canTouchEfiVariables = true; + timeout = 0; + }; + } + // (lib.optionalAttrs cfg.secureBoot.enable { + lanzaboote = { + enable = true; + pkiBundle = "/var/lib/sbctl"; + }; + }); + + environment.systemPackages = lib.mkIf cfg.secureBoot.enable [pkgs.sbctl]; +} -- cgit v1.3.1