Browse Source

Add nix configuration stuff

master
Taylor Bockman 9 years ago
parent
commit
70348e1ba6
  1. 4
      dotfiles/Xresources
  2. BIN
      dotfiles/xmonad/lib/Bar.hi
  3. BIN
      dotfiles/xmonad/lib/Bar.o
  4. BIN
      dotfiles/xmonad/lib/PerWorkspaceDirs.hi
  5. BIN
      dotfiles/xmonad/lib/PerWorkspaceDirs.o
  6. BIN
      dotfiles/xmonad/lib/Spacing.hi
  7. BIN
      dotfiles/xmonad/lib/Spacing.o
  8. BIN
      dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.hi
  9. BIN
      dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.o
  10. BIN
      dotfiles/xmonad/xmonad-x86_64-linux
  11. 26
      dotfiles/xmonad/xmonad.errors
  12. BIN
      dotfiles/xmonad/xmonad.hi
  13. 2
      dotfiles/xmonad/xmonad.hs
  14. BIN
      dotfiles/xmonad/xmonad.o
  15. 38
      dotfiles/zshrc
  16. 10
      nix/audio/default.nix
  17. 7
      nix/comms/default.nix
  18. 51
      nix/configuration.nix
  19. 21
      nix/development/default.nix
  20. 53
      nix/display/default.nix
  21. 13
      nix/display/terminal.nix
  22. 32
      nix/hardware-configuration.nix
  23. 6
      nix/input/default.nix
  24. 13
      nix/input/touchpad.nix
  25. 18
      nix/software/default.nix
  26. 11
      nix/users/default.nix

4
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
@ -127,8 +127,6 @@ URxvt.tabbed.title: no
! 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

BIN
dotfiles/xmonad/lib/Bar.hi

Binary file not shown.

BIN
dotfiles/xmonad/lib/Bar.o

Binary file not shown.

BIN
dotfiles/xmonad/lib/PerWorkspaceDirs.hi

Binary file not shown.

BIN
dotfiles/xmonad/lib/PerWorkspaceDirs.o

Binary file not shown.

BIN
dotfiles/xmonad/lib/Spacing.hi

Binary file not shown.

BIN
dotfiles/xmonad/lib/Spacing.o

Binary file not shown.

BIN
dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.hi

Binary file not shown.

BIN
dotfiles/xmonad/lib/XMonad/Layout/BinarySpacePartition.o

Binary file not shown.

BIN
dotfiles/xmonad/xmonad-x86_64-linux

Binary file not shown.

26
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."

BIN
dotfiles/xmonad/xmonad.hi

Binary file not shown.

2
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/"

BIN
dotfiles/xmonad/xmonad.o

Binary file not shown.

38
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,6 +56,9 @@ plugins=(git brew npm coffee)
# User configuration
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
@ -75,18 +70,6 @@ export PATH=.cabal-sandbox/bin:$PATH
export PATH=~/git-town/src:$PATH
MANPATH=$MANPATH:~/git-town/man
precmd(){
vcs_info
}
# Set up custom prompt
setopt PROMPT_SUBST
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)" ];
@ -101,3 +84,18 @@ then
export PATH=$PATH
fi
fi
precmd(){
vcs_info
}
# Set up custom prompt
setopt PROMPT_SUBST
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%} "

10
nix/audio/default.nix

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
pulseaudioFull # Audio
];
hardware = {
pulseaudio.enable = true;
};
}

7
nix/comms/default.nix

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
irssi
skype
];
}

51
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";
}

21
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
];
};
}

53
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";
};
};
};
}

13
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;
}

32
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 =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
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;
}

6
nix/input/default.nix

@ -0,0 +1,6 @@
{ config, pkgs, ... }:
{
imports = [
./touchpad.nix
];
}

13
nix/input/touchpad.nix

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
xorg.xf86inputsynaptics
];
services.xserver = {
synaptics = {
enable = true;
twoFingerScroll = true;
};
};
}

18
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;
};
};
}

11
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;
};
}
Loading…
Cancel
Save