Advertisement
Guest User

Untitled

a guest
Sep 14th, 2023
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.63 KB | None | 0 0
  1. # Edit this configuration file to define what should be installed on
  2. # your system. Help is available in the configuration.nix(5) man page
  3. # and in the NixOS manual (accessible by running ‘nixos-help’).
  4.  
  5. { config, lib, pkgs, ... }:
  6.  
  7. {
  8. imports =
  9. [ # Include the results of the hardware scan.
  10. ./hardware-configuration.nix
  11. ];
  12.  
  13. # Enable OpenGL
  14. hardware.opengl = {
  15. enable = true;
  16. driSupport = true;
  17. driSupport32Bit = true;
  18. };
  19.  
  20. # Load nvidia driver for Xorg and Wayland
  21. # services.xserver.videoDrivers = ["nvidia"];
  22. boot.initrd.kernelModules = [ "nvidia" ];
  23. boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
  24.  
  25. hardware.nvidia = {
  26.  
  27. # Modesetting is required.
  28. modesetting.enable = true;
  29. # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
  30. powerManagement.enable = false;
  31. # Fine-grained power management. Turns off GPU when not in use.
  32. # Experimental and only works on modern Nvidia GPUs (Turing or newer).
  33. powerManagement.finegrained = false;
  34.  
  35. # Use the NVidia open source kernel module (not to be confused with the
  36. # independent third-party "nouveau" open source driver).
  37. # Support is limited to the Turing and later architectures. Full list of
  38. # supported GPUs is at:
  39. # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
  40. # Only available from driver 515.43.04+
  41. # Do not disable this unless your GPU is unsupported or if you have a good reason to.
  42. open = true;
  43.  
  44. # Enable the Nvidia settings menu,
  45. # accessible via `nvidia-settings`.
  46. nvidiaSettings = true;
  47.  
  48. # Optionally, you may need to select the appropriate driver version for your specific GPU.
  49. package = config.boot.kernelPackages.nvidiaPackages.beta;
  50. };
  51.  
  52. hardware.nvidia.forceFullCompositionPipeline = true;
  53.  
  54. # Bootloader.
  55. boot.loader.systemd-boot.enable = true;
  56. boot.loader.efi.canTouchEfiVariables = true;
  57.  
  58. networking.hostName = "nixos"; # Define your hostname.
  59. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  60.  
  61. # Configure network proxy if necessary
  62. # networking.proxy.default = "http://user:password@proxy:port/";
  63. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  64.  
  65. # Enable networking
  66. networking.networkmanager.enable = true;
  67.  
  68. # Set your time zone.
  69. time.timeZone = "America/Los_Angeles";
  70.  
  71. # Select internationalisation properties.
  72. i18n.defaultLocale = "en_US.UTF-8";
  73.  
  74. i18n.extraLocaleSettings = {
  75. LC_ADDRESS = "en_US.UTF-8";
  76. LC_IDENTIFICATION = "en_US.UTF-8";
  77. LC_MEASUREMENT = "en_US.UTF-8";
  78. LC_MONETARY = "en_US.UTF-8";
  79. LC_NAME = "en_US.UTF-8";
  80. LC_NUMERIC = "en_US.UTF-8";
  81. LC_PAPER = "en_US.UTF-8";
  82. LC_TELEPHONE = "en_US.UTF-8";
  83. LC_TIME = "en_US.UTF-8";
  84. };
  85.  
  86. # Enable the X11 windowing system.
  87. services.xserver.enable = true;
  88.  
  89. # Enable the KDE Plasma Desktop Environment.
  90. services.xserver.displayManager.sddm.enable = true;
  91. services.xserver.desktopManager.plasma5.enable = true;
  92.  
  93. # Configure keymap in X11
  94. services.xserver = {
  95. layout = "us";
  96. xkbVariant = "";
  97. };
  98.  
  99. # Enable CUPS to print documents.
  100. services.printing.enable = true;
  101.  
  102. # Enable sound with pipewire.
  103. sound.enable = true;
  104. hardware.pulseaudio.enable = false;
  105. security.rtkit.enable = true;
  106. services.pipewire = {
  107. enable = true;
  108. alsa.enable = true;
  109. alsa.support32Bit = true;
  110. pulse.enable = true;
  111. # If you want to use JACK applications, uncomment this
  112. #jack.enable = true;
  113.  
  114. # use the example session manager (no others are packaged yet so this is enabled by default,
  115. # no need to redefine it in your config for now)
  116. #media-session.enable = true;
  117. };
  118.  
  119. # Enable touchpad support (enabled default in most desktopManager).
  120. # services.xserver.libinput.enable = true;
  121.  
  122. # Define a user account. Don't forget to set a password with ‘passwd’.
  123. users.users.mikelane = {
  124. isNormalUser = true;
  125. description = "mikelane";
  126. extraGroups = [ "networkmanager" "wheel" ];
  127. packages = with pkgs; [
  128. firefox
  129. kate
  130. # thunderbird
  131. ];
  132. };
  133.  
  134. # Allow unfree packages
  135. nixpkgs.config.allowUnfree = true;
  136.  
  137. # List packages installed in system profile. To search, run:
  138. # $ nix search wget
  139. environment.systemPackages = with pkgs; [
  140. ckb-next
  141. gh
  142. git
  143. glxinfo
  144. neofetch
  145. nodejs_18
  146. pciutils
  147. python311
  148. vim
  149. wget
  150. xclip
  151. ];
  152.  
  153. # Some programs need SUID wrappers, can be configured further or are
  154. # started in user sessions.
  155. # programs.mtr.enable = true;
  156. programs.gnupg.agent = {
  157. enable = true;
  158. enableSSHSupport = true;
  159. };
  160.  
  161. # List services that you want to enable:
  162.  
  163. # Enable the OpenSSH daemon.
  164. services.openssh.enable = true;
  165.  
  166. # Open ports in the firewall.
  167. # networking.firewall.allowedTCPPorts = [ ... ];
  168. # networking.firewall.allowedUDPPorts = [ ... ];
  169. # Or disable the firewall altogether.
  170. # networking.firewall.enable = false;
  171.  
  172. environment.shellAliases = {
  173. pbcopy = "xclip -sel clip";
  174. };
  175.  
  176. # This value determines the NixOS release from which the default
  177. # settings for stateful data, like file locations and database versions
  178. # on your system were taken. It‘s perfectly fine and recommended to leave
  179. # this value at the release version of the first install of this system.
  180. # Before changing this value read the documentation for this option
  181. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  182. system.stateVersion = "23.05"; # Did you read the comment?
  183.  
  184. }
  185.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement