diff options
| author | aristote <quentin.aristote@irif.fr> | 2025-07-29 15:25:11 +0200 |
|---|---|---|
| committer | aristote <quentin.aristote@irif.fr> | 2025-07-29 15:25:11 +0200 |
| commit | fc019d789523ce5f89436b8dbc458cf3b79abf43 (patch) | |
| tree | ec56fd1b1ed9fc75096c0b09db48a152975e4d53 /modules/nixos/personal/boot.nix | |
| parent | a3d19bc509d9f39fb41256cd55d2bd7706de202f (diff) | |
reformat everything with nixfmt
Diffstat (limited to 'modules/nixos/personal/boot.nix')
| -rw-r--r-- | modules/nixos/personal/boot.nix | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/nixos/personal/boot.nix b/modules/nixos/personal/boot.nix index 149d9b9..bde1ab0 100644 --- a/modules/nixos/personal/boot.nix +++ b/modules/nixos/personal/boot.nix @@ -2,9 +2,11 @@ config, lib, ... -}: let +}: +let cfg = config.personal.boot; -in { +in +{ options.personal.boot = { grub.enable = lib.mkEnableOption "grub"; efi.enable = lib.mkEnableOption "EFI"; @@ -16,7 +18,7 @@ in { (lib.mkIf cfg.grub.enable { grub = { enable = true; - enableCryptodisk = config.boot.initrd.luks.devices != {}; + enableCryptodisk = config.boot.initrd.luks.devices != { }; device = lib.mkDefault "nodev"; }; }) @@ -26,9 +28,10 @@ in { }) ]; - initrd = let - crypt = config.personal.hardware.disks.crypted; - in + initrd = + let + crypt = config.personal.hardware.disks.crypted; + in lib.mkIf (cfg.unattendedReboot && crypt != null) { secrets."/keyfile.luks" = /etc/luks/keys/tmp; luks.devices.crypt = { |
