mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-09-19 16:49:04 +05:30
style: format code
This commit is contained in:
@@ -1,43 +1,39 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.modules.nixos.boot =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.tnix.boot;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.lanzaboote.nixosModules.lanzaboote ];
|
||||
{inputs, ...}: {
|
||||
flake.modules.nixos.boot = {
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.tnix.boot;
|
||||
in {
|
||||
imports = [inputs.lanzaboote.nixosModules.lanzaboote];
|
||||
|
||||
options.tnix.boot.secure-boot = {
|
||||
enable = lib.mkEnableOption "Enable secure-boot";
|
||||
};
|
||||
options.tnix.boot.secure-boot = {
|
||||
enable = lib.mkEnableOption "Enable secure-boot";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.secure-boot.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !cfg.legacy.enable;
|
||||
message = "secure-boot and legacy boot (GRUB) cannot be enabled at the same time";
|
||||
}
|
||||
];
|
||||
config = lib.mkIf cfg.secure-boot.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !cfg.legacy.enable;
|
||||
message = "secure-boot and legacy boot (GRUB) cannot be enabled at the same time";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.sbctl ];
|
||||
environment.systemPackages = [pkgs.sbctl];
|
||||
|
||||
# Lanzaboote replaces systemd-boot, so force it off
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
# Lanzaboote replaces systemd-boot, so force it off
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
autoGenerateKeys.enable = true;
|
||||
autoEnrollKeys.enable = true;
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
autoGenerateKeys.enable = true;
|
||||
autoEnrollKeys.enable = true;
|
||||
|
||||
configurationLimit = 10;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
};
|
||||
configurationLimit = 10;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user