mirror of
https://codeberg.org/muon/home.git
synced 2025-12-05 23:57:46 +00:00
Add nvidia
This commit is contained in:
parent
51fc35cc23
commit
63cfe65e1a
3 changed files with 17 additions and 47 deletions
|
|
@ -33,7 +33,7 @@ in {
|
|||
|
||||
# Proprietary </3
|
||||
mods.unfree.steam.enable = true;
|
||||
mods.unfree.nvidia.enable = false;
|
||||
mods.unfree.nvidia.enable = true;
|
||||
mods.unfree.minecraft.enable = true;
|
||||
|
||||
# Hardware preferences
|
||||
|
|
@ -68,53 +68,18 @@ in {
|
|||
xset s off -dpms
|
||||
'';
|
||||
|
||||
## GPU (AMD Radeon 7950)
|
||||
## https://wiki.nixos.org/wiki/AMD_GPU
|
||||
boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ];
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
## GPU (AMD Radeon 7950)
|
||||
## https://wiki.nixos.org/wiki/AMD_GPU
|
||||
# boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ];
|
||||
|
||||
## GPU (NVidia GTX 1060)
|
||||
## https://nixos.wiki/wiki/Nvidia
|
||||
# Enable OpenGL
|
||||
# hardware.graphics = { enable = true; };
|
||||
|
||||
# # Load nvidia driver for Xorg and Wayland
|
||||
# services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
# hardware.nvidia = {
|
||||
|
||||
# # Modesetting is required.
|
||||
# modesetting.enable = true;
|
||||
|
||||
# # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# # Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# # of just the bare essentials.
|
||||
# powerManagement.enable = false;
|
||||
|
||||
# # Fine-grained power management. Turns off GPU when not in use.
|
||||
# # Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
# powerManagement.finegrained = false;
|
||||
|
||||
# # Use the NVidia open source kernel module (not to be confused with the
|
||||
# # independent third-party "nouveau" open source driver).
|
||||
# # Support is limited to the Turing and later architectures. Full list of
|
||||
# # supported GPUs is at:
|
||||
# # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# # Only available from driver 515.43.04+
|
||||
# # Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
# open = false;
|
||||
|
||||
# # Enable the Nvidia settings menu,
|
||||
# # accessible via `nvidia-settings`.
|
||||
# nvidiaSettings = true;
|
||||
|
||||
# # Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
# };
|
||||
hardware.nvidia.powerManagement.enable = false;
|
||||
|
||||
# Version of first install
|
||||
system.stateVersion = "23.05";
|
||||
|
|
|
|||
|
|
@ -54,7 +54,10 @@ in with lib; {
|
|||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||
networking.wg-quick.interfaces = lib.mkIf (wg.id != null) {
|
||||
wg0 = {
|
||||
address = [ "10.0.0.${wg.id}/24" "fdc9:281f:04d7:9ee9::${wg.id}/64" ];
|
||||
address = [
|
||||
"10.0.0.${toString wg.id}/24"
|
||||
"fdc9:281f:04d7:9ee9::${toString wg.id}/64"
|
||||
];
|
||||
dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
|
||||
mtu = 1500;
|
||||
privateKeyFile = "/home/muon/wireguard-keys/private";
|
||||
|
|
|
|||
|
|
@ -18,20 +18,22 @@ in {
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# nixos.wiki/wiki/Nvidia
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
# hardware.graphics = {
|
||||
# enable = true;
|
||||
# enable32Bit = true;
|
||||
# };
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" "nvidia-dkms" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
|
||||
# Set in configuration.nix
|
||||
# powerManagement.enable = false;
|
||||
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
open = false;
|
||||
open = lib.mkDefault false;
|
||||
nvidiaSettings = lib.mkDefault false;
|
||||
|
||||
package = config.boot.kernelPackages.nvidiaPackages."${cfg.driver}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue