# 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.loader.systemd-boot = { enable = true; configurationLimit = 5; }; boot.loader.efi.canTouchEfiVariables = true; boot.initrd.availableKernelModules = [ "vfat" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "amdgpu" ]; boot.extraModulePackages = [ ]; # AMD Ryzen 7 7840U optimizations boot.kernelParams = [ "amd_pstate=active" "amd_pstate.shared_mem=1" "amdgpu.dcdebugmask=0x10" "amdgpu.dc=1" "amdgpu.ppfeaturemask=0xffffffff" "amdgpu.gpu_recovery=1" "snd_hda_intel.power_save=1" "transparent_hugepage=madvise" "pcie_aspm=force" "nvme.noacpi=1" ]; fileSystems."/" = { device = "none"; fsType = "tmpfs"; options = [ "size=16G" "mode=755" ]; }; boot.initrd = { luks.devices."root" = { crypttabExtraOpts = [ "fido2-device=auto" ]; device = "/dev/disk/by-label/root"; }; systemd.enable = true; }; fileSystems."/boot" = { device = "/dev/disk/by-label/boot"; fsType = "vfat"; }; fileSystems."/nix" = { device = "/dev/mapper/root"; fsType = "btrfs"; neededForBoot = true; options = [ "subvol=@" "ssd" "compress=zstd:1" "discard=async" "noatime" "commit=120" ]; }; fileSystems."/nix/store" = { device = "/dev/mapper/root"; fsType = "btrfs"; neededForBoot = true; options = [ "subvol=@nix-store" "ssd" "compress=zstd:1" "discard=async" "noatime" "commit=120" ]; }; fileSystems."/nix/persist" = { device = "/dev/mapper/root"; fsType = "btrfs"; neededForBoot = true; options = [ "subvol=@nix-persist" "ssd" "compress=zstd:1" "discard=async" "noatime" "commit=120" ]; }; 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.wlp52s0.useDHCP = lib.mkDefault true; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.graphics = { enable = true; extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl libva libva-utils ]; }; # Optimal I/O scheduler for NVMe SSDs services.udev.extraRules = '' ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="none" ''; }