fixes and nvidia
This commit is contained in:
		| @@ -30,6 +30,7 @@ | |||||||
|  |  | ||||||
|   # Select internationalisation properties. |   # Select internationalisation properties. | ||||||
|   i18n.defaultLocale = "en_US.UTF-8"; |   i18n.defaultLocale = "en_US.UTF-8"; | ||||||
|  |   # i18n.supportedLocales = [ "en_US.UTF-8" "de_DE.UTF-8" ]; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -6,10 +6,10 @@ | |||||||
|         ./hardware-configuration.nix |         ./hardware-configuration.nix | ||||||
|         ../../modules/nixos/flatpak.nix |         ../../modules/nixos/flatpak.nix | ||||||
|         ../../modules/nixos/gdm.nix |         ../../modules/nixos/gdm.nix | ||||||
|  |         ../../modules/nixos/nvidia.nix | ||||||
|         ../../modules/nixos/pipewire.nix |         ../../modules/nixos/pipewire.nix | ||||||
|         ../../modules/nixos/podman.nix |         ../../modules/nixos/podman.nix | ||||||
|         ../../utils/binary-cache.nix |         ../../utils/binary-cache.nix | ||||||
|         ../../utils/garbage-collection.nix |         ../../utils/garbage-collection.nix | ||||||
|  |  | ||||||
|     ]; |     ]; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -72,5 +72,16 @@ with lib.hm.gvariant; | |||||||
|         show-windows-preview = true; |         show-windows-preview = true; | ||||||
|     }; |     }; | ||||||
|  |  | ||||||
|  |     dconf.settings."org/gnome/mutter" = { | ||||||
|  |         dynamic-workspaces = true; | ||||||
|  |         edge-tiling = false; | ||||||
|  |         workspaces-only-on-primary = true; | ||||||
|  |     }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     dconf.settings."org/gnome/desktop/interface" = { | ||||||
|  |         color-scheme = "prefer-dark"; | ||||||
|  |         show-battery-percentage = true; | ||||||
|  |     }; | ||||||
|  |  | ||||||
| } | } | ||||||
							
								
								
									
										7
									
								
								modules/home-manager/keepassxc.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								modules/home-manager/keepassxc.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | |||||||
|  | {pkgs, ...}:  | ||||||
|  | { | ||||||
|  |   home.packages = [ | ||||||
|  |     pkgs.keepassxc | ||||||
|  |   ]; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -3,6 +3,5 @@ | |||||||
|     home.packages = [ |     home.packages = [ | ||||||
|         pkgs.obsidian |         pkgs.obsidian | ||||||
|     ]; |     ]; | ||||||
|     # obsidian options |  | ||||||
|      |      | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										64
									
								
								modules/nixos/nvidia.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								modules/nixos/nvidia.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | |||||||
|  | { | ||||||
|  |     config, | ||||||
|  |     lib, | ||||||
|  |     pkgs, | ||||||
|  |     ... | ||||||
|  | }: | ||||||
|  | { | ||||||
|  |  | ||||||
|  |   # Enable OpenGL | ||||||
|  |   hardware.opengl = { | ||||||
|  |     enable = true; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   # Load nvidia driver for Xorg and Wayland | ||||||
|  |   services.xserver.videoDrivers = ["nvidia"]; | ||||||
|  |  | ||||||
|  |   hardware.nvidia = { | ||||||
|  |     # manually specify the driver version | ||||||
|  |     package = config.boot.kernelPackages.nvidiaPackages.mkDriver { | ||||||
|  |       version = "555.58.02"; | ||||||
|  |       sha256_64bit = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM="; | ||||||
|  |       sha256_aarch64 = "sha256-8hyRiGB+m2hL3c9MDA/Pon+Xl6E788MZ50WrrAGUVuY="; | ||||||
|  |       openSha256 = "sha256-8hyRiGB+m2hL3c9MDA/Pon+Xl6E788MZ50WrrAGUVuY="; | ||||||
|  |       settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8="; | ||||||
|  |       persistencedSha256 = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM="; | ||||||
|  |     }; | ||||||
|  |  | ||||||
|  |     # 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; | ||||||
|  |  | ||||||
|  |     open = false; | ||||||
|  |  | ||||||
|  |     # Enable the Nvidia settings menu, | ||||||
|  | 	  # accessible via `nvidia-settings`. | ||||||
|  |     nvidiaSettings = true; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   ## See https://nixos.wiki/wiki/Nvidia | ||||||
|  |   hardware.nvidia.prime = { | ||||||
|  | 		intelBusId = "PCI:0:2:0"; | ||||||
|  | 		nvidiaBusId = "PCI:1:0:0"; | ||||||
|  |  | ||||||
|  |     ## Reverse PRIME synchronization | ||||||
|  |     reverseSync.enable = true; | ||||||
|  |     # Enable if using an external GPU | ||||||
|  |     allowExternalGpu = false; | ||||||
|  |  | ||||||
|  |     ## Alternatively enable offloading | ||||||
|  |     # offload = { | ||||||
|  | 		# 	enable = true; | ||||||
|  | 		# 	enableOffloadCmd = true; | ||||||
|  | 		# }; | ||||||
|  | 	}; | ||||||
|  | } | ||||||
| @@ -2,13 +2,16 @@ | |||||||
| with lib.hm.gvariant; | with lib.hm.gvariant; | ||||||
| { | { | ||||||
|   imports = [ |   imports = [ | ||||||
|     ../modules/home-manager/fish.nix |  | ||||||
|     ../modules/home-manager/browser.nix |     ../modules/home-manager/browser.nix | ||||||
|     ../modules/home-manager/code.nix |     ../modules/home-manager/code.nix | ||||||
|  |     ../modules/home-manager/fish.nix | ||||||
|     ../modules/home-manager/flatpaks.nix |     ../modules/home-manager/flatpaks.nix | ||||||
|  |     ../modules/home-manager/gnome-shell-customization.nix | ||||||
|  |     ../modules/home-manager/keepassxc.nix | ||||||
|  |     ../modules/home-manager/obsidian.nix | ||||||
|     ../modules/home-manager/thunderbird.nix |     ../modules/home-manager/thunderbird.nix | ||||||
|     ../modules/home-manager/quickshare.nix |     ../modules/home-manager/quickshare.nix | ||||||
|     ../modules/home-manager/gnome-shell-customization.nix |  | ||||||
|   ]; |   ]; | ||||||
|  |  | ||||||
|   ## Home Manager configuration |   ## Home Manager configuration | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user