Reviewed-on: #1 Co-authored-by: Tristan <tristan@vault81.mozmail.com> Co-committed-by: Tristan <tristan@vault81.mozmail.com>
65 lines
1.3 KiB
Nix
65 lines
1.3 KiB
Nix
{ config
|
|
, lib
|
|
, pkgs
|
|
, modulesPath
|
|
, system
|
|
, inputs
|
|
, ...
|
|
}: {
|
|
imports = [
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
../../os-mods/common
|
|
../../os-mods/desktop
|
|
../../os-mods/network
|
|
../../os-mods/virt
|
|
../../users
|
|
./disko.nix
|
|
];
|
|
system.stateVersion = "23.05";
|
|
|
|
boot = {
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
loader = {
|
|
systemd-boot = {
|
|
enable = true;
|
|
configurationLimit = 32;
|
|
};
|
|
efi.canTouchEfiVariables = true;
|
|
};
|
|
|
|
initrd = {
|
|
availableKernelModules = [ "amdgpu" "nvme" "xhci_pci" "uas" "usbhid" "usb_storage" "sd_mod" ];
|
|
kernelModules = [ ];
|
|
systemd.enable = true;
|
|
};
|
|
|
|
kernelModules = [ "kvm-amd" "amdgpu" ];
|
|
extraModulePackages = [ ];
|
|
};
|
|
|
|
services.btrfs.autoScrub.enable = true;
|
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
|
|
networking = {
|
|
hostName = "nixos-desk";
|
|
useDHCP = lib.mkDefault true;
|
|
};
|
|
systemd.tmpfiles.rules = [
|
|
"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
|
|
];
|
|
|
|
hardware = {
|
|
opengl = {
|
|
driSupport = true;
|
|
driSupport32Bit = true;
|
|
extraPackages = with pkgs; [
|
|
rocm-opencl-icd
|
|
rocm-opencl-runtime
|
|
];
|
|
};
|
|
|
|
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
};
|
|
|
|
zramSwap.enable = true;
|
|
}
|