- my.disks generates disko: NVMe btrfs (@root/@home/@nix/@log/@swap) + SATA SSD btrfs with one subvolume per ~/Games, Downloads, Documents, Music, Pictures, Videos, Storage (nofail) - lanzaboote Secure Boot, systemd initrd, latest kernel - AMD CPU/GPU: amdgpu initrd, OpenCL, LACT, optional ROCm - agenix with host-key identity, optional password and SSH key secrets - Hyprland (UWSM, XWayland) + greetd/tuigreet, Noctalia services, PipeWire, fonts - Steam + Proton-GE, gamescope, gamemode - overlays: compose Hyprland's hyprland-packages + hyprland-extras (upstream default lacks the hyprwm dependency overlays) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J1cugeLkfFLZMpiztQ8TyN
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
# Bootloader: lanzaboote (Secure Boot) or plain systemd-boot, plus kernel.
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.boot;
|
|
in
|
|
{
|
|
options.my.boot.secureBoot.enable = lib.mkEnableOption ''
|
|
Secure Boot through lanzaboote. Keys live in /var/lib/sbctl (create them
|
|
with `sbctl create-keys` before the first boot). When disabled the system
|
|
uses plain systemd-boot
|
|
'';
|
|
|
|
config = lib.mkMerge [
|
|
{
|
|
boot = {
|
|
loader.efi.canTouchEfiVariables = true;
|
|
initrd.systemd.enable = true;
|
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
|
};
|
|
}
|
|
|
|
(lib.mkIf cfg.secureBoot.enable {
|
|
boot = {
|
|
lanzaboote = {
|
|
enable = true;
|
|
pkiBundle = "/var/lib/sbctl";
|
|
configurationLimit = 10;
|
|
};
|
|
# lanzaboote installs the boot entries itself.
|
|
loader.systemd-boot.enable = lib.mkForce false;
|
|
};
|
|
|
|
environment.systemPackages = [ pkgs.sbctl ];
|
|
})
|
|
|
|
(lib.mkIf (!cfg.secureBoot.enable) {
|
|
boot.loader.systemd-boot = {
|
|
enable = true;
|
|
configurationLimit = 10;
|
|
editor = false;
|
|
};
|
|
})
|
|
];
|
|
}
|