2023-05-07 20:10:18 +05:30
|
|
|
|
# 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.
|
2024-10-19 07:04:52 +05:30
|
|
|
|
{ config, lib, pkgs, modulesPath, inputs, ... }:
|
2023-05-07 20:10:18 +05:30
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
2023-06-01 06:24:06 +05:30
|
|
|
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
2023-05-07 20:10:18 +05:30
|
|
|
|
];
|
|
|
|
|
|
2024-10-22 08:13:10 +05:30
|
|
|
|
services.fstrim.enable = true;
|
|
|
|
|
|
2024-05-28 00:51:17 +05:30
|
|
|
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "radeon" ];
|
|
|
|
|
boot.initrd.kernelModules = [ "radeon" ];
|
2024-10-19 07:04:52 +05:30
|
|
|
|
boot.kernelModules = [ "kvm-amd" "radeon" "zenpower" "8812au" ];
|
|
|
|
|
boot.blacklistedKernelModules = [ "k10temp" ];
|
|
|
|
|
boot.kernelParams = [ "amd_pstate=active" ];
|
|
|
|
|
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower rtl8812au ];
|
|
|
|
|
hardware.opengl.extraPackages = [ pkgs.rocmPackages.clr.icd ];
|
|
|
|
|
hardware.opengl.extraPackages32 = [ ];
|
|
|
|
|
|
2024-10-24 17:36:40 +05:30
|
|
|
|
environment.systemPackages = with pkgs.rocmPackages; [ hipcc hip-common hiprand hipblas hipfft hipcub hipify ];
|
|
|
|
|
|
|
|
|
|
|
2024-10-19 07:04:52 +05:30
|
|
|
|
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
|
|
|
|
|
|
|
|
|
|
hardware.graphics = {
|
|
|
|
|
enable = lib.mkDefault true;
|
|
|
|
|
enable32Bit = lib.mkDefault true;
|
|
|
|
|
};
|
|
|
|
|
|
2024-10-24 17:36:40 +05:30
|
|
|
|
hardware.amdgpu.initrd.enable = true;
|
|
|
|
|
hardware.amdgpu.opencl.enable = true;
|
|
|
|
|
hardware.amdgpu.amdvlk.enable = true;
|
|
|
|
|
|
|
|
|
|
systemd.tmpfiles.rules =
|
|
|
|
|
let
|
|
|
|
|
rocmEnv = pkgs.symlinkJoin {
|
|
|
|
|
name = "rocm-combined";
|
|
|
|
|
paths = with pkgs.rocmPackages; [
|
|
|
|
|
rocblas
|
|
|
|
|
hipblas
|
|
|
|
|
clr
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
in [
|
|
|
|
|
"L+ /opt/rocm - - - - ${rocmEnv}"
|
|
|
|
|
];
|
2023-05-07 20:10:18 +05:30
|
|
|
|
|
2024-04-04 23:37:18 +05:30
|
|
|
|
# my stupid usb hub crashes systemct suspend half of the time now
|
|
|
|
|
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Sleep_hooks
|
|
|
|
|
systemd.services.root-suspend = {
|
|
|
|
|
enable = true;
|
|
|
|
|
description = "Root systemd suspend prehook";
|
|
|
|
|
unitConfig = {
|
|
|
|
|
Description = "Root systemd suspend prehook";
|
|
|
|
|
Before = "sleep.target";
|
|
|
|
|
};
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
Type = "simple";
|
|
|
|
|
ExecStart = "${pkgs.uhubctl}/bin/uhubctl -a off";
|
|
|
|
|
};
|
|
|
|
|
wantedBy = [ "sleep.target" ];
|
|
|
|
|
};
|
|
|
|
|
systemd.services.root-resume = {
|
|
|
|
|
enable = true;
|
|
|
|
|
description = "Root systemd suspend posthook";
|
|
|
|
|
unitConfig = {
|
|
|
|
|
Description = "Root systemd suspend posthook";
|
|
|
|
|
After = "suspend.target";
|
|
|
|
|
};
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
Type = "simple";
|
|
|
|
|
ExecStart = "${pkgs.uhubctl}/bin/uhubctl -a on";
|
|
|
|
|
};
|
|
|
|
|
wantedBy = [ "suspend.target" ];
|
|
|
|
|
};
|
|
|
|
|
|
2024-04-20 21:10:18 +05:30
|
|
|
|
boot.kernel.sysctl = {
|
|
|
|
|
"vm.swappiness" = 90;
|
|
|
|
|
"vm.vfs_cache_pressure" = 50;
|
|
|
|
|
"vm.dirty_background_ratio" = 2;
|
|
|
|
|
"vm.dirty_ratio" = 5;
|
|
|
|
|
};
|
|
|
|
|
|
2024-01-02 09:25:19 +05:30
|
|
|
|
services.btrfs.autoScrub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
interval = "weekly";
|
|
|
|
|
};
|
|
|
|
|
|
2023-05-07 20:10:18 +05:30
|
|
|
|
fileSystems."/" =
|
2023-06-01 06:24:06 +05:30
|
|
|
|
{ device = "/dev/disk/by-uuid/637d8261-0650-4ece-a35b-59d97baf64a7";
|
2023-05-07 20:10:18 +05:30
|
|
|
|
fsType = "btrfs";
|
2024-02-03 22:31:38 +05:30
|
|
|
|
options = [ "noatime,compress-force=zstd:2,discard=async,commit=120,clear_cache,space_cache=v2,subvol=@" ];
|
2023-05-07 20:10:18 +05:30
|
|
|
|
};
|
|
|
|
|
|
2023-06-01 06:24:06 +05:30
|
|
|
|
boot.initrd.luks.devices."luks-385106b5-71f7-460e-9a2b-2416f3b54cb6".device = "/dev/disk/by-uuid/385106b5-71f7-460e-9a2b-2416f3b54cb6";
|
2023-05-07 20:10:18 +05:30
|
|
|
|
|
2024-02-26 03:08:51 +05:30
|
|
|
|
fileSystems."/boot" =
|
2023-06-01 06:24:06 +05:30
|
|
|
|
{ device = "/dev/disk/by-uuid/F09D-73C9";
|
2023-05-07 20:10:18 +05:30
|
|
|
|
fsType = "vfat";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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.<interface>.useDHCP`.
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
2023-06-01 06:24:06 +05:30
|
|
|
|
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
|
|
|
|
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
|
2023-05-07 20:10:18 +05:30
|
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
}
|