Advertisement
Guest User

nixConf

a guest
Apr 22nd, 2020
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.76 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. ## to update system run: sudo nixos-rebuild switch
  6.  
  7.  
  8.  
  9.  
  10. { config, pkgs, ... }:
  11.  
  12. {
  13. imports =
  14. [ # Include the results of the hardware scan.
  15. ./hardware-configuration.nix
  16. ];
  17.  
  18. #https://github.com/reflex-frp/reflex-platform/blob/develop/notes/NixOS.md
  19.  
  20. nix.binaryCaches = [ "https://cache.nixos.org/" "https://nixcache.reflex-frp.org" ];
  21. nix.binaryCachePublicKeys = [ "ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=" ];
  22.  
  23. systemd.extraConfig = ''
  24. DefaultTimeoutStopSec=10s
  25. DefaultTimeoutStartSec=10s
  26. '';
  27.  
  28.  
  29. nixpkgs.config = {
  30. allowUnfree = true;
  31. # oraclejdk.accept_license = true;
  32. };
  33.  
  34. ## to install avr-gcc
  35. nixpkgs.config.allowUnsupportedSystem = true;
  36.  
  37.  
  38. boot.kernelPackages = pkgs.linuxPackages_4_19;
  39. # https://nixos.wiki/wiki/Backlight#brightnessctl
  40. #hardware.brightnessctl.enable = true;
  41.  
  42. programs.adb.enable = true;
  43.  
  44. users.users.greghab.packages =
  45. with pkgs;[xorg.xf86inputevdev xorg.xf86inputsynaptics xorg.xf86inputlibinput xorg.xf86videointel jq xorg.xorgserver emacs libreoffice pcmanfm lmms ardour cadence rxvt_unicode-with-plugins neofetch lxappearance pywal feh libvterm htop lmms ardour system-config-printer brlaser brscan4 paper-icon-theme breeze-gtk breeze-qt5 shadowfox rstudioWrapper R openjdk auctex mplayer mpv eclipses.eclipse-java jetbrains.idea-community android-studio kdenlive jetbrains.pycharm-community redshift texlive.combined.scheme-full evince mupdf undervolt keepassxc nextcloud-client cbatticon networkmanagerapplet chromium vim dina-font flameshot udiskie polybar arandr rofi xorg.xbacklight gtk3-x11 xorg.xmodmap obs-studio brightnessctl firefox-devedition-bin elmPackages.elm simple-scan qt5ct rPackages.Rcpp rPackages.Rcpp11 glibc gfortran pavucontrol s-tui stress haskell.compiler.ghcjs tor-browser-bundle-bin anki erlang git thunderbird haskellPackages.ghcjs-dom-jsaddle haskellPackages.jsaddle haskellPackages.jsaddle-dom stack haskellPackages.servant cabal-install ghc haskellPackages.miso discord busybox leafpad nix-zsh-completions zsh zsh-completions kdeFrameworks.kwallet kdeApplications.kwalletmanager gparted inkscape ffmpeg frei0r google-chrome gnumake dfu-programmer xournalpp zlib haskellPackages.zlib postman urbanterror haskellPackages.arbtt sshfs syncthing pandoc youtube-dl octaveFull virtualboxWithExtpack linuxPackages.virtualbox virtmanager libvirt qemu virglrenderer minitube smtube ghcid signal-desktop wxcam imagemagick appimage-run docker deluge gitlab-runner file bind ddcutil lutris playonlinux p7zip woeusb ntfs3g logisim ncdu gsmartcontrol aspell hunspell hunspellDicts.en_US-large hunspellDicts.en-us-large aspellDicts.en-computers aspellDicts.en aspellDicts.en-science javaPackages.junit_4_12 xorg.xf86inputkeyboard xorg.xf86inputlibinput xorg.xf86inputmouse xorg.xf86inputevdev xorg.xhost wmname xorg.xorgserver xorg.xf86inputsynaptics xorg.xf86inputsynaptics poppler_utils nodejs awscli aws-sam-cli mindforger unclutter-xfixes pnmixer volumeicon python37Packages.pip zip nomacs android-file-transfer mattermost-desktop x42-plugins unar unrar tigervnc remmina xorg.xcursorgen xorg.xcursorthemes hll2390dw-cups binutils-unwrapped riot-web riot-desktop steam-run steam arduino vlc vscodium slic3r openscad clojure leiningen python37Packages.tkinter python27Packages.tkinter python37Packages.jupyterlab python37Packages.jupyterlab_launcher zoom-us valgrind qtcreator jetbrains.clion kdevelop-unwrapped compton xarchiver qpdfview gnome3.file-roller xfce.thunar];
  46.  
  47. programs.dconf.enable = true;
  48.  
  49. #environment.systemPackages = with pkgs;
  50. # [ xorg.xf86inputkeyboard xorg.xf86inputlibinput xorg.xf86inputmouse xorg.xf86inputevdev xorg.xhost wmname brightnessctl];
  51.  
  52. hardware.opengl.enable = true;
  53. hardware.opengl.driSupport = true;
  54.  
  55. virtualisation.docker.enable = true;
  56. virtualisation.virtualbox.host.enable = true;
  57. users.extraGroups.vboxusers.members = [ "greghab" ];
  58. virtualisation.virtualbox.host.enableExtensionPack = true;
  59.  
  60. virtualisation.libvirtd.enable = true;
  61.  
  62.  
  63. # STEAM::............................................................................
  64. hardware.opengl.driSupport32Bit = true;
  65. hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
  66. hardware.pulseaudio.support32Bit = true;
  67. environment.systemPackages = with pkgs; [
  68. steam
  69. (steam.override { extraPkgs = pkgs: [ mono gtk3 gtk3-x11 libgdiplus zlib ]; nativeOnly = true; }).run
  70. xorg.xf86inputkeyboard xorg.xf86inputlibinput xorg.xf86inputmouse xorg.xf86inputevdev xorg.xhost wmname brightnessctl xorg.xorgserver
  71. ];
  72. #.......................................................................................
  73.  
  74. # use the systemd-boot EFI boot loader.
  75. boot.loader.systemd-boot.enable = true;
  76. boot.loader.efi.canTouchEfiVariables = true;
  77.  
  78. networking.hostName = "nixGreg"; # Define your hostname.
  79. networking.networkmanager.enable = true;
  80. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  81.  
  82. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  83. # Per-interface useDHCP will be mandatory in the future, so this generated config
  84. # replicates the default behaviour.
  85. networking.useDHCP = false;
  86. networking.interfaces.enp0s20u2u4u2.useDHCP = true;
  87. networking.interfaces.enp0s25.useDHCP = true;
  88. networking.interfaces.wlp3s0.useDHCP = true;
  89.  
  90. # Configure network proxy if necessary
  91. # networking.proxy.default = "http://user:password@proxy:port/";
  92. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  93.  
  94. # Select internationalisation properties.
  95. console.keyMap = "dvorak";
  96. i18n = {
  97. # consoleFont = "Lat2-Terminus16";
  98. #consoleKeyMap = "dvorak";
  99. defaultLocale = "en_US.UTF-8";
  100. };
  101.  
  102. # Set your time zone.
  103. time.timeZone = "America/Los_Angeles";
  104.  
  105. # List packages installed in system profile. To search, run:
  106. # $ nix search wget
  107. # environment.systemPackages = with pkgs; [
  108. # wget vim
  109. # ];
  110.  
  111. # Some programs need SUID wrappers, can be configured further or are
  112. # started in user sessions.
  113. # programs.mtr.enable = true;
  114. # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
  115.  
  116. # List services that you want to enable:
  117.  
  118. # Enable the OpenSSH daemon.
  119. services.openssh.enable = true;
  120.  
  121. # Open ports in the firewall.
  122. # networking.firewall.allowedTCPPorts = [ ... ];
  123. # networking.firewall.allowedUDPPorts = [ ... ];
  124. # Or disable the firewall altogether.
  125. # networking.firewall.enable = false;
  126.  
  127. # Enable CUPS to print documents.
  128. services.printing.enable = true;
  129. services.avahi.enable = true;
  130. services.avahi.nssmdns = true;
  131. #services.printing.drivers = [pkgs.brlaser, pkgs.hplipWithPlugin, pkgs.brgenml1lpr, pkgs.brgenml1cupswrapper];
  132. services.printing.drivers = [pkgs.brlaser pkgs.hplipWithPlugin pkgs.brgenml1lpr pkgs.brgenml1cupswrapper];
  133.  
  134. # https://nixos.wiki/wiki/Scanners
  135. # hardware.sane.enable = true;
  136.  
  137. # imports = [
  138. # <nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
  139. # ./hardware-configuration.nix
  140. # ];
  141.  
  142. hardware = {
  143. sane = {
  144. enable = true;
  145. brscan4 = {
  146. enable = true;
  147. netDevices = {
  148. home = { model = "HL-L2380DW"; ip = "192.168.0.171"; };
  149. };
  150. };
  151. };
  152. };
  153.  
  154. # Enable sound.
  155. sound.enable = true;
  156. hardware.pulseaudio.enable = true;
  157.  
  158. # Enable the X11 windowing system.
  159. # services.xserver.enable = true;
  160. # services.xserver.layout = "us";
  161. # services.xserver.xkbVariant = "dvp";
  162. # services.xserver.xkbOptions = "eurosign:e";
  163.  
  164. # Enable touchpad support.
  165. # services.xserver.libinput.enable = true;
  166.  
  167. # Enable the KDE Desktop Environment.
  168. # services.xserver.windowManager.i3.enable = true;
  169. # services.xserver.displayManager.sddm.enable = true;
  170. # services.xserver.desktopManager.plasma5.enable = true;
  171.  
  172. # Define a user account. Don't forget to set a password with ‘passwd’.
  173. users.users.greghab = {
  174. isNormalUser = true;
  175. home = "/home/greghab";
  176. extraGroups = [ "wheel" "networkmanager" "video" "scanner" "lp" "vboxusers" "libvirtd" "kvm" "docker" "audio" "adbusers"]; # Enable ‘sudo’ for the user.
  177. }; # "jackaudio"
  178.  
  179. programs.zsh.enable = true;
  180.  
  181. users.extraUsers.greghab = {
  182. shell = pkgs.zsh;
  183. };
  184.  
  185.  
  186. # Start Emacs and EXWM
  187.  
  188. # services.xserver.displayManager.startx.enable = true;
  189. # services.xserver = {
  190. # enable = true;
  191. # layout = "us";
  192. # xkbVariant = "dvp";
  193. # libinput = {
  194. # enable = true;
  195. # };
  196. # displayManager = {
  197. # startx.enable = true;
  198. # };
  199. # };
  200.  
  201. # Start Xfce4
  202.  
  203. services.xserver = {
  204. enable = true;
  205. layout = "us";
  206. xkbVariant = "dvp";
  207. libinput = {
  208. enable = true;
  209. };
  210. desktopManager = {
  211. default = "xfce";
  212. xterm.enable = false;
  213. xfce.enable = true;
  214. };
  215. };
  216.  
  217. # https://github.com/NixOS/nixpkgs/issues/27050
  218. environment.variables.QT_QPA_PLATFORMTHEME = "qt5ct";
  219. programs.qt5ct.enable = true;
  220.  
  221.  
  222.  
  223. ## trying to fix why my computer keeps suspending by itself after a given amount of time...
  224. services.xserver.displayManager.gdm.autoSuspend = false;
  225.  
  226. # disable lid
  227. services.logind.extraConfig = "HandleLidSwitch=ignore";
  228.  
  229.  
  230. security.sudo.configFile = "%wheel ALL = (ALL) ALL";
  231.  
  232. # This value determines the NixOS release with which your system is to be
  233. # compatible, in order to avoid breaking some software such as database
  234. # servers. You should change this only after NixOS release notes say you
  235. # should.
  236. system.stateVersion = "20.03"; # Did you read the comment?
  237.  
  238. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement