mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-17 14:49:10 +02:00
wip: migrate client modules
This commit is contained in:
parent
f6d2ff1544
commit
7ce27d5d2f
245 changed files with 20254 additions and 188 deletions
29
modules-clone/nixos/common/lanzaboote.nix
Normal file
29
modules-clone/nixos/common/lanzaboote.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, pkgs, config, minimal, ... }:
|
||||
let
|
||||
inherit (config.swarselsystems) isSecureBoot isImpermanence;
|
||||
in
|
||||
{
|
||||
options.swarselmodules.lanzaboote = lib.mkEnableOption "lanzaboote config";
|
||||
config = lib.mkIf config.swarselmodules.lanzaboote {
|
||||
|
||||
environment.systemPackages = lib.mkIf isSecureBoot [
|
||||
pkgs.sbctl
|
||||
];
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (isImpermanence && isSecureBoot) {
|
||||
directories = [{ directory = "/var/lib/sbctl"; }];
|
||||
};
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = lib.swarselsystems.mkIfElse (minimal || !isSecureBoot) (lib.mkForce true) (lib.mkForce false);
|
||||
};
|
||||
lanzaboote = lib.mkIf (!minimal && isSecureBoot) {
|
||||
enable = true;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
configurationLimit = 6;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue