This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/nixos/hardware-configuration.nix

58 lines
1.3 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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"
"vfat"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
"sdhci_pci"
"cryptd"
];
# Wifi support
hardware.firmware = [ pkgs.rtw89-firmware ];
# For support of newer AMD GPUs, backlight and internal microphone
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.13") pkgs.linuxPackages_latest;
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ config.boot.kernelPackages.rtw89 ];
boot.supportedFilesystems = ["zfs"];
boot.initrd.luks.devices."crypt" =
{ device = "/dev/disk/by-partlabel/crypt";
preLVM = true;
};
fileSystems."/" =
{ device = "rpool/root/nixos";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "rpool/home";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-partlabel/boot";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/partitions/swap"; }
];
}