Advertisement
Guest User

Untitled

a guest
Aug 1st, 2024
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.69 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, on
  3. # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
  4.  
  5. { config, lib, pkgs, ... }:
  6.  
  7. {
  8. nix.settings.system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-tigerlake" ];
  9. # nixpkgs.hostPlatform = {
  10. # gcc.arch = "tigerlake";
  11. # gcc.tune = "tigerlake";
  12. # system = "x86_64-linux";
  13. # };
  14.  
  15. nixpkgs.config.allowUnfree = true;
  16.  
  17. imports =
  18. [ # Include the results of the hardware scan.
  19. ./hardware-configuration.nix
  20. ./home-manager.nix
  21. ];
  22.  
  23. # Use the systemd-boot EFI boot loader.
  24. boot.loader.systemd-boot.enable = true;
  25. boot.loader.efi.canTouchEfiVariables = true;
  26.  
  27. boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest;
  28.  
  29. services.ananicy = {
  30. enable = true;
  31. rulesProvider = pkgs.ananicy-rules-cachyos;
  32. };
  33.  
  34. hardware.enableAllFirmware = true;
  35.  
  36. sound.enable = true;
  37. nixpkgs.config.pipewire = true;
  38. security.rtkit.enable = true;
  39. services.pipewire = {
  40. enable = true;
  41. alsa.enable = true;
  42. alsa.support32Bit = true;
  43. pulse.enable = true;
  44. # If you want to use JACK applications, uncomment this
  45. jack.enable = true;
  46. };
  47.  
  48. services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
  49. "monitor.bluez.properties" = {
  50. "bluez5.enable-sbc-xq" = true;
  51. "bluez5.enable-msbc" = true;
  52. "bluez5.enable-hw-volume" = true;
  53. "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
  54. };
  55. };
  56.  
  57. # networking.hostName = "nixos"; # Define your hostname.
  58. # Pick only one of the below networking options.
  59. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  60. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
  61.  
  62. # Set your time zone.
  63. time.timeZone = "Europe/London";
  64.  
  65. # Configure network proxy if necessary
  66. # networking.proxy.default = "http://user:password@proxy:port/";
  67. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  68.  
  69. # Select internationalisation properties.
  70. # i18n.defaultLocale = "en_US.UTF-8";
  71. # console = {
  72. # font = "Lat2-Terminus16";
  73. # keyMap = "us";
  74. # useXkbConfig = true; # use xkb.options in tty.
  75. # };
  76.  
  77. security.apparmor.enable = true;
  78.  
  79. virtualisation.docker.enable = true;
  80. virtualisation.libvirtd.enable = true;
  81.  
  82. programs.dconf.enable = true;
  83.  
  84. services.power-profiles-daemon.enable = false;
  85.  
  86. services.tlp = {
  87. enable = true;
  88. settings = {
  89. CPU_DRIVER_OPMODE_ON_AC="active";
  90. CPU_DRIVER_OPMODE_ON_BAT="active";
  91.  
  92. CPU_SCALING_GOVERNOR_ON_AC = "performance";
  93. CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
  94.  
  95. CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
  96. CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
  97.  
  98. CPU_MIN_PERF_ON_AC = 0;
  99. CPU_MAX_PERF_ON_AC = 100;
  100. CPU_MIN_PERF_ON_BAT = 0;
  101. CPU_MAX_PERF_ON_BAT = 80;
  102.  
  103. DISK_DEVICES="nvme0n1";
  104.  
  105. DISK_APM_LEVEL_ON_AC="254 254";
  106. DISK_APM_LEVEL_ON_BAT="128 128";
  107.  
  108. DISK_SPINDOWN_TIMEOUT_ON_AC="0 0";
  109. DISK_SPINDOWN_TIMEOUT_ON_BAT="30 30";
  110.  
  111. DISK_IOSCHED="mq-deadline mq-deadline";
  112.  
  113. PLATFORM_PROFILE_ON_AC="performance";
  114. PLATFORM_PROFILE_ON_BAT="balanced";
  115.  
  116. RUNTIME_PM_ON_AC="on";
  117. RUNTIME_PM_ON_BAT="auto";
  118.  
  119. PCIE_ASPM_ON_AC="default";
  120. PCIE_ASPM_ON_BAT="powersave";
  121.  
  122. #Optional helps save long term battery health
  123. # START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
  124. # STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
  125.  
  126. };
  127. };
  128.  
  129. # Enable the X11 windowing system.
  130. services.xserver.enable = true;
  131. services.greetd = {
  132. enable = true;
  133. settings = {
  134. default_session = {
  135. command = "${pkgs.hyprland}/bin/Hyprland -c ${pkgs.nwg-hello}/etc/nwg-hello/hyprland.conf";
  136. };
  137. };
  138. };
  139.  
  140. # Configure keymap in X11
  141. services.xserver.xkb.layout = "gb";
  142. # services.xserver.xkb.options = "eurosign:e,caps:escape";
  143.  
  144. fonts.fonts = with pkgs; [
  145. nerdfonts
  146. meslo-lgs-nf
  147. ];
  148.  
  149. services.gvfs.enable = true;
  150.  
  151. # Enable CUPS to print documents.
  152. # services.printing.enable = true;
  153.  
  154. programs.hyprland = {
  155. enable = true;
  156. };
  157. services.dbus.enable = true;
  158. xdg.portal = {
  159. enable = true;
  160. wlr.enable = true;
  161. extraPortals = [
  162. pkgs.xdg-desktop-portal-gtk
  163. ];
  164. };
  165. services.displayManager.sddm.enable = true;
  166. services.desktopManager.plasma6.enable = true;
  167.  
  168. # Enable touchpad support (enabled default in most desktopManager).
  169. services.libinput.enable = true;
  170.  
  171. programs.fish.enable = true;
  172. users.defaultUserShell = pkgs.fish;
  173.  
  174. # Define a user account. Don't forget to set a password with ‘passwd’.
  175. users.users.harry = {
  176. shell = pkgs.fish;
  177. isNormalUser = true;
  178. extraGroups = [ "wheel" "input" "docker" "audio" ]; # Enable ‘sudo’ for the user.
  179. packages = with pkgs; [
  180. ];
  181. };
  182.  
  183. # List packages installed in system profile. To search, run:
  184. # $ nix search wget
  185. environment.systemPackages = with pkgs; [
  186. neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  187. wget
  188. hyprlock
  189. hyprpaper
  190. hypridle
  191. waybar
  192. wofi
  193. nwg-displays
  194. nwg-drawer
  195. nwg-hello
  196. kitty
  197. networkmanagerapplet
  198. xdg-desktop-portal-hyprland
  199. fishPlugins.pure
  200. swww
  201. xdg-desktop-portal-gtk
  202. xwayland
  203. meson
  204. wayland-protocols
  205. wayland-utils
  206. wl-clipboard
  207. killall
  208. virt-manager
  209. swaylock
  210. lm_sensors
  211. git
  212. gh
  213. vulnix
  214. bat
  215. lsof
  216. ];
  217.  
  218. # Some programs need SUID wrappers, can be configured further or are
  219. # started in user sessions.
  220. # programs.mtr.enable = true;
  221. # programs.gnupg.agent = {
  222. # enable = true;
  223. # enableSSHSupport = true;
  224. # };
  225.  
  226. # List services that you want to enable:
  227.  
  228. # Enable the OpenSSH daemon.
  229. # services.openssh.enable = true;
  230.  
  231. # Open ports in the firewall.
  232. # networking.firewall.allowedTCPPorts = [ ... ];
  233. # networking.firewall.allowedUDPPorts = [ ... ];
  234. # Or disable the firewall altogether.
  235. # networking.firewall.enable = false;
  236.  
  237. # Copy the NixOS configuration file and link it from the resulting system
  238. # (/run/current-system/configuration.nix). This is useful in case you
  239. # accidentally delete configuration.nix.
  240. # system.copySystemConfiguration = true;
  241.  
  242. # This option defines the first version of NixOS you have installed on this particular machine,
  243. # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
  244. #
  245. # Most users should NEVER change this value after the initial install, for any reason,
  246. # even if you've upgraded your system to a new NixOS release.
  247. #
  248. # This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
  249. # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
  250. # to actually do that.
  251. #
  252. # This value being lower than the current NixOS release does NOT mean your system is
  253. # out of date, out of support, or vulnerable.
  254. #
  255. # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
  256. # and migrated your data accordingly.
  257. #
  258. # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
  259. system.stateVersion = "24.05"; # Did you read the comment?
  260.  
  261. }
  262.  
  263.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement