Files
imladris/hw/straylight/hardware-configuration.nix
Kyle Isom a8e43936cf pass #2
following random blogs doesn't always work
2026-04-01 23:53:00 -07:00

48 lines
1.3 KiB
Nix

# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.fido2Support = true;
boot.initrd.luks.devices."luks-922e2c13-35bc-40de-a829-716b9368e4a7" = {
device = "/dev/disk/by-uuid/922e2c13-35bc-40de-a829-716b9368e4a7";
#fido2.credential = "<credential-hex-string>";
#fido2.passwordLess = true;
};
fileSystems."/" =
{ device = "/dev/mapper/luks-922e2c13-35bc-40de-a829-716b9368e4a7";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9BAD-52AA";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/home" = {
device = "/dev/mapper/home-crypt";
fsType = "ext4";
options = [ "defaults" ];
};
environment.etc.crypttab.text = ''
home-crypt UUID=edfdcdf4-083a-4826-a1f8-9670545e0bc5 /etc/secrets/home.key luks
'';
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}