nixOS/hardware-configuration.nix

51 lines
1.7 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ThinkPad P14s Gen 6 AMD (Ryzen AI 7 PRO 350, Strix Point)
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/mapper/luks-71c97ce7-dd29-4b07-8d2a-8cc3985a65bd";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-71c97ce7-dd29-4b07-8d2a-8cc3985a65bd".device = "/dev/disk/by-uuid/71c97ce7-dd29-4b07-8d2a-8cc3985a65bd";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8895-7EE4";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/mnt/arch" =
{ device = "/dev/disk/by-uuid/15ae8384-3dfc-4915-9201-66ecfc5f230d";
fsType = "btrfs";
options = [ "subvol=@" "nofail" ];
};
fileSystems."/mnt/data" =
{ device = "/dev/disk/by-uuid/2323a69f-8c95-484b-919b-a524213a33ca";
fsType = "ext4";
options = [ "nofail" ];
};
# Encrypted swapfile on LUKS root, sized for hibernate (RAM + headroom).
# NixOS auto-creates the file and computes resume offset on activation.
swapDevices = [
{ device = "/var/swapfile"; size = 59392; } # 58 GiB, RAM is 54 GiB
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}