nixfiles/hosts/koi/hardware-configuration.nix

53 lines
1.7 KiB
Nix
Raw Normal View History

2024-01-08 07:49:51 +03:00
{ config, abs, lib, pkgs, modulesPath, ... }@inputs:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "uas" "usb_storage" "sd_mod" "tpm_crb" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/49a88223-231b-4fe4-8d2f-13799a3fad32";
fsType = "ext4";
};
fileSystems."/boot" = {
2024-11-13 22:56:04 +03:00
device = "/dev/disk/by-path/pci-0000:01:00.0-nvme-1-part1";
2024-01-08 07:49:51 +03:00
fsType = "vfat";
};
fileSystems."/mnt/puffer" =
{
device = "/dev/mapper/puffer";
fsType = "ext4";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/c418bb69-15cf-4d47-b9a0-0cf7191551da"; }];
boot.initrd.luks.devices.root = {
2024-11-13 22:56:04 +03:00
device = "/dev/disk/by-path/pci-0000:01:00.0-nvme-1-part2";
2024-01-08 07:49:51 +03:00
preLVM = true;
allowDiscards = true;
};
boot.initrd.luks.devices.puffer = {
2024-11-13 22:56:04 +03:00
device = "/dev/disk/by-path/pci-0000:04:00.3-usb-0:4:1.0-scsi-0:0:0:0-part1";
2024-01-08 07:49:51 +03:00
preLVM = true;
allowDiscards = true;
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2024-03-17 05:59:15 +03:00
hardware.firmware = [ pkgs.alsa-firmware ];
2024-01-08 07:49:51 +03:00
}