Created
May 24, 2016 09:58
-
-
Save pallavagarwal07/ed1303355d48616de313a4eb1a47e058 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
]; | |
nix.binaryCaches = ["http://hydra.nixos.org/" "http://cache.nixos.org/"]; | |
nix.buildCores = 4; | |
nix.requireSignedBinaryCaches = false; | |
boot.loader.gummiboot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
boot.blacklistedKernelModules = [ "i915" ]; | |
boot.extraModprobeConfig = "options rtl8723be fwlps=0"; | |
boot.kernel.sysctl = {"vm.swappiness" = 10;}; | |
networking.hostName = "nixos"; | |
networking.networkmanager.enable = true; | |
networking.dhcpcd.enable = true; | |
time.timeZone = "Asia/Kolkata"; | |
hardware.pulseaudio.enable = true; | |
hardware.pulseaudio.package = pkgs.pulseaudioFull; | |
hardware.bluetooth.enable = true; | |
hardware.bumblebee.enable = true; | |
hardware.opengl.driSupport32Bit = true; | |
hardware.pulseaudio.support32Bit = true; | |
hardware.sane.enable = true; | |
nixpkgs.config = { | |
allowUnfree = true; | |
packageOverrides = pkgs: { | |
bluez = pkgs.bluez5; | |
rofi = pkgs.rofi.override{i3Support=true;}; | |
}; | |
}; | |
nixpkgs.config.firefox = { | |
enableAdobeFlash = true; | |
}; | |
# Select internationalisation properties. | |
# i18n = { | |
# consoleFont = "Lat2-Terminus16"; | |
# consoleKeyMap = "us"; | |
# defaultLocale = "en_US.UTF-8"; | |
# }; | |
# Set your time zone. | |
# time.timeZone = "Europe/Amsterdam"; | |
# List packages installed in system profile. To search by name, run: | |
# | |
# $ nix-env -qaP | grep wget | |
environment.systemPackages = with pkgs; [ | |
ctags zlib firefoxWrapper pavucontrol pulseaudioFull | |
dmenu2 zathura zathuraCollection.zathura_pdf_poppler tmux | |
readline networkmanager rxvt_unicode | |
wget pcmanfm vlc gvfs gamin xfce.tumbler desktop_file_utils | |
udisks2 bc pciutils networkmanagerapplet dhcpcd | |
unzip nix-repl git xclip ntp feh shared_mime_info | |
pamixer light screenfetch deluge inkscape mysql opencv | |
clang gnumake41 gcc5 openssh tig gnuplot | |
nodejs gimp cmake ntfs3g rofi | |
file simple-scan emacs wine zip | |
haskellPackages.pandoc | |
dpkg patchelf binutils teamviewer | |
octave | |
]; | |
# List services that you want to enable: | |
# Enable the OpenSSH daemon. | |
# Enable CUPS to print documents. | |
# services.printing.enable = true; | |
boot.kernelPackages = pkgs.linuxPackages // { | |
virtualbox = pkgs.linuxPackages.virtualbox.override { | |
enableExtensionPack = true; | |
pulseSupport = true; | |
}; | |
}; | |
# Enable the X11 windowing system. | |
virtualisation.docker.enable = true; | |
virtualisation.virtualbox.host.enable = true; | |
services.openssh.enable = true; | |
services.teamviewer.enable = true; | |
services.xserver.enable = true; | |
services.xserver.layout = "us"; | |
services.xserver.autorun = true; | |
services.xserver.desktopManager.xterm.enable = false; | |
services.xserver.windowManager.i3.enable = true; | |
services.xserver.videoDrivers = ["nvidia-beta" "intel"]; | |
services.xserver.displayManager.sessionCommands = "${pkgs.networkmanagerapplet}/bin/nm-applet &"; | |
services.xserver.synaptics = { | |
enable = true; | |
twoFingerScroll = true; | |
buttonsMap = [ 1 3 2 ]; # enables right clicking with two fingers | |
maxSpeed = "2.0"; | |
additionalOptions = '' | |
Option "SoftButtonAreas" "3471 5664 4057 8128 0 0 0 0" | |
Option "ClickFinger1" "1" | |
Option "ClickFinger2" "3" | |
Option "ClickFinger3" "2" | |
Option "TapButton1" "1" | |
Option "TapButton2" "3" | |
Option "TapButton3" "2" | |
Option "AccelFactor" "0.015" | |
''; | |
}; | |
#services.httpd = { | |
#enable = true; | |
#enablePHP = true; | |
#extraModules = [ { name = "php5"; path = "${pkgs.php}/modules/libphp5.so"; } ]; | |
#}; | |
#services.mysql = { | |
#enable = true; | |
#}; | |
programs.zsh.enable = true; | |
# Enable the KDE Desktop Environment. | |
# services.xserver.displayManager.kdm.enable = true; | |
# services.xserver.desktopManager.kde4.enable = true; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
fileSystems."/home" = { | |
device = "/dev/sda5"; | |
fsType = "ext4"; | |
}; | |
users.extraUsers.pallav = { | |
isNormalUser = true; | |
home = "/home/pallavag"; | |
description = "Pallav Agarwal"; | |
extraGroups = ["wheel" "networkmanager" "docker" "vboxusers"]; | |
uid = 1000; | |
shell = "/run/current-system/sw/bin/zsh"; | |
}; | |
security.sudo.extraConfig = '' | |
ALL ALL = (root) NOPASSWD: ${pkgs.light}/bin/light | |
ALL ALL = (root) NOPASSWD: ${pkgs.systemd}/bin/shutdown | |
ALL ALL = (root) NOPASSWD: ${pkgs.systemd}/bin/reboot | |
''; | |
systemd.services.nvidia-control-devices = { | |
wantedBy = [ "multi-user.target" ]; | |
serviceConfig.ExecStart = "${pkgs.linuxPackages.nvidia_x11}/bin/nvidia-smi"; | |
}; | |
# The NixOS release to be compatible with for stateful data such as databases. | |
system.stateVersion = "16.03"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment