feat: move hardware configuration to host dir && enable nvidia power management

This commit is contained in:
2026-07-05 15:37:36 +03:00
parent 2d217ed6ba
commit 5487b1705b
2 changed files with 3 additions and 2 deletions
+58
View File
@@ -0,0 +1,58 @@
# 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 = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/16424ae5-12bf-4541-a663-371a401e2486";
fsType = "btrfs";
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/16424ae5-12bf-4541-a663-371a401e2486";
fsType = "btrfs";
options = ["subvol=home"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/16424ae5-12bf-4541-a663-371a401e2486";
fsType = "btrfs";
options = ["subvol=nix"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/B12C-6B1E";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};
swapDevices = [
{device = "/dev/disk/by-uuid/d5ea4df4-2557-45ca-975b-1fd33e3bb772";}
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
powerManagement.enable = true;
};
}