enable lanzaboote

This commit is contained in:
nyxerinys 2026-10-02 18:33:05 -05:00
parent 31c4db1e15
commit d223de2604
5 changed files with 65 additions and 39 deletions

View file

@ -38,7 +38,10 @@
url = "git+ssh://git@git.nyxerinys.dev:222/nyxerinys/nix-secrets"; url = "git+ssh://git@git.nyxerinys.dev:222/nyxerinys/nix-secrets";
flake = false; flake = false;
}; };
lanzaboote = {
url = "github:nix-community/lanzaboote/v1.2.0";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, nix-darwin, home-manager, ... } @ inputs: outputs = { self, nixpkgs, nix-darwin, home-manager, ... } @ inputs:

View file

@ -0,0 +1,16 @@
{ ... }:
{
services.getty = {
autologinUser = "nyxerinys";
autologinOnce = true;
};
systemd.defaultUnit = "graphical.target";
programs.zsh.loginShellInit = ''
if [[ "$TTY" == "/dev/tty1" ]] && uwsm check may-start; then
exec uwsm start hyprland-uwsm.desktop
fi
'';
}

View file

@ -1,7 +1,25 @@
{ pkgs, lib, inputs, ... }: { pkgs, lib, inputs, ... }:
{ {
boot.initrd = { imports = [
lanzaboote.nixosModules.lanzaboote
];
boot = {
#Bootloader
environment.systemPackages = [ pkgs.sbctl ];
lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
autoGenerateKeys.enable = true;
autoEnrollKeys.enable = true;
};
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot.enable = lib.mkForce false;
# Luks Decryption for ZFS
initrd = {
supportedFilesystems = [ "ext4" "zfs" ]; supportedFilesystems = [ "ext4" "zfs" ];
availableKernelModules = [ "hid_apple" ]; availableKernelModules = [ "hid_apple" ];
systemd = { systemd = {
@ -30,6 +48,7 @@
}; };
}; };
};
systemd.services."zfs-import-nix-main" = { systemd.services."zfs-import-nix-main" = {
wants = [ "keys.mount" ]; wants = [ "keys.mount" ];

View file

@ -4,6 +4,7 @@
imports = [ imports = [
./boot.nix ./boot.nix
./hardware.nix ./hardware.nix
./autologin.nix
]; ];
networking.hostName = "apollo"; networking.hostName = "apollo";
@ -19,17 +20,4 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
kitty kitty
]; ];
services.getty = {
autologinUser = "nyxerinys";
autologinOnce = true;
};
systemd.defaultUnit = "graphical.target";
programs.zsh.loginShellInit = ''
if [[ "$TTY" == "/dev/tty1" ]] && uwsm check may-start; then
exec uwsm start hyprland-uwsm.desktop
fi
'';
} }

View file

@ -17,7 +17,7 @@
devices = ["nodev"]; devices = ["nodev"];
}; };
}; };
kernelParams = lib.mkDefault [ "ipv6.disable=1" ]; kernelParams = [ "ipv6.disable=1" ];
}; };
# system.autoUpgrade = mkDefault { # system.autoUpgrade = mkDefault {