Guest User

nix config

a guest
Oct 4th, 2016
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.20 KB | None | 0 0
  1. { config, pkgs, ... }:
  2.  
  3. {
  4.  
  5. ########
  6. # boot #
  7. ########
  8.  
  9. imports =
  10. [ ./hardware-configuration.nix
  11. ];
  12.  
  13. boot.kernelPackages = pkgs.linuxPackages_4_4;
  14.  
  15. boot.kernelModules =
  16. [ "module-bluetooth-discover"
  17. ];
  18.  
  19. boot.initrd.luks.devices = [{ name = "lvm"; device = "/dev/sda2"; preLVM = true; }];
  20.  
  21. boot.loader.generic-extlinux-compatible = {
  22. configurationLimit = 5;
  23. };
  24.  
  25. boot.loader.systemd-boot = {
  26. enable = true;
  27. };
  28.  
  29. boot.loader.efi.canTouchEfiVariables = true;
  30.  
  31. system.stateVersion = "15.09";
  32.  
  33. ############
  34. # hardware #
  35. ############
  36. hardware.pulseaudio = {
  37. enable = true;
  38. support32Bit = true;
  39. };
  40.  
  41. hardware.opengl = {
  42. driSupport32Bit = true;
  43. driSupport = true;
  44. };
  45.  
  46. # hardware.bluetooth.enable = true;
  47.  
  48. ###########
  49. # network #
  50. ###########
  51.  
  52. networking.hostName = "laplace";
  53. networking.networkmanager.enable = true;
  54. networking.dhcpcd.extraConfig =
  55. '' static domain_name_servers=8.8.8.8 8.8.4.4
  56. '';
  57. networking.extraHosts =
  58. ''
  59. '';
  60. networking.firewall.allowedTCPPorts = [ 8000 ];
  61.  
  62. ##########
  63. # locale #
  64. ##########
  65.  
  66. time.timeZone = "America/New_York";
  67.  
  68. i18n = {
  69. consoleFont = "lat9w-16";
  70. consoleKeyMap = "dvorak";
  71. defaultLocale = "en_US.UTF-8";
  72. };
  73.  
  74. fonts = {
  75. fontconfig.enable = true;
  76. enableFontDir = true;
  77. fonts = with pkgs; [
  78. corefonts # Micrsoft free fonts
  79. inconsolata # monospaced
  80. ubuntu_font_family # Ubuntu fonts
  81. ttf_bitstream_vera
  82. xlibs.fontbitstream100dpi
  83. xlibs.fontbitstream75dpi
  84. xlibs.fontbitstreamtype1
  85. vistafonts
  86. unifont
  87. terminus_font
  88. freefont_ttf
  89. liberation_ttf
  90. proggyfonts
  91. cantarell_fonts
  92. dejavu_fonts
  93. dina-font
  94. dosemu_fonts
  95. source-code-pro
  96. ];
  97. };
  98.  
  99. ###########
  100. # nixpkgs #
  101. ###########
  102.  
  103. nix = {
  104. nixPath = [ "/home/nixos" "nixos-config=/home/nixos/configuration.nix" ];
  105. # Normally this is full of keys for work's build servers
  106. binaryCachePublicKeys =
  107. [
  108. ];
  109. binaryCaches =
  110. [
  111. "https://cache.nixos.org/"
  112. ];
  113. };
  114.  
  115. nixpkgs.config = {
  116. allowUnfree = true;
  117. chromium = {
  118. enablePepperFlash = true;
  119. enablePepperPDF = true;
  120. enableWideVine = true;
  121. };
  122. firefox = {
  123. jre = false;
  124. enableGoogleTalkPlugin = true;
  125.  
  126. enableAdobeFlash = false;
  127. };
  128. packageOverrides = pkgs: {
  129. };
  130. };
  131.  
  132. ############
  133. # software #
  134. ############
  135.  
  136. environment.systemPackages = with pkgs;
  137. [ wget
  138. dmenu
  139. gitAndTools.gitFull
  140. haskellPackages.xmonad
  141. chromium
  142. firefoxWrapper
  143. terminator
  144. postgresql
  145. zsh
  146. pavucontrol
  147. taffybar
  148. parcellite
  149. dunst
  150. libnotify
  151. networkmanagerapplet
  152. lxappearance
  153. numix-gtk-theme
  154. lightdm
  155. bluez
  156. ];
  157.  
  158. services.acpid.enable = true;
  159. powerManagement.enable = true;
  160.  
  161. services.openssh.enable = true;
  162.  
  163. services.xserver = {
  164. enable = true;
  165. layout = "us";
  166. xkbVariant = "dvorak";
  167. xkbOptions = "ctrl:nocaps";
  168.  
  169. videoDrivers = [ "intel" ];
  170.  
  171. synaptics = {
  172. enable = true;
  173. accelFactor = "0.05";
  174. horizontalScroll = true;
  175. maxSpeed = "1.5";
  176. minSpeed = "1.0";
  177. palmDetect = true;
  178. tapButtons = true;
  179. twoFingerScroll = true;
  180. vertEdgeScroll = false;
  181. additionalOptions =
  182. '' Option "TapButton1" "1"
  183. Option "TapButton2" "3"
  184. Option "ClickFinger1" "1"
  185. Option "ClickFinger2" "3"
  186. Option "TapAndDragGesture" "0"
  187. Option "ClickTime" "0"
  188. Option "MaxTapTime" "90"
  189. Option "MaxTapMove" "100"
  190. Option "SingleTapTimeout" "0"
  191. Option "PalmMinWidth" "5"
  192. Option "PalmMinZ" "0"
  193. Option "TapButton2" "3"
  194. Option "TapButton3" "2"
  195. '';
  196. };
  197. displayManager.lightdm.enable = true;
  198. windowManager.xmonad = {
  199. enable = true;
  200. haskellPackages = pkgs.haskellPackages;
  201. enableContribAndExtras = true;
  202. extraPackages = haskellPackages:
  203. [ haskellPackages.xmonad-contrib
  204. haskellPackages.taffybar
  205. ];
  206. };
  207. };
  208.  
  209. services.postgresql = {
  210. enable = true;
  211. enableTCPIP = true;
  212. dataDir = "/var/db/postgresql";
  213. initialScript = "/etc/nixos/postgres.sql";
  214. package = pkgs.postgresql94;
  215. port = 5432;
  216. extraConfig =
  217. '' max_pred_locks_per_transaction = 8192
  218. max_wal_senders = 2
  219. wal_level = hot_standby
  220. wal_keep_segments = 8
  221. '';
  222. authentication = pkgs.lib.mkForce
  223. '' local all all ident
  224. host all all 127.0.0.1/32 md5
  225. host all all ::1/128 md5
  226. '';
  227. };
  228.  
  229. services.printing.enable = true;
  230. services.printing.drivers = [ pkgs.hplipWithPlugin ];
  231.  
  232. services.upower.enable = true;
  233.  
  234. #########
  235. # users #
  236. #########
  237.  
  238. users.extraUsers = {
  239. danharaj = {
  240. name = "danharaj";
  241. extraGroups = [ "wheel" "networkmanager" "fuse" "nixmanager" ];
  242. createHome = true;
  243. home = "/home/danharaj";
  244. shell = "/run/current-system/sw/bin/zsh";
  245. };
  246. work = {
  247. name = "work";
  248. extraGroups = [ "wheel" "networkmanager" "nixmanager" ];
  249. createHome = true;
  250. home = "/home/work"; #lul
  251. shell = "/run/current-system/sw/bin/zsh";
  252. };
  253. };
  254.  
  255. users.extraGroups = {
  256. nixmanager = {};
  257. };
  258.  
  259. users.extraGroups.vboxusers.members =
  260. [ "danharaj"
  261. "work"
  262. ];
  263.  
  264. }
Advertisement
Add Comment
Please, Sign In to add comment