Last active
September 13, 2019 05:36
-
-
Save jerryaldrichiii/3b6c9a505e0a8fa4cac68e9cab43a4e4 to your computer and use it in GitHub Desktop.
This file contains 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
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
"${builtins.fetchGit https://github.com/rycee/home-manager}/nixos" | |
]; | |
home-manager.users.jerry = { | |
programs = { | |
firefox.enable = true; | |
browserpass = { | |
enable = true; | |
browsers = [ "firefox" ]; | |
}; | |
fzf = { | |
enable = true; | |
enableZshIntegration = true; | |
}; | |
git = { | |
enable = true; | |
userName = "jerryaldrichiii"; | |
userEmail = "[email protected]"; | |
}; | |
neovim = { | |
enable = true; | |
vimAlias = true; | |
extraConfig = '' | |
syntax on | |
au BufRead,BufNewFile Vagrantfile setfiletype ruby | |
set formatoptions-=c | |
set formatoptions-=r | |
set formatoptions-=o | |
set ruler | |
set number | |
set expandtab ts=2 sw=2 ai | |
filetype indent on | |
set spell | |
set bg=dark | |
autocmd FileType python set expandtab ts=4 sw=4 ai | |
autocmd BufWritePre * %s/\s\+$//e | |
''; | |
}; | |
tmux = { | |
enable = true; | |
aggressiveResize = true; | |
clock24 = true; | |
extraConfig = '' | |
setw -g mode-keys vi | |
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection | |
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection | |
set -g default-shell "${pkgs.zsh}/bin/zsh" | |
# New window with default path set to last path | |
bind '"' split-window -c "#{pane_current_path}" | |
bind % split-window -h -c "#{pane_current_path}" | |
bind c new-window -c "#{pane_current_path}" | |
bind C-o select-pane -t :.+ | |
''; | |
}; | |
zsh = { | |
enable = true; | |
oh-my-zsh = { | |
enable = true; | |
theme = "gallois"; | |
plugins = [ "git" ]; | |
}; | |
}; | |
}; | |
xsession = { | |
numlock.enable = true; | |
windowManager.i3 = { | |
enable = true; | |
config.keybindings = pkgs.lib.mkOptionDefault { | |
"Mod4+Shift+Return" = "exec ${pkgs.firefox}/bin/firefox"; | |
}; | |
}; | |
}; | |
services.dunst.enable = true; | |
home = { | |
file.".xinitrc".text = '' | |
exec i3 | |
''; | |
file.".rtorrent.rc".text = '' | |
min_peers = 40 | |
max_peers = 100 | |
min_peers_seed = 1 | |
max_peers_seed = 1 | |
max_uploads = 1 | |
download_rate = 0 | |
upload_rate = 1 | |
directory = ~/Downloads/rtorrent | |
session = ~/Downloads/rtorrent/.session | |
schedule = watch_directory,5,5,load.start=~/Downloads/rtorrent/watch/*.torrent | |
schedule = untied_directory,5,5,stop_untied= | |
schedule = low_diskspace,5,60,close_low_diskspace=100M | |
encryption = allow_incoming,enable_retry | |
dht = auto | |
dht_port = 6881 | |
''; | |
}; | |
xresources.properties = { | |
"xterm.*.background" = "black"; | |
"xterm.*.foreground" = "green"; | |
"xterm.*.selectToClipboard" = true; | |
"xterm*renderFont" = true; | |
"xterm*faceName" = "Hack:style=Regular"; | |
"xterm*faceSize" = "9"; | |
"xterm.vt100.metaSendsEscape" = true; | |
"xterm*charClass" = "33:48,37-38:48,45-47:48,64:48,58:48,126:48,61:48,63:48,43:48,35:48"; | |
}; | |
}; | |
boot = { | |
loader = { | |
systemd-boot = { | |
enable = true; | |
configurationLimit = 20; | |
}; | |
efi.canTouchEfiVariables = true; | |
}; | |
supportedFilesystems = [ "zfs" ]; | |
}; | |
networking = { | |
wireless.enable = true; | |
firewall.enable = true; | |
hostName = "bombadil"; | |
hostId = "e050a886"; # Needed for ZFS | |
}; | |
time.timeZone = "America/Los_Angeles"; | |
nixpkgs.config.allowUnfree = true; | |
environment.systemPackages = with pkgs; [ | |
wget ag mpv weechat rtorrent ruby python | |
docker vagrant virtualbox gist arandr w3m | |
curl dbus-glib openvpn pass unzip pass | |
todo-txt-cli scrot feh zathura youtube-dl netcat-gnu | |
htop ncdu mtr jq lsof rsync nmap nload | |
tcpdump gdb xscreensaver | |
source-han-sans-simplified-chinese source-han-sans-traditional-chinese | |
unrar rtorrent redshift | |
]; | |
# Some programs need SUID wrappers, can be configured further or are | |
# started in user sessions. | |
# programs.mtr.enable = true; | |
programs.gnupg.agent = { | |
enable = true; | |
enableSSHSupport = true; | |
}; | |
services = { | |
openssh = { | |
enable = true; | |
ports = [ 2312 ]; | |
openFirewall = true; | |
passwordAuthentication = false; | |
}; | |
printing.enable = true; | |
xserver = { | |
enable = true; | |
layout = "us"; | |
autorun = false; | |
libinput.enable = true; | |
exportConfiguration = true; | |
desktopManager.xterm.enable = true; | |
displayManager = { | |
startx.enable = true; | |
}; | |
}; | |
}; | |
sound.enable = true; | |
hardware.pulseaudio.enable = true; | |
fonts.fonts = [ pkgs.hack-font ]; | |
users.defaultUserShell = pkgs.zsh; | |
users.users.jerry = { | |
isNormalUser = true; | |
initialPassword = "Jerry"; | |
extraGroups = [ "wheel" ]; | |
openssh.authorizedKeys.keys = [ | |
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5OdF2DLrhxNySubo5YjXSnwSbNFTJpXx+ITLQIVrJWlYc8XCNhZD5NBGJciUBw61MjVNAZB0eHPhhaglfuDb9ThIrPUOS/zcEiVEkNNY5C1N2ym5XFaD30GG+jrDWd5gH7qglGlMheJCqiPeKRciRpPNDrQHM3RRwPLc2tZXa0M8zlGZWQbJ5zHR1qxB1lWY1Tt0f8dYCBpHuSWHYEAso2P3RbHs6BrjvY9B7H6NwtaV4qe3YacVzBcu3M98YCEJ4+xWLbNnVogB+Q0ejwMnzbt7dLbbkt5pDmp/3ixVRCRbF3a+3cG3ixhmO3c7vusEOaK4BJgPysiMkcOHTnxqR jerry@xiaolong" | |
]; | |
}; | |
# This value determines the NixOS release with which your system is to be | |
# compatible, in order to avoid breaking some software such as database | |
# servers. You should change this only after NixOS release notes say you | |
# should. | |
system.stateVersion = "19.03"; # Did you read the comment? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment