infrastructure/hosts/thalassa/aoife/hardware.nix
2024-07-07 10:08:10 +02:00

73 lines
1.4 KiB
Nix

{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
pciutils
usbutils
lshw
];
hardware = {
enableAllFirmware = true;
bluetooth.enable = true;
# OpenGL + Vulkan
opengl = {
enable = true;
extraPackages = with pkgs; [
amdvlk
rocm-opencl-icd
rocm-opencl-runtime
mesa.drivers
];
};
};
services = {
fwupd.enable = true;
hardware.bolt.enable = true;
fprintd = {
enable = true;
# fprintd test suite fails
package = pkgs.fprintd.overrideAttrs {
mesonCheckFlags = [
"--no-suite"
"fprintd:TestPamFprintd"
];
};
};
# Video Driver
xserver = {
dpi = 280;
xkb.options = "caps:swapescape";
};
# SSD Trim
fstrim.enable = true;
# Power Management
upower.enable = true;
thermald.enable = true;
};
# hardware.trackpoint.enable = true;
# FS
fileSystems."/".options = [ "compress=zstd" ];
powerManagement = {
enable = true;
powertop.enable = true;
};
security = {
tpm2 = {
# tpm
enable = true;
pkcs11.enable = true; # expose /run/current-system/sw/lib/libtpm2_pkcs11.so
tctiEnvironment.enable = true;
};
}; # TPM2TOOLS_TCTI and TPM2_PKCS11_TCTI env variables
users.users.vivian.extraGroups = [ "tss" ]; # tss group has access to TPM devices
}