mirror of
https://github.com/materusPL/Nixerus.git
synced 2026-07-10 00:51:59 +00:00
Move old config here
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
{ config, pkgs, lib, inputs, materusFlake, ... }:
|
||||
{
|
||||
#Kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
boot.kernelParams = [ "nvme_core.default_ps_max_latency_us=0" "nvme_core.io_timeout=255" "nvme_core.max_retries=10" "nvme_core.shutdown_timeout=10" "amd_iommu=on" "iommu=pt" "pcie_acs_override=downstream,multifunction" ];
|
||||
boot.kernelModules = [ "i2c_dev" "kvm-amd" "vfio-pci" "v4l2loopback" "kvmfr" ];
|
||||
boot.kernel.sysctl = {"vm.max_map_count" = 1000000;};
|
||||
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback kvmfr];
|
||||
|
||||
|
||||
boot.supportedFilesystems = [ "ntfs" "btrfs" "vfat" "exfat" "ext4"];
|
||||
|
||||
boot.tmp.useTmpfs = true;
|
||||
|
||||
|
||||
#bootloader
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
gfxmodeEfi = pkgs.lib.mkDefault "1920x1080";
|
||||
gfxmodeBios = pkgs.lib.mkDefault "1920x1080";
|
||||
useOSProber = true;
|
||||
memtest86.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{ config, pkgs, lib, inputs, materusFlake, materusPkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./filesystem.nix
|
||||
./boot.nix
|
||||
|
||||
];
|
||||
hardware.firmware = with pkgs; [
|
||||
linux-firmware
|
||||
alsa-firmware
|
||||
sof-firmware
|
||||
];
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkForce true;
|
||||
|
||||
#extra
|
||||
hardware.wooting.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
|
||||
#Graphics
|
||||
hardware.opengl.enable = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
amdvlk
|
||||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
materusPkgs.amdgpu-pro-libs.vulkan
|
||||
materusPkgs.amdgpu-pro-libs.amf
|
||||
];
|
||||
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
vaapiVdpau
|
||||
pkgs.driversi686Linux.amdvlk
|
||||
materusPkgs.i686Linux.amdgpu-pro-libs.vulkan
|
||||
libvdpau-va-gl
|
||||
];
|
||||
|
||||
#GPU bar size
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x744c", ATTR{resource0_resize}="15"
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x744c", ATTR{resource2_resize}="8"
|
||||
'';
|
||||
|
||||
#Trim
|
||||
services.fstrim = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{ config, pkgs, lib, inputs, materusFlake, ... }:
|
||||
{
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = 25;
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
label = "NixOS_Swap";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fileSystems."/etc/nixos" =
|
||||
{
|
||||
device = "/materus/Nix/Nixerus";
|
||||
fsType = "none";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
|
||||
|
||||
fileSystems."/materus" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@materus" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" "compress=zstd" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@home" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@boot" "ssd" ];
|
||||
};
|
||||
|
||||
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_EFI";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user