nixos/hardware-configuration.nix

60 lines
2 KiB
Nix
Raw Permalink Normal View History

2024-09-03 12:59:04 +02:00
# 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 + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "ehci_pci" "usb_storage" "usbhid" "sd_mod" "sr_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" "radeon.cik_support=0" "amdgpu.cik_support=1" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "none";
fsType = "tmpfs";
options = [ "defaults" "size=2G" "mode=755" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/a1872869-9d8d-4ef2-9fce-16cb0a562e6c";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/persist" =
{ device = "/dev/disk/by-uuid/a1872869-9d8d-4ef2-9fce-16cb0a562e6c";
fsType = "btrfs";
options = [ "subvol=persist" ];
neededForBoot = true;
};
fileSystems."/swap" =
{ device = "/dev/disk/by-uuid/a1872869-9d8d-4ef2-9fce-16cb0a562e6c";
fsType = "btrfs";
options = [ "subvol=swap" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3b635ee4-a134-4d2b-af7d-36e3930314d9";
fsType = "ext4";
};
swapDevices = [ { device = "/swap/swapfile"; } ];
# 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;
hardware.enableRedistributableFirmware = true;
hardware.cpu.amd.updateMicrocode = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}