nixos-config/machines/mimir/hardware-configuration.nix

78 lines
2.3 KiB
Nix
Raw Normal View History

2022-11-11 11:54:21 +01:00
# 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, pkgs, ... }:
2022-11-11 11:54:21 +01:00
{
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
2022-11-11 12:51:48 +01:00
boot.kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" "zenpower" ];
boot.extraModulePackages = [ ] ++
(with config.boot.kernelPackages; [ rtl88x2bu zenpower ]);
boot.extraModprobeConfig = ''
options amd-pstate shared_mem=true
'';
2022-11-11 11:54:21 +01:00
2022-11-17 14:06:39 +01:00
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
2022-11-11 11:54:21 +01:00
2022-11-17 14:06:39 +01:00
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
2022-11-11 11:54:21 +01:00
2022-11-17 14:06:39 +01:00
fileSystems."/home" = {
device = "/dev/disk/by-label/home";
fsType = "ext4";
};
fileSystems."/yocto" = {
device = "/dev/disk/by-label/yocto";
fsType = "ext4";
};
2022-11-11 11:54:21 +01:00
swapDevices =
2022-11-17 14:06:39 +01:00
[{ device = "/dev/disk/by-label/swap"; }];
2022-11-11 11:54:21 +01:00
2022-11-11 12:51:48 +01:00
powerManagement.cpuFreqGovernor = "ondemand";
hardware = {
2022-11-11 17:07:24 +01:00
video.hidpi.enable = false;
2022-11-11 12:51:48 +01:00
enableAllFirmware = true;
2022-11-11 17:07:24 +01:00
nvidia.modesetting.enable = true;
2022-11-11 12:51:48 +01:00
opengl = {
extraPackages = with pkgs; [
vaapiVdpau
];
};
};
2022-11-11 11:54:21 +01:00
services.xserver = {
videoDrivers = [ "nvidia" ];
# Section "Screen"
# Identifier "Screen0"
# Device "Device0"
# Monitor "Monitor0"
# DefaultDepth 24
# Option "Stereo" "0"
# Option "nvidiaXineramaInfoOrder" "DFP-2"
# Option "metamodes" "DP-4: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}, DP-0: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}"
# Option "SLI" "Off"
# Option "MultiGPU" "Off"
# Option "BaseMosaic" "off"
# SubSection "Display"
# Depth 24
# EndSubSection
# EndSection
screenSection = ''
Option "metamodes" "DP-0: nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}, DP-4: nvidia-auto-select +3840+0 {ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}"
Option "TripleBuffer" "On"
'';
};
2022-11-11 11:54:21 +01:00
}