chore: nix fmt
This commit is contained in:
parent
a80bd4ed3b
commit
7266fff06e
128 changed files with 3402 additions and 2013 deletions
|
@ -1,12 +1,21 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ... }: with lib; let
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.global.boot;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.global.boot = {
|
||||
enable = mkEnableOption "bootloader installation and maintenance" // { default = true; };
|
||||
systemd-boot = mkEnableOption "generation selection via systemd-boot" // { default = !cfg.lanzaboote; };
|
||||
enable = mkEnableOption "bootloader installation and maintenance" // {
|
||||
default = true;
|
||||
};
|
||||
systemd-boot = mkEnableOption "generation selection via systemd-boot" // {
|
||||
default = !cfg.lanzaboote;
|
||||
};
|
||||
lanzaboote = mkEnableOption "secure boot maintenance via lanzaboote";
|
||||
memtest = mkOption {
|
||||
type = with types; nullOr int;
|
||||
|
@ -15,21 +24,23 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
sbPath = "/nix/persist/lanzaboote";
|
||||
in mkIf cfg.enable {
|
||||
boot = {
|
||||
initrd.systemd.enable = true;
|
||||
lanzaboote.enable = cfg.lanzaboote;
|
||||
lanzaboote.pkiBundle = sbPath;
|
||||
loader.systemd-boot.enable = cfg.systemd-boot;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
tmp.cleanOnBoot = true;
|
||||
kernelParams = optional (cfg.memtest != null) "memtest=${toString cfg.memtest}";
|
||||
};
|
||||
config =
|
||||
let
|
||||
sbPath = "/nix/persist/lanzaboote";
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
boot = {
|
||||
initrd.systemd.enable = true;
|
||||
lanzaboote.enable = cfg.lanzaboote;
|
||||
lanzaboote.pkiBundle = sbPath;
|
||||
loader.systemd-boot.enable = cfg.systemd-boot;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
tmp.cleanOnBoot = true;
|
||||
kernelParams = optional (cfg.memtest != null) "memtest=${toString cfg.memtest}";
|
||||
};
|
||||
|
||||
# symlink for sbctl
|
||||
environment.etc.secureboot.source = sbPath;
|
||||
environment.systemPackages = [ pkgs.sbctl ];
|
||||
};
|
||||
# symlink for sbctl
|
||||
environment.etc.secureboot.source = sbPath;
|
||||
environment.systemPackages = [ pkgs.sbctl ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue