Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Edit this configuration file to define what should be installed on
- # your system. Help is available in the configuration.nix(5) man page
- # and in the NixOS manual (accessible by running ‘nixos-help’).
- { config, pkgs, ... }:
- {
- imports =
- [ # Include the results of the hardware scan.
- ./hardware-configuration.nix
- ];
- #allowDiscards = true;
- boot.initrd.luks.devices = [
- {
- name = "root";
- device = "/dev/sda3";
- preLVM = true;
- }
- ];
- # Use the gummiboot efi boot loader.
- # boot.loader.gummiboot.enable = true;
- boot.loader.efi.canTouchEfiVariables = true;
- boot.loader.grub.device = "/dev/sda";
- boot.loader.grub.memtest86.enable = true;
- boot.kernelParams = [ "libata.force=noncqtrim,noncq" ];
- # options snd_hda_intel enable=0,1
- # options libata.force=noncq
- boot.extraModprobeConfig = ''
- options snd_hda_intel index=1,0
- '';
- boot.kernelPackages = pkgs.linuxPackages_4_3;
- networking.hostName = "nixos"; # Define your hostname.
- networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
- networking.extraHosts = ''
- 127.0.0.1 nixos
- ::1 nixos
- '';
- # this is key for Lenovo x250
- powerManagement.scsiLinkPolicy = "max_performance";
- # Select internationalisation properties.
- # i18n = {
- # consoleFont = "Lat2-Terminus16";
- # consoleKeyMap = "us";
- # defaultLocale = "en_US.UTF-8";
- # };
- # Set your time zone.
- time.timeZone = "Europe/Berlin";
- nixpkgs.config = {
- allowUnfree = true;
- firefox = {
- enableGoogleTalkPlugin = true;
- # enableAdobeFlash = true;
- };
- };
- # List packages installed in system profile. To search by name, run:
- # $ nix-env -qaP | grep wget
- environment.systemPackages = with pkgs; [
- bind
- wget
- vimHugeX
- rxvt_unicode
- binutils
- inetutils
- irssi
- ack
- jq
- sudo
- gitAndTools.gitFull
- firefoxWrapper
- chromium
- htop
- gnumake
- xpdf
- gcc
- zip
- unzip
- feh
- emacs
- pciutils
- xorg.xev
- update-resolv-conf
- haskellPackages.xmonad
- haskellPackages.xmobar
- dmenu
- xclip
- slock
- # fonts
- xfontsel
- xlsfonts
- dejavu_fonts
- ];
- # List services that you want to enable:
- # acpid
- services.acpid.enable = true;
- # Fingerprint reader
- # services.fprintd.enable = true;
- # MySQL
- services.mysql = {
- enable = true;
- package = pkgs.mysql;
- user = "aaronlevin";
- dataDir = "/home/aaronlevin/mysql/data";
- };
- # Enable CUPS to print documents.
- services.printing.enable = true;
- # Enable the OpenSSH daemon.
- services.openssh = {
- enable = true;
- extraConfig = ''
- '';
- };
- # Enable the X11 windowing system.
- services.xserver = {
- enable = true;
- windowManager.xmonad.enable = true;
- windowManager.xmonad.enableContribAndExtras = true;
- windowManager.default = "xmonad";
- desktopManager.xterm.enable = false;
- desktopManager.default = "none";
- synaptics = {
- enable = true;
- twoFingerScroll = true;
- palmDetect = true; horizontalScroll = true;
- };
- displayManager.sessionCommands = ''
- ${pkgs.xlibs.xset}/bin/xset r rate 200 60
- [[ -f ~/.Xresources ]] && ${pkgs.xlibs.xrdb}/bin/xrdb -merge ~/.Xresources
- xrandr --output eDP1 --primary
- xrandr --output DP1 --right-of eDP1
- feh --bg-scale /etc/images/haskell.png
- '';
- exportConfiguration = true;
- xkbOptions = "ctrl:swap_lalt_lctl, caps:super";
- };
- services.openvpn = {
- enable = true;
- servers = {
- client = {
- config = ''
- REDACTED
- '';
- up = ''
- echo nameserver $nameserver | ${pkgs.openresolv}/sbin/resolvconf -m 0 -a $dev
- ${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf
- '';
- down = ''
- ${pkgs.openresolv}/bin/resolvconf -d $dev
- # REDACTED
- ${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf
- '';
- };
- };
- };
- virtualisation.docker = {
- enable = true;
- };
- security.sudo.wheelNeedsPassword = false;
- # Define a user account. Don't forget to set a password with ‘passwd’.
- users.extraUsers.aaronlevin = {
- isNormalUser = true;
- uid = 1000;
- extraGroups = ["wheel" "docker"];
- };
- fonts = {
- enableFontDir = true;
- enableGhostscriptFonts = true;
- fonts = [
- pkgs.corefonts
- pkgs.clearlyU
- pkgs.cm_unicode
- pkgs.dejavu_fonts
- pkgs.freefont_ttf
- pkgs.terminus_font
- pkgs.ttf_bitstream_vera
- ];
- };
- # The NixOS release to be compatible with for stateful data such as databases.
- system.stateVersion = "15.09";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement