Advertisement
Guest User

Untitled

a guest
Apr 16th, 2024
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.16 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. dbus-hyprland-environment = pkgs.writeTextFile {
  8. name = "dbus-hyprland-environment";
  9. destination = "/bin/dbus-hyprland-environment";
  10. executable = true;
  11.  
  12. text = ''
  13. dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=hyprland
  14. systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
  15. systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
  16. '';
  17. };
  18. configure-gtk = pkgs.writeTextFile {
  19. name = "configure-gtk";
  20. destination = "/bin/configure-gtk";
  21. executable = true;
  22. text = let
  23. schema = pkgs.gsettings-desktop-schemas;
  24. datadir = "${schema}/share/gesettings/schemas/${schema.name}";
  25. in ''
  26. export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
  27. gnome_schema=org.gnome.desktop.interface
  28. gesettings set $gnome_schema gtk-theme 'Adwaita'
  29. '';
  30. };
  31. in {
  32. #services.clamav.enable = true;
  33. #virtualisation.waydroid.enable = true;
  34. nix.settings.auto-optimise-store = true;
  35. services.avahi.enable = true;
  36. programs.xwayland.enable = true;
  37. services.dbus.enable = true;
  38. xdg.portal = {
  39. enable = true;
  40. wlr.enable = true;
  41. # gtk portal needed to make gtk apps happy
  42. extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
  43. };
  44.  
  45. services.geoclue2 = {
  46. enable = true;
  47. enableDemoAgent = true;
  48. enableWifi = true;
  49.  
  50. appConfig = {
  51. gnome-maps = {
  52. isAllowed = true;
  53. isSystem = true;
  54. };
  55. "io.elementary.desktop.agent-geoclue2" = {
  56. isAllowed = true;
  57. isSystem = true;
  58. };
  59. redshift = {
  60. isAllowed = true;
  61. isSystem = true;
  62. };
  63. };
  64. };
  65.  
  66. programs.sway.enable = true;
  67. #xdg.portal.enable = true;
  68. #xdg.portal.wlr.enable = true;
  69. system.autoUpgrade.enable = false;
  70. nix.optimise.automatic = true;
  71. services.logind.lidSwitch = "suspend";
  72. programs.seahorse.enable = true;
  73. security.pam.services.gdm.enableGnomeKeyring = true;
  74. ##############################################################
  75. powerManagement.enable = true;
  76. powerManagement.resumeCommands = ''
  77. echo "This should show up in the journal after resuming."
  78. '';
  79. powerManagement.powerDownCommands = ''
  80. '';
  81. ##############################################################
  82. nix.settings.experimental-features = [ "nix-command" "flakes" ];
  83. nix.settings = {
  84. substituters = ["https://hyprland.cachix.org"];
  85. trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
  86. };
  87. imports = [ # Include the results of the hardware scan.
  88. ./hardware-configuration.nix
  89. ]; #BROTHER SCANNER
  90. #######################################################
  91. hardware.sane.enable = true;
  92. hardware.sane.brscan4.enable = true;
  93. hardware.sane.brscan4.netDevices = {
  94. work_scanner = { model = "MFC-J5320DW"; ip = "192.168.43.102"; };
  95. };
  96. ########################################################
  97. boot.kernelPackages = pkgs.linuxPackages_zen;
  98. services.blueman.enable = true;
  99. ########################################################
  100. ########################################################
  101. ################NOT GOOD################################
  102. nixpkgs.config.permittedInsecurePackages = [
  103. "python-2.7.18.6"
  104. ];
  105. ########################################################
  106. ########################################################
  107. # Bootloader.
  108. # Use the GRUB 2 boot loader.
  109. boot.loader.grub.enable = true;
  110. boot.loader.grub.efiSupport = true;
  111. boot.loader.grub.useOSProber = false;
  112. # boot.loader.grub.efiInstallAsRemovable = true;
  113. boot.loader.efi.efiSysMountPoint = "/boot/efi";
  114. # Define on which hard drive you want to install Grub.
  115. boot.loader.grub.device = "nodev"; # or "nodev" for efi only
  116. # boot.loader.systemd-boot.enable = true;
  117. boot.loader.efi.canTouchEfiVariables = true;
  118. #boot.loader.efi.efiSysMountPoint = "/boot/efi";
  119. #ecryptfs
  120. security.pam.enableEcryptfs = false;
  121. networking.hostName = "xpowx1"; # Define your hostname.
  122. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  123. hardware.bluetooth.enable = true;
  124. # Configure network proxy if necessary
  125. # networking.proxy.default = "http://user:password@proxy:port/";
  126. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  127.  
  128. # Enable networking
  129. networking.networkmanager.enable = true;
  130.  
  131. # Set your time zone.
  132. time.timeZone = "Australia/Adelaide";
  133.  
  134. # Select internationalisation properties.
  135. i18n.defaultLocale = "en_GB.UTF-8";
  136.  
  137. i18n.extraLocaleSettings = {
  138. LC_ADDRESS = "en_AU.UTF-8";
  139. LC_IDENTIFICATION = "en_AU.UTF-8";
  140. LC_MEASUREMENT = "en_AU.UTF-8";
  141. LC_MONETARY = "en_AU.UTF-8";
  142. LC_NAME = "en_AU.UTF-8";
  143. LC_NUMERIC = "en_AU.UTF-8";
  144. LC_PAPER = "en_AU.UTF-8";
  145. LC_TELEPHONE = "en_AU.UTF-8";
  146. LC_TIME = "en_AU.UTF-8";
  147. };
  148. # Fonts
  149. fonts.fonts = with pkgs; [
  150. fira-code
  151. fira
  152. fira-code-symbols
  153. nerdfonts
  154. ];
  155.  
  156. # Enable the X11 windowing system.
  157. services.xserver.enable = true;
  158.  
  159. # Enable the GNOME Desktop Environment.
  160. services.xserver.displayManager.gdm.wayland = true;
  161. services.xserver.displayManager.gdm.enable = true;
  162. services.xserver.desktopManager.gnome.enable = false;
  163. programs.dconf.enable = true;
  164. services.gnome.evolution-data-server.enable = true;
  165. # optional to use google/nextcloud calendar
  166. services.gnome.gnome-online-accounts.enable = true;
  167. # optional to use google/nextcloud calendar
  168. services.gnome.gnome-keyring.enable = true;
  169. # Configure keymap in X11
  170. services.xserver = {
  171. layout = "us";
  172. xkbVariant = "";
  173. };
  174.  
  175. # Enable CUPS to print documents.
  176. services.printing.enable = true;
  177. services.printing.drivers = [ pkgs.brlaser ];
  178. # Enable sound with pipewire.
  179. sound.enable = true;
  180. hardware.pulseaudio.enable = false;
  181. security.rtkit.enable = true;
  182. services.pipewire = {
  183. enable = true;
  184. alsa.enable = true;
  185. alsa.support32Bit = true;
  186. pulse.enable = true;
  187. # If you want to use JACK applications, uncomment this
  188. #jack.enable = true;
  189. };
  190. # use the example session manager (no others are packaged yet so this is enabled by default,
  191. # no need to redefine it in your config for now)
  192. #media-session.enable = true;
  193.  
  194.  
  195. # Enable touchpad support (enabled default in most desktopManager).
  196. services.xserver.libinput.enable = true;
  197.  
  198. # Define a user account. Don't forget to set a password with ‘passwd’.
  199. users.users.dav = {
  200. isNormalUser = true;
  201. description = "dav";
  202. extraGroups = [ "networkmanager" "wheel" "scanner" "lp" "tty" "input" "video" "audio" "systemd-journal" ];
  203. packages = with pkgs; [
  204. # thunderbird
  205. ];
  206. };
  207. ########################waybar experimental features##############
  208. nixpkgs.overlays = [
  209. (self: super: {
  210. waybar = super.waybar.overrideAttrs (oldAttrs: {
  211. mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
  212. });
  213. })
  214. ];
  215. # Allow unfree packages
  216. nixpkgs.config.allowUnfree = true;
  217.  
  218. # List packages installed in system profile. To search, run:
  219. # $ nix search wget
  220. environment.systemPackages = with pkgs; [
  221. # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  222. # libnl
  223. # hibernate
  224. # nix-software-center
  225. # nixos-conf-editor
  226. # waydroid
  227. brave
  228. arch-install-scripts
  229. gnupg
  230. vulnix
  231. krita
  232. gnome.cheese
  233. avahi
  234. geoclue2
  235. gnome.gnome-maps
  236. gnome.gnome-calendar
  237. galculator
  238. xwayland
  239. xdg-desktop-portal-wlr
  240. xdg-desktop-portal-gtk
  241. onlyoffice-bin
  242. wlogout
  243. gnome.libgnome-keyring
  244. libsecret
  245. gnome.gnome-keyring
  246. gnome.seahorse
  247. gthumb
  248. swaybg
  249. lxappearance
  250. vscodium
  251. epdfview
  252. cinnamon.nemo-with-extensions
  253. unzip
  254. nmap
  255. gnome.simple-scan
  256. cups
  257. xsane
  258. brscan4
  259. gvfs
  260. gnome.gnome-clocks
  261. xarchiver
  262. gnumake
  263. git
  264. feh
  265. pulseaudio
  266. # electron-mail
  267. wlsunset
  268. redshift
  269. batsignal
  270. blueman
  271. nanorc
  272. networkmanagerapplet
  273. brightnessctl
  274. firefox
  275. waybar
  276. terminator
  277. wayland
  278. xdg-utils # for openning default programms when clicking links
  279. glib # gsettings
  280. dracula-theme # gtk theme
  281. gnome3.adwaita-icon-theme # default gnome cursors
  282. swaylock-effects
  283. swayidle
  284. grim # screenshot functionality
  285. slurp # screenshot functionality
  286. wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
  287. wofi # wayland clone of dmenu
  288. swaynotificationcenter # notification system developed by swaywm maintain
  289. tdesktop
  290. starship
  291. fish
  292. neofetch
  293. ecryptfs
  294. ecryptfs-helper
  295. wget
  296. libinput-gestures
  297. os-prober
  298. vlc
  299. ncdu
  300. ];
  301.  
  302. # Some programs need SUID wrappers, can be configured further or are
  303. # started in user sessions.
  304. # programs.mtr.enable = true;
  305. # programs.gnupg.agent = {
  306. # enable = true;
  307. # enableSSHSupport = true;
  308. # };
  309.  
  310. # List services that you want to enable:
  311.  
  312. # Enable the OpenSSH daemon.
  313. # services.openssh.enable = true;
  314.  
  315. # Open ports in the firewall.
  316. # networking.firewall.allowedTCPPorts = [ ... ];
  317. # networking.firewall.allowedUDPPorts = [ ... ];
  318. # Or disable the firewall altogether.
  319. # networking.firewall.enable = false;
  320.  
  321. # This value determines the NixOS release from which the default
  322. # settings for stateful data, like file locations and database versions
  323. # on your system were taken. It‘s perfectly fine and recommended to leave
  324. # this value at the release version of the first install of this system.
  325. # Before changing this value read the documentation for this option
  326. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  327. system.stateVersion = "22.11"; # Did you read the comment?
  328. }
  329.  
  330.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement