mirror of
https://codeberg.org/mtxyz/nixconf.git
synced 2024-11-09 18:12:02 +00:00
69 lines
1.3 KiB
Nix
69 lines
1.3 KiB
Nix
{ ... }:
|
|
{
|
|
imports = [
|
|
./hardware.nix
|
|
];
|
|
|
|
mtxyz = {
|
|
private = true;
|
|
portable = true;
|
|
graphical = true;
|
|
containers.podman = true;
|
|
};
|
|
|
|
services.tlp.settings = {
|
|
START_CHARGE_THRESH_BAT0 = 70;
|
|
STOP_CHARGE_THRESH_BAT0 = 80;
|
|
START_CHARGE_THRESH_BAT1 = 70;
|
|
STOP_CHARGE_THRESH_BAT1 = 80;
|
|
};
|
|
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
|
|
|
# enable opengl
|
|
hardware.opengl = {
|
|
enable = true;
|
|
driSupport = true;
|
|
driSupport32Bit = true;
|
|
};
|
|
|
|
hardware.nvidia = {
|
|
# Prime is needed for optimus GPU
|
|
prime = {
|
|
offload = {
|
|
enable = true;
|
|
enableOffloadCmd = true;
|
|
};
|
|
intelBusId = "PCI:0:2:0";
|
|
nvidiaBusId = "PCI:2:0:0";
|
|
};
|
|
|
|
# Modesetting is needed for most Wayland compositors
|
|
modesetting.enable = true;
|
|
|
|
# Use the open source version of the kernel module
|
|
# Only available on driver 515.43.04+
|
|
open = false;
|
|
|
|
# Enable the nvidia settings menu
|
|
nvidiaSettings = true;
|
|
};
|
|
|
|
environment.sessionVariables = {
|
|
GAMEMODERUNEXEC = "nvidia-offload";
|
|
};
|
|
|
|
programs.gamemode = {
|
|
enable = true;
|
|
enableRenice = true;
|
|
settings = {
|
|
general.renice = 10;
|
|
gpu = {
|
|
apply_gpu_optimizations="accept-responsibility";
|
|
nv_powermizer_mode=2;
|
|
gpu_device=1;
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|