# 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 = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/disk/by-uuid/0b3de117-c34f-4cc6-81db-5b84ea46cd51"; fsType = "btrfs"; options = [ "subvol=root" ]; }; boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/0ccc4028-c27e-4259-ade9-a2b2081722cb"; fileSystems."/.swapvol" = { device = "/dev/disk/by-uuid/0b3de117-c34f-4cc6-81db-5b84ea46cd51"; fsType = "btrfs"; options = [ "subvol=swap" ]; }; fileSystems."/boot" = { device = "/dev/disk/by-uuid/219D-4579"; fsType = "vfat"; options = [ "fmask=0077" "dmask=0077" ]; }; fileSystems."/home" = { device = "/dev/disk/by-uuid/0b3de117-c34f-4cc6-81db-5b84ea46cd51"; fsType = "btrfs"; options = [ "subvol=home" ]; }; fileSystems."/nix" = { device = "/dev/disk/by-uuid/0b3de117-c34f-4cc6-81db-5b84ea46cd51"; fsType = "btrfs"; options = [ "subvol=nix" ]; }; swapDevices = [ ]; # 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..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; # GPU Things # NOTE: The following command can be helpful when diagnosing GPU issues: # `nix shell nixpkgs#vulkan-tools -c vulkaninfo --summary` hardware.graphics = { enable = true; enable32Bit = true; }; services.xserver.videoDrivers = [ "nvidia" ]; # NOTE: This acceptLicense thing was necessary for nvidia packages to begin # working, and it seems undocumented in the usual places. # I found it on a forum thread, and then inside the nixpkgs repo. # https://discourse.nixos.org/t/nvidia-settings-and-nvidia-offload-not-found/37187/23 # https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/nvidia-x11/generic.nix#L65 nixpkgs.config.nvidia.acceptLicense = true; hardware.nvidia = { package = config.boot.kernelPackages.nvidiaPackages.latest; modesetting.enable = true; open = true; nvidiaSettings = true; powerManagement.enable = false; powerManagement.finegrained = false; }; }