2023-11-24 09:57:15 +01:00
|
|
|
{ pkgs, lib, agenix, ... }:
|
|
|
|
{
|
|
|
|
age.identityPaths = [ "/nix/persist/system/etc/ssh/ssh_host_ed25519_key" ];
|
|
|
|
security = {
|
2024-02-11 20:00:53 +01:00
|
|
|
sudo.enable = false;
|
|
|
|
sudo-rs.enable = true;
|
2023-11-24 09:57:15 +01:00
|
|
|
polkit.enable = true;
|
|
|
|
tpm2 = {
|
|
|
|
enable = true;
|
|
|
|
pkcs11.enable = true;
|
|
|
|
abrmd.enable = true;
|
|
|
|
tctiEnvironment.enable = true;
|
|
|
|
};
|
2023-12-17 17:27:14 +01:00
|
|
|
pam = {
|
|
|
|
u2f = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
services = {
|
|
|
|
login.u2fAuth = true;
|
|
|
|
sudo.u2fAuth = true;
|
|
|
|
};
|
|
|
|
};
|
2023-11-24 09:57:15 +01:00
|
|
|
};
|
|
|
|
services = {
|
|
|
|
fprintd.enable = true; # log in using fingerprint
|
|
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
agenix.packages.x86_64-linux.default
|
|
|
|
tpm2-tools
|
|
|
|
sbctl
|
|
|
|
];
|
|
|
|
# enable secure boot using lanzaboote
|
|
|
|
boot = {
|
|
|
|
# Lanzaboote currently replaces the systemd-boot module.
|
|
|
|
# This setting is usually set to true in configuration.nix
|
|
|
|
# generated at installation time. So we force it to false
|
|
|
|
# for now.
|
2024-03-23 00:31:32 +01:00
|
|
|
loader.systemd-boot.enable = lib.mkForce false;
|
|
|
|
lanzaboote = {
|
|
|
|
enable = true;
|
|
|
|
pkiBundle = "/etc/secureboot";
|
|
|
|
configurationLimit = 10;
|
|
|
|
};
|
|
|
|
loader.systemd-boot.editor = false;
|
|
|
|
loader.efi.canTouchEfiVariables = true;
|
2023-11-24 09:57:15 +01:00
|
|
|
};
|
|
|
|
}
|