diff --git a/dotfiles/Xresources b/dotfiles/Xresources index ebc2165..6436cb5 100644 --- a/dotfiles/Xresources +++ b/dotfiles/Xresources @@ -49,7 +49,7 @@ URxvt*loginShell: true *foreground: S_base0 *fadeColor: S_base03 *cursorColor: S_base1 -*pointerColorBackground:S_base01 +pointerColorBackground:S_base01 *pointerColorForeground:S_base1 #define S_yellow #b58900 @@ -126,9 +126,7 @@ URxvt.tabbed.title: no ! URxvt.keysym.Control-Down: \033[1;5B ! URxvt.keysym.Control-Left: \033[1;5D ! URxvt.keysym.Control-Right: \033[1;5C - -! URxvt doesn't nicely send C-S- to the underlying app so they have to be -! added here as they become necessary. + ! URxvt.keysym.C-S-0: Xft.dpi: 96 diff --git a/dotfiles/xmonad/lib/Bar.hi b/dotfiles/xmonad/lib/Bar.hi index 4c456d5..ae69a1e 100644 Binary files a/dotfiles/xmonad/lib/Bar.hi and b/dotfiles/xmonad/lib/Bar.hi differ diff --git a/dotfiles/xmonad/lib/Bar.o b/dotfiles/xmonad/lib/Bar.o index ef05ebd..b50c09a 100644 Binary files a/dotfiles/xmonad/lib/Bar.o and b/dotfiles/xmonad/lib/Bar.o differ diff --git a/dotfiles/xmonad/lib/PerWorkspaceDirs.hi b/dotfiles/xmonad/lib/PerWorkspaceDirs.hi index ca20174..4167b8d 100644 Binary files a/dotfiles/xmonad/lib/PerWorkspaceDirs.hi and b/dotfiles/xmonad/lib/PerWorkspaceDirs.hi differ diff --git a/dotfiles/xmonad/lib/PerWorkspaceDirs.o b/dotfiles/xmonad/lib/PerWorkspaceDirs.o index 70c56ce..569759d 100644 Binary files a/dotfiles/xmonad/lib/PerWorkspaceDirs.o and b/dotfiles/xmonad/lib/PerWorkspaceDirs.o differ diff --git a/dotfiles/xmonad/lib/Spacing.hi b/dotfiles/xmonad/lib/Spacing.hi index 4bf39b0..ff51f6f 100644 Binary files a/dotfiles/xmonad/lib/Spacing.hi and b/dotfiles/xmonad/lib/Spacing.hi differ diff --git a/dotfiles/xmonad/lib/Spacing.o b/dotfiles/xmonad/lib/Spacing.o index d5bd5f8..a536ff7 100644 Binary files a/dotfiles/xmonad/lib/Spacing.o and b/dotfiles/xmonad/lib/Spacing.o differ diff --git a/dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.hi b/dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.hi index 3d77595..8ab64ae 100644 Binary files a/dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.hi and b/dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.hi differ diff --git a/dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.o b/dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.o index 2d5fe04..17ba462 100644 Binary files a/dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.o and b/dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.o differ diff --git a/dotfiles/xmonad/xmonad-x86_64-linux b/dotfiles/xmonad/xmonad-x86_64-linux index 7d47de3..49a3ba9 100755 Binary files a/dotfiles/xmonad/xmonad-x86_64-linux and b/dotfiles/xmonad/xmonad-x86_64-linux differ diff --git a/dotfiles/xmonad/xmonad.errors b/dotfiles/xmonad/xmonad.errors index e69de29..d0c7053 100644 --- a/dotfiles/xmonad/xmonad.errors +++ b/dotfiles/xmonad/xmonad.errors @@ -0,0 +1,26 @@ + +xmonad.hs:132:28: Warning: + In the use of ‘defaultConfig’ + (imported from XMonad, but defined in XMonad.Config): + Deprecated: "Use def (from Data.Default, and re-exported by XMonad and XMonad.Config) instead." + +xmonad.hs:135:34: Warning: + In the use of ‘defaultPP’ (imported from XMonad.Hooks.DynamicLog): + Deprecated: "Use def (from Data.Default, and re-exported by XMonad.Hooks.DynamicLog) instead." + +xmonad.hs:178:49: Warning: + In the use of ‘defaultConfig’ + (imported from XMonad, but defined in XMonad.Config): + Deprecated: "Use def (from Data.Default, and re-exported by XMonad and XMonad.Config) instead." + +xmonad.hs:203:63: Warning: + In the use of ‘defaultXPConfig’ (imported from XMonad.Prompt): + Deprecated: "Use def (from Data.Default, and re-exported from XMonad.Prompt) instead." + +xmonad.hs:240:62: Warning: + In the use of ‘defaultXPConfig’ (imported from XMonad.Prompt): + Deprecated: "Use def (from Data.Default, and re-exported from XMonad.Prompt) instead." + +xmonad.hs:241:59: Warning: + In the use of ‘defaultXPConfig’ (imported from XMonad.Prompt): + Deprecated: "Use def (from Data.Default, and re-exported from XMonad.Prompt) instead." diff --git a/dotfiles/xmonad/xmonad.hi b/dotfiles/xmonad/xmonad.hi index c27e92d..7c92a4a 100644 Binary files a/dotfiles/xmonad/xmonad.hi and b/dotfiles/xmonad/xmonad.hi differ diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 4d1dfd2..bcdf3e3 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -269,7 +269,7 @@ launcherConfig = LauncherConfig { pathToHoogle = "/home/zubin/.cabal/bin/hoogle" altMask = mod1Mask myTerminal :: String -myTerminal = "urxvtc" +myTerminal = "urxvt" myBitmapsDir :: String myBitmapsDir = "~/.xmonad/dzen2/" diff --git a/dotfiles/xmonad/xmonad.o b/dotfiles/xmonad/xmonad.o index dd67d67..e157a2d 100644 Binary files a/dotfiles/xmonad/xmonad.o and b/dotfiles/xmonad/xmonad.o differ diff --git a/dotfiles/zshrc b/dotfiles/zshrc index a923a5c..1403431 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -36,14 +36,6 @@ alias stoppg='pg_ctl -D /usr/local/var/postgres stop' # This is for the mac GUI version of emacs. alias emacs-gui='open -a /Applications/Emacs.app $1' -export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" - -# This is for nix if it exists -if [ -f ~/.nix-profile/etc/profile.d/nix.sh ]; -then - source ~/.nix-profile/etc/profile.d/nix.sh -fi - parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } @@ -64,16 +56,36 @@ plugins=(git brew npm coffee) # User configuration -export PATH="$PATH:$HOME/.rvm/bin:/usr/lib/rstudio/bin" # Add RVM to PATH for scripting -. ~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true -# Haskell stuff -export PATH=~/.cabal/bin:$PATH -export PATH=.cabal-sandbox/bin:$PATH +if [[ "$OSTYPE" == "darwin"* ]]; then + export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" + export PATH="$PATH:$HOME/.rvm/bin:/usr/lib/rstudio/bin" # Add RVM to PATH for scripting + . ~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true + + # Haskell stuff + export PATH=~/.cabal/bin:$PATH + export PATH=.cabal-sandbox/bin:$PATH + + # Git Town + export PATH=~/git-town/src:$PATH + MANPATH=$MANPATH:~/git-town/man + + # NOTE: 'Whence' is the ZSH idiom for bash's 'type' + export PRENPMPATH=$PATH + if [ -n "$(whence -f npm)" ]; + then + NPMPATH="$(npm bin)" + + if [ -d "$NPMPATH" ]; then + PATH=$NPMPATH:$PRENPMPATH + else + PATH=$PRENPMPATH + fi + + export PATH=$PATH + fi +fi -# Git Town -export PATH=~/git-town/src:$PATH -MANPATH=$MANPATH:~/git-town/man precmd(){ vcs_info @@ -87,17 +99,3 @@ RPROMPT="%{$fg[white]%}\${vcs_info_msg_0_}%{$reset_color%}" PROMPT="%{$fg[white]%}┌%{$reset_color%}[%{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}]─[%{$fg[green]%}%d%{$reset_color%}] %{$fg[white]%}└─╼%{$reset_color%} " -# NOTE: 'Whence' is the ZSH idiom for bash's 'type' -export PRENPMPATH=$PATH -if [ -n "$(whence -f npm)" ]; -then - NPMPATH="$(npm bin)" - - if [ -d "$NPMPATH" ]; then - PATH=$NPMPATH:$PRENPMPATH - else - PATH=$PRENPMPATH - fi - - export PATH=$PATH -fi diff --git a/nix/audio/default.nix b/nix/audio/default.nix new file mode 100644 index 0000000..e826a09 --- /dev/null +++ b/nix/audio/default.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + pulseaudioFull # Audio + ]; + + hardware = { + pulseaudio.enable = true; + }; +} diff --git a/nix/comms/default.nix b/nix/comms/default.nix new file mode 100644 index 0000000..caece06 --- /dev/null +++ b/nix/comms/default.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + irssi + skype + ]; +} diff --git a/nix/configuration.nix b/nix/configuration.nix new file mode 100644 index 0000000..018628b --- /dev/null +++ b/nix/configuration.nix @@ -0,0 +1,51 @@ +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ./display + ./audio + ./input + ./users + ./development + ./comms + ./software + ]; + + # Use the gummiboot efi boot loader. + boot.loader.gummiboot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + nixpkgs.config = { + allowUnfree = true; + }; + + boot.initrd.luks.devices = [ + { name = "root"; device = "/dev/sda3"; } + ]; + + boot.initrd.luks.cryptoModules = [ "aes" "sha256" "sha1" "cbc" ]; + + networking.hostName = "ares"; # Define your hostname. + networking.networkmanager.enable = true; + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + i18n = { + consoleFont = "inconsolata"; + consoleKeyMap = "us"; + defaultLocale = "en_US.UTF-8"; + }; + + time.timeZone = "US/Pacific"; + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # The NixOS release to be compatible with for stateful data such as databases. + system.stateVersion = "16.03"; + +} diff --git a/nix/development/default.nix b/nix/development/default.nix new file mode 100644 index 0000000..4ee6051 --- /dev/null +++ b/nix/development/default.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: +{ + environment = { + variables = { + EDITOR = "nvim"; + }; + + systemPackages = with pkgs; [ + bar-xft # Lightweight xcb based bar + cabal-install # Haskell package installer + curl # Tool for general HTTP, FTP, etc work + ghc # Haskell Compiler + git # Source control + neovim # Better vim + python3 # Python 3 + silver-searcher # Better than grep + vim # Regular ole' vim + wget # Standard GNU package for HTTP, FTP, etc file retrieval + ]; + }; +} diff --git a/nix/display/default.nix b/nix/display/default.nix new file mode 100644 index 0000000..b12d2ab --- /dev/null +++ b/nix/display/default.nix @@ -0,0 +1,53 @@ +{ config, pkgs, ... }: +{ + imports = [ + ./terminal.nix + ]; + + environment.systemPackages = with pkgs; [ + arandr # GUI frontend for xrandr + compton # Windowing system + dmenu # Application launcher + feh # Wallpaper manager + python3Packages.udiskie # Automatically mount USB drives + scrot # Screenshot software + unclutter # Mouse hider + xlibs.xmodmap # keyboard reconfiguration + xmonad-with-packages # Tiling window manager + xorg.xbacklight # Backlight manager + ]; + + # services.xserver.videoDriver = + + services = { + udisks2.enable = true; + + xserver = { + enableTCP = false; + exportConfiguration = false; + enable = true; + layout = "us"; + + displayManager = { + sessionCommands = '' + xset r rate 300 30 + unclutter -grab & + udiskie & + feh --bg-fill ~/bgs/dark_night.jpg & + compton --config /dev/null & + ''; + }; + + desktopManager = { + xterm.enable = false; + xfce.enable = false; + }; + + windowManager = { + xmonad.enable = true; + xmonad.enableContribAndExtras = true; + default = "xmonad"; + }; + }; + }; +} diff --git a/nix/display/terminal.nix b/nix/display/terminal.nix new file mode 100644 index 0000000..d39bee1 --- /dev/null +++ b/nix/display/terminal.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + rxvt_unicode-with-plugins # Terminal emulator + tmux # Terminal multiplexer + tree # Better file tree + zsh # ZShell + xclip # Command line clipboard tool + ]; + + programs.zsh.enable = true; +} + diff --git a/nix/hardware-configuration.nix b/nix/hardware-configuration.nix new file mode 100644 index 0000000..f86f718 --- /dev/null +++ b/nix/hardware-configuration.nix @@ -0,0 +1,32 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, ... }: + +{ + imports = + [ + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.kernelModules = [ "fbcon" "kvm_intel" ]; # kvm_intel is disabled on the t440s + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/mapper/vg-root"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { + mountPoint = "/boot"; + device = "/dev/sda2"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/mapper/vg-swap"; } + ]; + + nix.maxJobs = 8; +} diff --git a/nix/input/default.nix b/nix/input/default.nix new file mode 100644 index 0000000..f3acf09 --- /dev/null +++ b/nix/input/default.nix @@ -0,0 +1,6 @@ +{ config, pkgs, ... }: +{ + imports = [ + ./touchpad.nix + ]; +} diff --git a/nix/input/touchpad.nix b/nix/input/touchpad.nix new file mode 100644 index 0000000..618bcb4 --- /dev/null +++ b/nix/input/touchpad.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + xorg.xf86inputsynaptics + ]; + + services.xserver = { + synaptics = { + enable = true; + twoFingerScroll = true; + }; + }; +} diff --git a/nix/software/default.nix b/nix/software/default.nix new file mode 100644 index 0000000..376f674 --- /dev/null +++ b/nix/software/default.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + byzanz # Screen recording software + chromium # Browser + gtk # For GTK+ themes + htop # System monitor + mplayer # Video player + xdotool # Diagnostic tool for mouse and keyboard + ]; + + nixpkgs.config = { + chromium = { + enablePepperFlash = true; + enablePepperPdf = true; + }; + }; +} diff --git a/nix/users/default.nix b/nix/users/default.nix new file mode 100644 index 0000000..8febf8e --- /dev/null +++ b/nix/users/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: +{ + users.extraUsers.taylor = { + isNormalUser = true; + home = "/home/taylor"; + description = "taylor"; + extraGroups = [ "wheel" "networkmanager" ]; + shell = "/run/current-system/sw/bin/zsh"; + uid = 1000; + }; +}