Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 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.  
  7. {
  8. imports =
  9. [ # Include the results of the hardware scan.
  10. ./hardware-configuration.nix
  11. ];
  12.  
  13. #allowDiscards = true;
  14. boot.initrd.luks.devices = [
  15. {
  16. name = "root";
  17. device = "/dev/sda3";
  18. preLVM = true;
  19. }
  20. ];
  21.  
  22. # Use the gummiboot efi boot loader.
  23. # boot.loader.gummiboot.enable = true;
  24. boot.loader.efi.canTouchEfiVariables = true;
  25. boot.loader.grub.device = "/dev/sda";
  26. boot.loader.grub.memtest86.enable = true;
  27.  
  28. boot.kernelParams = [ "libata.force=noncqtrim,noncq" ];
  29.  
  30. # options snd_hda_intel enable=0,1
  31. # options libata.force=noncq
  32. boot.extraModprobeConfig = ''
  33. options snd_hda_intel index=1,0
  34. '';
  35.  
  36. boot.kernelPackages = pkgs.linuxPackages_4_3;
  37.  
  38. networking.hostName = "nixos"; # Define your hostname.
  39. networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  40.  
  41. networking.extraHosts = ''
  42. 127.0.0.1 nixos
  43. ::1 nixos
  44. '';
  45.  
  46. # this is key for Lenovo x250
  47. powerManagement.scsiLinkPolicy = "max_performance";
  48.  
  49. # Select internationalisation properties.
  50. # i18n = {
  51. # consoleFont = "Lat2-Terminus16";
  52. # consoleKeyMap = "us";
  53. # defaultLocale = "en_US.UTF-8";
  54. # };
  55.  
  56. # Set your time zone.
  57. time.timeZone = "Europe/Berlin";
  58.  
  59. nixpkgs.config = {
  60. allowUnfree = true;
  61. firefox = {
  62. enableGoogleTalkPlugin = true;
  63. # enableAdobeFlash = true;
  64. };
  65. };
  66.  
  67. # List packages installed in system profile. To search by name, run:
  68. # $ nix-env -qaP | grep wget
  69. environment.systemPackages = with pkgs; [
  70. bind
  71. wget
  72. vimHugeX
  73. rxvt_unicode
  74. binutils
  75. inetutils
  76. irssi
  77. ack
  78. jq
  79. sudo
  80. gitAndTools.gitFull
  81. firefoxWrapper
  82. chromium
  83. htop
  84. gnumake
  85. xpdf
  86. gcc
  87. zip
  88. unzip
  89. feh
  90. emacs
  91. pciutils
  92. xorg.xev
  93.  
  94. update-resolv-conf
  95.  
  96. haskellPackages.xmonad
  97. haskellPackages.xmobar
  98. dmenu
  99. xclip
  100. slock
  101.  
  102. # fonts
  103. xfontsel
  104. xlsfonts
  105. dejavu_fonts
  106. ];
  107.  
  108. # List services that you want to enable:
  109.  
  110. # acpid
  111. services.acpid.enable = true;
  112.  
  113. # Fingerprint reader
  114. # services.fprintd.enable = true;
  115.  
  116. # MySQL
  117. services.mysql = {
  118. enable = true;
  119. package = pkgs.mysql;
  120. user = "aaronlevin";
  121. dataDir = "/home/aaronlevin/mysql/data";
  122. };
  123.  
  124. # Enable CUPS to print documents.
  125. services.printing.enable = true;
  126.  
  127. # Enable the OpenSSH daemon.
  128. services.openssh = {
  129. enable = true;
  130. extraConfig = ''
  131. '';
  132. };
  133.  
  134. # Enable the X11 windowing system.
  135. services.xserver = {
  136. enable = true;
  137. windowManager.xmonad.enable = true;
  138. windowManager.xmonad.enableContribAndExtras = true;
  139. windowManager.default = "xmonad";
  140. desktopManager.xterm.enable = false;
  141. desktopManager.default = "none";
  142.  
  143. synaptics = {
  144. enable = true;
  145. twoFingerScroll = true;
  146. palmDetect = true; horizontalScroll = true;
  147. };
  148.  
  149. displayManager.sessionCommands = ''
  150. ${pkgs.xlibs.xset}/bin/xset r rate 200 60
  151. [[ -f ~/.Xresources ]] && ${pkgs.xlibs.xrdb}/bin/xrdb -merge ~/.Xresources
  152. xrandr --output eDP1 --primary
  153. xrandr --output DP1 --right-of eDP1
  154. feh --bg-scale /etc/images/haskell.png
  155. '';
  156.  
  157.  
  158. exportConfiguration = true;
  159. xkbOptions = "ctrl:swap_lalt_lctl, caps:super";
  160. };
  161.  
  162. services.openvpn = {
  163. enable = true;
  164. servers = {
  165. client = {
  166. config = ''
  167. REDACTED
  168. '';
  169. up = ''
  170. echo nameserver $nameserver | ${pkgs.openresolv}/sbin/resolvconf -m 0 -a $dev
  171. ${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf
  172. '';
  173. down = ''
  174. ${pkgs.openresolv}/bin/resolvconf -d $dev
  175. # REDACTED
  176. ${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf
  177. '';
  178. };
  179. };
  180. };
  181.  
  182. virtualisation.docker = {
  183. enable = true;
  184. };
  185.  
  186. security.sudo.wheelNeedsPassword = false;
  187.  
  188. # Define a user account. Don't forget to set a password with ‘passwd’.
  189. users.extraUsers.aaronlevin = {
  190. isNormalUser = true;
  191. uid = 1000;
  192. extraGroups = ["wheel" "docker"];
  193. };
  194.  
  195. fonts = {
  196. enableFontDir = true;
  197. enableGhostscriptFonts = true;
  198. fonts = [
  199. pkgs.corefonts
  200. pkgs.clearlyU
  201. pkgs.cm_unicode
  202. pkgs.dejavu_fonts
  203. pkgs.freefont_ttf
  204. pkgs.terminus_font
  205. pkgs.ttf_bitstream_vera
  206. ];
  207. };
  208.  
  209. # The NixOS release to be compatible with for stateful data such as databases.
  210. system.stateVersion = "15.09";
  211.  
  212. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement