spacepaste

  1.  
  2. # cat /etc/nixos/configuration.nix
  3. { config, pkgs, ... }:
  4. let nixos-unstable = import <nixos-unstable> {}; in
  5. {
  6. boot.kernelPackages = pkgs.linuxPackages_latest;
  7. nixpkgs.overlays = [(self: super: {
  8. unstable = import <nixos-unstable>{};
  9. })];
  10. imports =
  11. [
  12. ./hardware-configuration.nix
  13. ./exwm-overlay.nix
  14. ];
  15. # Auto Updates
  16. system.autoUpgrade.enable = true;
  17. # Use the systemd-boot EFI boot loader.
  18. boot.loader.systemd-boot.enable = true;
  19. boot.loader.timeout = 999999;
  20. boot.loader.efi.canTouchEfiVariables = true;
  21. # Set-up shared partition
  22. fileSystems."/mnt/shared" = {
  23. device = "/dev/disk/by-uuid/2AC4782EC477FB01";
  24. fsType = "ntfs";
  25. options = [ "users" "rw" "uid=1000" "gid=1000" ];
  26. };
  27. # ZFS customizations
  28. services.zfs.autoSnapshot.enable = true;
  29. services.zfs.autoScrub.enable = true;
  30. # Swap
  31. swapDevices = [
  32. { device = "/dev/sda7"; }
  33. ];
  34. # Select internationalisation properties.
  35. i18n = {
  36. consoleFont = "Lat2-Terminus16";
  37. consoleKeyMap = "us";
  38. defaultLocale = "en_US.UTF-8";
  39. };
  40. # Set-Up Networking Stuff
  41. networking.hostName = "LATITUDE-NIXOS";
  42. networking.networkmanager.enable = true;
  43. networking.hostId = "47c501b5";
  44. # Set your time zone.
  45. time.timeZone = "America/Los_Angeles";
  46. # Fonts
  47. fonts = {
  48. enableDefaultFonts = true;
  49. enableFontDir = true;
  50. enableGhostscriptFonts = true;
  51. fonts = with pkgs; [
  52. symbola
  53. noto-fonts
  54. noto-fonts-cjk
  55. noto-fonts-emoji
  56. nerdfonts
  57. ];
  58. };
  59. # No Suspending
  60. services.logind.lidSwitch = "ignore";
  61. # I'm fine with closed-source stuff
  62. nixpkgs.config.allowUnfree = true;
  63. # Packages
  64. environment.systemPackages = with pkgs; [
  65. acpi
  66. alsaUtils
  67. arandr
  68. aspell
  69. aspellDicts.en
  70. aspellDicts.en-computers
  71. aspellDicts.en-science
  72. binutils
  73. bluez
  74. bluez-tools
  75. cabal2nix
  76. citra
  77. coq
  78. direnv
  79. nixos-unstable.discord
  80. firefox-bin
  81. fzf
  82. gitAndTools.gitFull
  83. gnupg
  84. gnuplot
  85. haskellPackages.cabal-install
  86. haskellPackages.ghc
  87. haskellPackages.hlint
  88. haskellPackages.hoogle
  89. htop
  90. killall
  91. kpcli
  92. libreoffice
  93. ncurses.dev
  94. netcat
  95. nix-prefetch-git
  96. ntfs3g
  97. p7zip
  98. pandoc
  99. pango
  100. pavucontrol
  101. pciutils
  102. pianobar
  103. pinta
  104. qemu
  105. qutebrowser
  106. ripgrep
  107. sbcl
  108. scrot
  109. syslinux
  110. usbutils
  111. steam
  112. # steam-run
  113. sxiv
  114. tasksh
  115. taskwarrior
  116. texlive.combined.scheme-full
  117. unzip
  118. unrar
  119. virtmanager
  120. vlc
  121. wine
  122. wget
  123. wgetpaste
  124. xclip
  125. xorg.xbacklight
  126. xorg.xrandr
  127. xterm
  128. ];
  129. hardware.bluetooth.enable = true;
  130. hardware.opengl.driSupport32Bit = true;
  131. # Virtualization
  132. virtualisation.libvirtd.enable = true;
  133. # Printing
  134. services.printing.enable = true;
  135. services.printing.drivers = with pkgs; [
  136. gutenprint
  137. brgenml1cupswrapper
  138. brgenml1lpr
  139. ];
  140. # Shell Config
  141. programs.zsh = {
  142. enable = true;
  143. enableCompletion = true;
  144. interactiveShellInit = ''
  145. setopt correct
  146. bindkey -v'';
  147. ohMyZsh = {
  148. enable = true;
  149. plugins = [ "cabal" "git" "sudo" "systemd" "vi-mode" "wd" ];
  150. theme = "bureau";
  151. };
  152. shellAliases = {
  153. am = "alsamixer";
  154. xbl = "xbacklight";
  155. grep = "rg -S";
  156. tb = "nc termbin.com 9999";
  157. uninstall = "nix-env -q | fzf | xargs -I{} nix-env -e {}";
  158. };
  159. };
  160. users.defaultUserShell = pkgs.zsh;
  161. programs.command-not-found.enable = true;
  162. # Power Management
  163. services.acpid.enable = true;
  164. # Sound
  165. hardware.pulseaudio = {
  166. enable = true;
  167. package = pkgs.pulseaudioFull;
  168. };
  169. # Haskell
  170. services.hoogle.enable = true;
  171. services.hoogle.packages = hp: with hp; [ megaparsec parser-combinators recursion-schemes ];
  172. # Enable the X11 windowing system.
  173. services.xserver = {
  174. enable = true;
  175. layout = "us, gr";
  176. xkbOptions = "grp:shift_toggle, grp_led:caps, caps:escape, compose:menu";
  177. synaptics = {
  178. enable = true;
  179. vertEdgeScroll = true;
  180. vertTwoFingerScroll = true;
  181. scrollDelta = 111;
  182. tapButtons = true;
  183. };
  184. displayManager.lightdm = {
  185. enable = true;
  186. };
  187. desktopManager.xterm.enable = true;
  188. desktopManager.default = "none";
  189. windowManager = {
  190. default = "exwm";
  191. exwm = {
  192. enable = true;
  193. enableDefaultConfig = false;
  194. };
  195. };
  196. };
  197. # Define a user account.
  198. users.users = {
  199. avi = {
  200. isNormalUser = true;
  201. description = "Avi Caspe";
  202. group = "users";
  203. extraGroups = [ "networkmanager" "wheel" "audio" "systemd-journal" "libvirtd" ];
  204. };
  205. };
  206. # Enable Sudo
  207. security.sudo = {
  208. enable = true;
  209. wheelNeedsPassword = true;
  210. };
  211. # The NixOS release to be compatible with for stateful data such as databases.
  212. system.stateVersion = "17.09";
  213. }
  214.