summaryrefslogtreecommitdiff
path: root/systems/glados/boot.nix
blob: c88c82bfe76de5a804ab492c277a5d47f8a261c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  lib,
  pkgs,
  inputs,
  ...
}:
{
  imports = [ inputs.lanzaboote.nixosModules.lanzaboote ];

  environment.systemPackages = with pkgs; [
    # manual lanzaboote maintenance (NOTE: i have not actually used this since ~2022)
    sbctl
    # TODO: is this actually required for using `tpm2-device=auto` to unlock LUKS volumes in initrd? probably
    tpm2-tss
  ];

  boot = {
    initrd.systemd.enable = true;
    kernelPackages = pkgs.linuxPackages_latest;

    kernelParams = [ "amd_pstate=active" ];

    # lanzaboote replaces this
    loader.systemd-boot.enable = lib.mkForce false;

    lanzaboote = {
      enable = true;
      pkiBundle = "/etc/secureboot";
    };

    # for game drive
    supportedFilesystems = [ "ntfs" ];
  };
}