2024-09-27 00:36:41 -05:00
|
|
|
{
|
|
|
|
modulesPath,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
pkiBundlePath = "/etc/secureboot";
|
|
|
|
in
|
2024-05-03 14:35:00 -05:00
|
|
|
{
|
|
|
|
|
2024-05-24 17:18:15 -05:00
|
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
2024-05-03 14:35:00 -05:00
|
|
|
|
2024-07-24 22:16:17 -05:00
|
|
|
security.tpm2.enable = true;
|
2024-09-27 00:36:41 -05:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
tpm2-tss
|
|
|
|
sbctl
|
|
|
|
];
|
2024-07-24 22:16:17 -05:00
|
|
|
|
2024-08-24 23:38:27 -05:00
|
|
|
services.btrfs-rollback = {
|
|
|
|
enable = true;
|
|
|
|
diskLabel = "NixOS-Primary";
|
|
|
|
subvolume = "root";
|
|
|
|
snapshot = "root-base";
|
|
|
|
};
|
|
|
|
|
2024-09-27 00:36:41 -05:00
|
|
|
environment.persistence.ephemeral.directories = [
|
|
|
|
pkiBundlePath
|
|
|
|
];
|
|
|
|
|
2024-05-03 14:35:00 -05:00
|
|
|
boot = {
|
2024-09-27 00:36:41 -05:00
|
|
|
lanzaboote = {
|
|
|
|
enable = true;
|
|
|
|
pkiBundle = pkiBundlePath;
|
|
|
|
};
|
2024-05-03 14:35:00 -05:00
|
|
|
loader = {
|
2024-09-27 00:36:41 -05:00
|
|
|
systemd-boot.enable = lib.mkForce false;
|
2024-05-03 14:35:00 -05:00
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
2024-07-01 22:41:24 -05:00
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2024-05-03 14:35:00 -05:00
|
|
|
kernelModules = [ "kvm-intel" ];
|
|
|
|
extraModulePackages = [ ];
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules = [
|
|
|
|
"xhci_pci"
|
2024-05-24 17:18:15 -05:00
|
|
|
"thunderbolt"
|
|
|
|
"vmd"
|
|
|
|
"nvme"
|
|
|
|
"usbhid"
|
|
|
|
"rtsx_pci_sdmmc"
|
2024-05-03 14:35:00 -05:00
|
|
|
];
|
|
|
|
systemd = {
|
2024-10-03 03:40:23 -05:00
|
|
|
tpm2.enable = true;
|
2024-05-03 14:35:00 -05:00
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-09-27 02:36:09 -05:00
|
|
|
}
|