Advertisement
Guest User

Untitled

a guest
Nov 4th, 2021
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.24 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, pkgs, lib, ... }:
  6.  
  7. #let nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
  8. # export __NV_PRIME_RENDER_OFFLOAD=1
  9. # export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
  10. # export __GLX_VENDOR_LIBRARY_NAME=nvidia
  11. # export __VK_LAYER_NV_optimus=NVIDIA_only
  12. # exec -a "$0" "$@"
  13. # '';
  14. # in
  15. {
  16. imports =
  17. [ # Include the results of the hardware scan.
  18. ./hardware-configuration.nix
  19. ];
  20.  
  21. # Use the systemd-boot EFI boot loader.
  22. boot.loader.systemd-boot.enable = true;
  23. boot.loader.efi.canTouchEfiVariables = true;
  24.  
  25. # networking.hostName = "nixos"; # Define your hostname.
  26. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  27.  
  28. # Set your time zone.
  29. time.timeZone = "America/Chicago";
  30.  
  31. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  32. # Per-interface useDHCP will be mandatory in the future, so this generated config
  33. # replicates the default behaviour.
  34. networking.useDHCP = false;
  35. networking.interfaces.wlp2s0.useDHCP = true;
  36. networking.networkmanager.enable = true;
  37.  
  38. # Configure network proxy if necessary
  39. # networking.proxy.default = "http://user:password@proxy:port/";
  40. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  41.  
  42. hardware.bluetooth.enable = true;
  43. services.blueman.enable = true;
  44.  
  45. # Enable the X11 windowing system.
  46. services.xserver.enable = true;
  47. # Enable the Plasma 5 Desktop Environment.
  48. services.xserver.displayManager.sddm.enable = true;
  49. services.xserver.desktopManager.plasma5.enable = true;
  50.  
  51. # Nvidia multi monitor stuff
  52. # services.xserver.videoDrivers = [ "nvidia" ];
  53. #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
  54. # hardware.opengl.driSupport = true;
  55. # hardware.opengl.driSupport32Bit = true;
  56. #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_340;
  57. # hardware.nvidia.modesetting.enable = true;
  58. # services.xserver.displayManager.sessionCommands = ''
  59. # ${lib.getBin pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0
  60. # '';
  61.  
  62. # services.xserver.desktopManager.plasma5.runUsingSystemd = true;
  63. # services.xserver.displayManager.sessionPackages = [
  64. # (pkgs.plasma-workspace.overrideAttrs
  65. # (old: { passthru.providedSessions = [ "plasmawayland" ]; }))
  66. # ];
  67.  
  68.  
  69. # hardware.nvidia.prime = {
  70. # Bus ID of the AMD GPU. You can find it using lspci, either under 3D or VGA
  71. # amdgpuBusId = "PCI:4:0:0";
  72.  
  73. # Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
  74. # nvidiaBusId = "PCI:1:0:0";
  75. # };
  76.  
  77. # services.displayManager = {
  78. # session = [
  79. # {
  80. # name = "home-manager";
  81. #start = ''
  82. # ${pkgs.runtimeShell} $HOME/.hm-xsession & waitPID=$!
  83. #'';
  84. # manage = "window";
  85. # };
  86. # ];
  87. # };
  88.  
  89. # Configure keymap in X11
  90. # services.xserver.layout = "us";
  91. # services.xserver.xkbOptions = "eurosign:e";
  92.  
  93. # Enable CUPS to print documents.
  94. # services.printing.enable = true;
  95.  
  96. # Enable sound.
  97. sound.enable = true;
  98. hardware.pulseaudio.enable = true;
  99.  
  100. # Enable touchpad support (enabled default in most desktopManager).
  101. # services.xserver.libinput.enable = true;
  102.  
  103. # Define a user account. Don't forget to set a password with ‘passwd’.
  104. users.users.billy = {
  105. isNormalUser = true;
  106. extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
  107. };
  108.  
  109. # List packages installed in system profile. To search, run:
  110. # $ nix search wget
  111. environment.systemPackages = with pkgs; [
  112. blueman
  113. firefox
  114. git
  115. pciutils
  116. nix-diff
  117. nodejs-14_x
  118. notepadqq
  119. nvidia-offload
  120. slack
  121. sudo # So notepadqq can try as root.
  122. wget
  123. zoom-us
  124. ];
  125.  
  126. nixpkgs.config = {
  127. allowUnfree = true;
  128. };
  129.  
  130. # Some programs need SUID wrappers, can be configured further or are
  131. # started in user sessions.
  132. # programs.mtr.enable = true;
  133. # programs.gnupg.agent = {
  134. # enable = true;
  135. # enableSSHSupport = true;
  136. # };
  137.  
  138. # Select internationalisation properties.
  139. # i18n.defaultLocale = "en_US.UTF-8";
  140. # console = {
  141. # font = "Lat2-Terminus16";
  142. # keyMap = "us";
  143. # };
  144.  
  145. # List services that you want to enable:
  146.  
  147. # Enable the OpenSSH daemon.
  148. services.openssh.enable = true;
  149.  
  150. # Open ports in the firewall.
  151. # networking.firewall.allowedTCPPorts = [ ... ];
  152. # networking.firewall.allowedUDPPorts = [ ... ];
  153. # Or disable the firewall altogether.
  154. # networking.firewall.enable = false;
  155.  
  156. # This value determines the NixOS release from which the default
  157. # settings for stateful data, like file locations and database versions
  158. # on your system were taken. It‘s perfectly fine and recommended to leave
  159. # this value at the release version of the first install of this system.
  160. # Before changing this value read the documentation for this option
  161. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  162. system.stateVersion = "21.05"; # Did you read the comment?
  163.  
  164. }
  165.  
  166.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement