mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add dotfiles
This commit is contained in:
commit
39fe550b3e
45 changed files with 4363 additions and 0 deletions
71
modules/unfree/nvidia.nix
Normal file
71
modules/unfree/nvidia.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# Unfree </3
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
"steam"
|
||||
"steam-original"
|
||||
"steam-run"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
# environment.variables = {
|
||||
# GBM_BACKEND = "nvidia-drm";
|
||||
# LIBVA_DRIVER_NAME = "nvidia";
|
||||
# __GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
# };
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
vSync = true;
|
||||
settings = {
|
||||
"unredir-if-possible" = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
||||
hardware = {
|
||||
opengl = {
|
||||
# this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
# optionally enable 32bit pulseaudio support if pulseaudio is enabled
|
||||
pulseaudio.support32Bit = config.hardware.pulseaudio.enable;
|
||||
|
||||
nvidia = {
|
||||
open = false;
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = true;
|
||||
forceFullCompositionPipeline = true;
|
||||
|
||||
# powerManagement.enable = true;
|
||||
# prime = {
|
||||
# reverseSync.enable = true;
|
||||
# # offload = {
|
||||
# # enable = true;
|
||||
# # enableOffloadCmd = true;
|
||||
# # };
|
||||
|
||||
# intelBusId = "PCI:0:2:0";
|
||||
# nvidiaBusId = "PCI:1:0:0";
|
||||
# };
|
||||
};
|
||||
|
||||
opengl.extraPackages = with pkgs; [nvidia-vaapi-driver];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue