my nix configs for my servers and desktop
1# Do not modify this file! It was generated by ‘nixos-generate-config’ 2# and may be overwritten by future invocations. Please make changes 3# to /etc/nixos/configuration.nix instead. 4{ config, lib, pkgs, modulesPath, ... }: 5 6{ 7 imports = 8 [ (modulesPath + "/installer/scan/not-detected.nix") 9 ]; 10 11 boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ]; 12 boot.initrd.kernelModules = [ 13 "vfio" "vfio_iommu_type1" "vfio_pci" 14 "nvidia" "nvidia-modeset" "nvidia_uvm" "nvidia_drm" 15 ]; 16 boot.kernelModules = [ "kvm-amd" ]; 17 boot.kernelParams = [ 18 "amd_iommu=on" 19 "vfio-pci.ids=10de:2484,10de228b,1022:149c,15b7:5045" 20 ]; 21 boot.extraModulePackages = [ ]; 22 23 fileSystems."/" = 24 { device = "/dev/disk/by-uuid/2009b305-f22d-4d5c-a9d3-c49a2303232b"; 25 fsType = "ext4"; 26 }; 27 28 fileSystems."/boot" = 29 { device = "/dev/disk/by-uuid/E53C-502F"; 30 fsType = "vfat"; 31 options = [ "fmask=0077" "dmask=0077" ]; 32 }; 33 34 swapDevices = [ ]; 35 36 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 37 # (the default) this is the recommended approach. When using systemd-networkd it's 38 # still possible to use this option, but it's recommended to use it in conjunction 39 # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 40 networking.useDHCP = lib.mkDefault true; 41 # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; 42 # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; 43 44 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 45 hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 46}