nixos-configuration/hosts/copper/hardware-configuration.nix
2024-05-29 01:55:11 +02:00

43 lines
1.2 KiB
Nix

{ config, lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
luks.devices."copper-crypt".device = "/dev/disk/by-uuid/0687579d-83e3-4a0c-a63a-3d8566456924";
};
fileSystems =
let
bootDev = "/dev/disk/by-uuid/FF86-D9B6";
btrfsDev = "/dev/disk/by-uuid/16109d28-7ba1-403e-9bb3-3a8da8838c1f";
in
{
"/" = {
device = btrfsDev;
fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" ];
};
"/home" = {
device = btrfsDev;
fsType = "btrfs";
options = [ "subvol=home" "compress=zstd" "nodev" "nosuid" ];
};
"/nix" = {
device = btrfsDev;
fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" "noatime" "nodev" ];
};
"/boot" = {
device = bootDev;
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" "nodev" "nosuid" "noexec" ];
};
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}