Advertisement
Guest User

NixOS Config

a guest
Jun 30th, 2023
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.42 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, ... }:
  6. let
  7. unstable = import <nixos-unstable> {
  8. config.allowUnfree = true;
  9. config.permittedInsecurePackages = [
  10. "python-2.7.18.6"
  11. "openssl-1.1.1u"
  12. ];
  13. };
  14.  
  15. in
  16. {
  17. imports =
  18. [ # Include the results of the hardware scan.
  19. ./hardware-configuration.nix
  20. <home-manager/nixos>
  21. ];
  22.  
  23. nix.settings.experimental-features = [ "nix-command" "flakes" ];
  24. nixpkgs.config.allowUnfree = true;
  25.  
  26. # Bootloader.
  27. boot.loader.systemd-boot.enable = true;
  28. boot.loader.efi.canTouchEfiVariables = true;
  29.  
  30. networking.hostName = "yggdrasil"; # Define your hostname.
  31. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  32.  
  33. # Configure network proxy if necessary
  34. # networking.proxy.default = "http://user:password@proxy:port/";
  35. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  36.  
  37. # Enable networking
  38. networking.networkmanager.enable = true;
  39.  
  40. # Setup graphics
  41. hardware.opengl.enable = true;
  42. hardware.opengl.driSupport.enable = true;
  43. hardware.opengl.driSupport32Bit = true;
  44. hardware.opengl.extraPackages = with pkgs; [
  45. rocm-opencl-icd
  46. ];
  47.  
  48. # Enable audio pkgs.dconf
  49. hardware.pulseaudio.enable = true;
  50. hardware.pulseaudio.support32Bit = true;
  51. #services.jack = {
  52. # jackd.enable = true;
  53. # alsa.enable = false;
  54. # loopback = {
  55. # enable = true;
  56. # };
  57. #};
  58.  
  59. # Set your time zone.
  60. time.timeZone = "Europe/Berlin";
  61.  
  62. # Select internationalisation properties.
  63. i18n.defaultLocale = "en_US.UTF-8";
  64.  
  65. i18n.extraLocaleSettings = {
  66. LC_ADDRESS = "de_DE.UTF-8";
  67. LC_IDENTIFICATION = "de_DE.UTF-8";
  68. LC_MEASUREMENT = "de_DE.UTF-8";
  69. LC_MONETARY = "de_DE.UTF-8";
  70. LC_NAME = "de_DE.UTF-8";
  71. LC_NUMERIC = "de_DE.UTF-8";
  72. LC_PAPER = "de_DE.UTF-8";
  73. LC_TELEPHONE = "de_DE.UTF-8";
  74. LC_TIME = "de_DE.UTF-8";
  75. };
  76.  
  77. environment.sessionVariables = rec {
  78. XDG_CACHE_HOME = "$HOME/.cache";
  79. XDG_CONFIG_HOME = "$HOME/.config";
  80. XDG_DATA_HOME = "$HOME/.local/share";
  81. XDG_STATE_HOME = "$HOME/.local/state";
  82. };
  83.  
  84. # Configure keymap in X11
  85. services.xserver = {
  86. layout = "us";
  87. xkbVariant = "";
  88. };
  89. services.gvfs.enable = true;
  90. services.dbus.enable = true;
  91. services.gnome.tracker.enable = true;
  92. services.gnome.tracker-miners.enable = true;
  93. services.flatpak.enable = true;
  94.  
  95. programs.dconf.enable = true;
  96.  
  97. # Define a user account. Don't forget to set a password with ‘passwd’.
  98. users.users.dopfe = {
  99. isNormalUser = true;
  100. description = "<private information>";
  101. extraGroups = [ "networkmanager" "wheel" "audio" "jackaudio" ];
  102. packages = with pkgs; [];
  103. shell = pkgs.zsh;
  104. };
  105.  
  106. security.polkit.enable = true;
  107. xdg.portal = {
  108. enable = true;
  109. wlr.enable = true;
  110. extraPortals = with pkgs; [
  111. xdg-desktop-portal-gtk
  112. xdg-desktop-portal-gnome
  113. ];
  114. };
  115.  
  116. home-manager.users.dopfe = {
  117. dconf = {
  118. enable = true;
  119. settings = {
  120. "org/gnome/desktop/interface" = {
  121. color-scheme = "prefer-dark";
  122. };
  123. };
  124. };
  125.  
  126. gtk = {
  127. enable = true;
  128.  
  129. iconTheme = {
  130. name = "Papirus-Dark";
  131. package = pkgs.papirus-icon-theme;
  132. };
  133.  
  134. theme = {
  135. name = "adw-gtk3-dark";
  136. package = pkgs.adw-gtk3;
  137. };
  138.  
  139. cursorTheme = {
  140. name = "Numix-Cursor";
  141. package = pkgs.numix-cursor-theme;
  142. };
  143. };
  144.  
  145. home.sessionVariables.GTK_THEME = "adw-gtk3-dark";
  146.  
  147. home.stateVersion = "23.05";
  148. programs.home-manager.enable = true;
  149. };
  150.  
  151. programs.zsh = {
  152. enable = true;
  153. ohMyZsh = {
  154. enable = true;
  155. plugins = [ "git" ];
  156. theme = "flazz";
  157. };
  158. };
  159.  
  160. programs.steam.enable = true;
  161.  
  162. # List packages installed in system profile. To search, run:
  163. # $ nix search wget
  164. environment.systemPackages = with pkgs; [
  165. swayfx
  166. swaylock
  167. swayidle
  168. glib
  169. waybar
  170. wl-clipboard
  171. wf-recorder
  172. mako
  173. grim
  174. rofi
  175. pywal
  176. xdg-utils
  177. psmisc
  178.  
  179. adw-gtk3
  180. gnome.adwaita-icon-theme
  181.  
  182. python3
  183. lua
  184. gcc
  185. cmake
  186. meson
  187. zig
  188. rustup
  189.  
  190. qjackctl
  191. pavucontrol
  192.  
  193. unstable.davinci-resolve
  194. gimp
  195. darktable
  196. blender
  197. krita
  198.  
  199. unstable.appflowy
  200. unstable.obsidian
  201. onlyoffice-bin
  202.  
  203. kitty
  204. neovim
  205. firefox
  206. gnome.nautilus
  207. gnome.totem
  208. polkit_gnome
  209. appimage-run
  210.  
  211. wget
  212. curl
  213. git
  214. unzip
  215. rclone
  216. mlocate
  217. ];
  218.  
  219. fonts.fonts = with pkgs; [
  220. noto-fonts
  221. noto-fonts-emoji
  222. (nerdfonts.override { fonts = [ "FiraCode" "Mononoki" ]; })
  223. garamond-libre
  224. cantarell-fonts
  225. ];
  226.  
  227. # Some programs need SUID wrappers, can be configured further or are
  228. # started in user sessions.
  229. # programs.mtr.enable = true;
  230. # programs.gnupg.agent = {
  231. # enable = true;
  232. # enableSSHSupport = true;
  233. # };
  234.  
  235. # List services that you want to enable:
  236.  
  237. # Enable the OpenSSH daemon.
  238. # services.openssh.enable = true;
  239.  
  240. systemd.services.onedrive = {
  241. enable = true;
  242. description = "Mount OneDrive to local storage";
  243. wantedBy = [ "multi-user.target" ];
  244. serviceConfig = {
  245. Type = "idle";
  246. Environment = [ "PATH=/run/wrappers/bin/:$PATH" ];
  247. User = "dopfe";
  248. ExecStart = "${pkgs.rclone}/bin/rclone mount --vfs-cache-mode full --config /home/dopfe/.config/rclone/rclone.conf OneDrive:/ /home/dopfe/OneDrive";
  249. };
  250. };
  251.  
  252. # Open ports in the firewall.
  253. # networking.firewall.allowedTCPPorts = [ ... ];
  254. # networking.firewall.allowedUDPPorts = [ ... ];
  255. # Or disable the firewall altogether.
  256. # networking.firewall.enable = false;
  257.  
  258. # This value determines the NixOS release from which the default
  259. # settings for stateful data, like file locations and database versions
  260. # on your system were taken. It‘s perfectly fine and recommended to leave
  261. # this value at the release version of the first install of this system.
  262. # Before changing this value read the documentation for this option
  263. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  264. system.stateVersion = "23.05"; # Did you read the comment?
  265.  
  266. }
  267.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement