Guest User

Untitled

a guest
Dec 1st, 2025
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.32 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. {
  8. imports =
  9. [ # Include the results of the hardware scan.
  10. ./hardware-configuration.nix
  11. ];
  12.  
  13. # Bootloader.
  14. boot.loader.systemd-boot.enable = true;
  15. boot.loader.efi.canTouchEfiVariables = true;
  16.  
  17. networking.hostName = "host"; # Define your hostname.
  18. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  19.  
  20. # Configure network proxy if necessary
  21. # networking.proxy.default = "http://user:password@proxy:port/";
  22. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  23.  
  24. # Enable networking
  25. networking.networkmanager.enable = true;
  26.  
  27. #MAC Address randomization
  28. networking.networkmanager.ethernet.macAddress = "random";
  29. networking.networkmanager.wifi.macAddress = "random";
  30.  
  31. # Set your time zone.
  32. time.timeZone = "Etc/GMT+3";
  33.  
  34. # Select internationalisation properties.
  35. i18n.defaultLocale = "en_US.UTF-8";
  36.  
  37. i18n.extraLocaleSettings = {
  38. LC_ADDRESS = "en_US.UTF-8";
  39. LC_IDENTIFICATION = "en_US.UTF-8";
  40. LC_MEASUREMENT = "en_US.UTF-8";
  41. LC_MONETARY = "en_US.UTF-8";
  42. LC_NAME = "en_US.UTF-8";
  43. LC_NUMERIC = "en_US.UTF-8";
  44. LC_PAPER = "en_US.UTF-8";
  45. LC_TELEPHONE = "en_US.UTF-8";
  46. LC_TIME = "en_US.UTF-8";
  47. };
  48.  
  49. # Enable the X11 windowing system.
  50. services.xserver.enable = true;
  51.  
  52. #Automatic updating
  53. system.autoUpgrade.enable = true;
  54. system.autoUpgrade.dates = "weekly";
  55. system.autoUpgrade.operation = "boot";
  56.  
  57. #Kernel updating
  58. boot.kernelPackages = pkgs.linuxPackages_latest;
  59.  
  60. #Automatic cleanup
  61. nix.gc.automatic = true;
  62. nix.gc.dates = "daily";
  63. nix.gc.options = "--delete-older-than 10d";
  64. nix.settings.auto-optimise-store = true;
  65.  
  66. # Enable the GNOME Desktop Environment.
  67. services.xserver.displayManager.gdm.enable = true;
  68. services.xserver.desktopManager.gnome.enable = true;
  69. environment.gnome.excludePackages = (with pkgs; [
  70. baobab
  71. cheese
  72. decibels
  73. epiphany
  74. geary
  75. gnome-calendar
  76. gnome-characters
  77. gnome-clocks
  78. gnome-connections
  79. gnome-contacts
  80. gnome-font-viewer
  81. gnome-logs
  82. gnome-maps
  83. gnome-music
  84. gnome-photos
  85. gnome-tour
  86. gnome-weather
  87. seahorse
  88. simple-scan
  89. snapshot
  90. totem
  91. yelp
  92. showtime
  93.  
  94. ]);
  95.  
  96. # Enable CUPS to print documents.
  97. services.printing.enable = true;
  98.  
  99. # Enable sound with pipewire.
  100. hardware.pulseaudio.enable = false;
  101. security.rtkit.enable = true;
  102. services.pipewire = {
  103. enable = true;
  104. alsa.enable = true;
  105. alsa.support32Bit = true;
  106. pulse.enable = true;
  107. # If you want to use JACK applications, uncomment this
  108. #jack.enable = true;
  109.  
  110. # use the example session manager (no others are packaged yet so this is enabled by default,
  111. # no need to redefine it in your config for now)
  112. #media-session.enable = true;
  113. };
  114.  
  115. # Enable touchpad support (enabled default in most desktopManager).
  116. # services.xserver.libinput.enable = true;
  117.  
  118. # Define a user account. Don't forget to set a password with ‘passwd’.
  119. users.users.user = {
  120. isNormalUser = true;
  121. description = "user";
  122. extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
  123. packages = with pkgs; [
  124. # thunderbird
  125. ];
  126. };
  127.  
  128. # Install firefox.
  129. programs.firefox.enable = false;
  130.  
  131. # Allow unfree packages
  132. nixpkgs.config.allowUnfree = true;
  133.  
  134. #sandbox attempt
  135. nix.settings.sandbox = true;
  136.  
  137. # List packages installed in system profile. To search, run:
  138. # $ nix search wget
  139. environment.systemPackages = with pkgs; [
  140. mullvad-browser
  141. keepassxc
  142. vesktop
  143. vlc
  144. strawberry
  145. prismlauncher
  146. nicotine-plus
  147. git
  148. tor
  149. tor-browser
  150. gnome-tweaks
  151. adw-gtk3
  152. qbittorrent
  153. pcsx2
  154. dolphin-emu
  155. electrum
  156. bisq2
  157. sparrow
  158. umu-launcher
  159. vim
  160. easyrpg-player
  161. newsflash
  162. monero-gui
  163. ryubing
  164. melonDS
  165. mullvad-vpn
  166.  
  167. ];
  168.  
  169. services.xserver.excludePackages = [
  170. pkgs.xterm
  171. ];
  172.  
  173. #nvidia drivers
  174. hardware.graphics = {
  175. enable = true;
  176. enable32Bit = true;
  177. };
  178. services.xserver.videoDrivers = ["nvidia"];
  179. hardware.nvidia.open = true;
  180. hardware.nvidia.powerManagement.enable = true;
  181. hardware.nvidia.modesetting.enable = true;
  182.  
  183. hardware.nvidia.prime = {
  184. sync.enable = true;
  185.  
  186.  
  187. amdgpuBusId = "PCI:5:0:0";
  188. nvidiaBusId = "PCI:1:0:0";
  189. };
  190.  
  191. services.udev.extraRules = let
  192. nvidiaId = map (i: lib.toHexString (lib.toInt i)) (
  193. lib.drop 1 (lib.splitString ":" config.hardware.nvidia.prime.nvidiaBusId)
  194. );
  195. domain = "0000";
  196. bus = builtins.elemAt nvidiaId 0;
  197. device = builtins.elemAt nvidiaId 1;
  198. function = builtins.elemAt nvidiaId 2;
  199. in ''
  200. SUBSYSTEM=="drm", ENV{DEVTYPE}=="drm_minor", ENV{DEVLINKS}=="/dev/dri/by-path/pci-${domain}:${bus}:${device}.${function}", TAG+="mutter-device-preferred-primary"
  201. '';
  202.  
  203. #steam
  204. programs.steam.enable = true;
  205. programs.steam.gamescopeSession.enable = true;
  206. programs.gamemode.enable = true;
  207.  
  208. #vpn
  209. services.mullvad-vpn.enable = true;
  210.  
  211. #virtualization PLEASE WORK
  212. virtualisation.libvirtd.enable = true;
  213. programs.virt-manager.enable = true;
  214.  
  215.  
  216. }
  217. # Some programs need SUID wrappers, can be configured further or are
  218. # started in user sessions.
  219. # programs.mtr.enable = true;
  220. # programs.gnupg.agent = {
  221. # enable = true;
  222. # enableSSHSupport = true;
  223. # };
  224.  
  225. # List services that you want to enable:
  226.  
  227. # Enable the OpenSSH daemon.
  228. # services.openssh.enable = true;
  229.  
  230. # Open ports in the firewall.
  231. # networking.firewall.allowedTCPPorts = [ ... ];
  232. # networking.firewall.allowedUDPPorts = [ ... ];
  233. # Or disable the firewall altogether.
  234. # networking.firewall.enable = false;
  235.  
  236. # This value determines the NixOS release from which the default
  237. # settings for stateful data, like file locations and database versions
  238. # on your system were taken. It‘s perfectly fine and recommended to leave
  239. # this value at the release version of the first install of this system.
  240. # Before changing this value read the documentation for this option
  241. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  242. # system.stateVersion = "24.11"; # Did you read the comment?
  243.  
Add Comment
Please, Sign In to add comment