2020-01-01 21:12:08 +00:00
|
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
name = "Matthew Ess";
|
|
|
|
|
email = "daringseal@gmail.com";
|
|
|
|
|
workEmail = "mess@yelp.com";
|
|
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
home = {
|
2020-01-02 00:31:37 +00:00
|
|
|
|
sessionVariables = {
|
|
|
|
|
EDITOR = "vim";
|
|
|
|
|
BROWSER = "firefox";
|
|
|
|
|
TERMINAL = "alacritty";
|
|
|
|
|
};
|
2020-01-01 21:12:08 +00:00
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
# nix utilities
|
|
|
|
|
nixfmt
|
|
|
|
|
nix-prefetch-git
|
|
|
|
|
# command line utilities
|
|
|
|
|
ag
|
|
|
|
|
jq
|
|
|
|
|
tldr
|
2020-01-02 04:44:48 +00:00
|
|
|
|
imagemagick
|
2020-01-01 21:12:08 +00:00
|
|
|
|
# graphical applications
|
2020-01-02 04:44:48 +00:00
|
|
|
|
alacritty
|
2020-01-01 21:12:08 +00:00
|
|
|
|
atom
|
|
|
|
|
enpass
|
2020-01-02 04:44:48 +00:00
|
|
|
|
firefox
|
2020-01-01 21:12:08 +00:00
|
|
|
|
# graphical utilities
|
|
|
|
|
clipmenu
|
2020-01-02 04:44:48 +00:00
|
|
|
|
clipnotify
|
2020-01-01 21:12:08 +00:00
|
|
|
|
dmenu
|
|
|
|
|
i3lock-fancy
|
|
|
|
|
];
|
|
|
|
|
file = {
|
2020-01-02 04:44:48 +00:00
|
|
|
|
".background-image".source = ./assets/background-image;
|
2020-01-01 21:12:08 +00:00
|
|
|
|
".config/fish/fishfile".text = ''
|
|
|
|
|
laughedelic/pisces
|
|
|
|
|
sijad/gitignore
|
|
|
|
|
joehillen/to-fish
|
|
|
|
|
jethrokuan/z
|
|
|
|
|
decors/fish-colored-man
|
|
|
|
|
franciscolourenco/done
|
|
|
|
|
haslersn/fish-nix-completions
|
|
|
|
|
gyakovlev/fish-fzy
|
|
|
|
|
joseluisq/gitnow
|
|
|
|
|
edc/bass
|
|
|
|
|
fishpkg/fish-get
|
|
|
|
|
fishpkg/fish-spin
|
|
|
|
|
oh-my-fish/plugin-bang-bang
|
|
|
|
|
fishpkg/fish-humanize-duration
|
|
|
|
|
jorgebucaran/fish-getopts
|
|
|
|
|
matthewess/fish-autovenv
|
|
|
|
|
'';
|
2020-01-02 04:44:48 +00:00
|
|
|
|
".config/fish/completions/systemctl.fish".source =
|
|
|
|
|
./scripts/systemctl.fish;
|
|
|
|
|
".config/i3status/config".text = ''
|
|
|
|
|
# i3status configuration file.
|
|
|
|
|
# see "man i3status" for documentation.
|
|
|
|
|
|
|
|
|
|
# It is important that this file is edited as UTF-8.
|
|
|
|
|
# The following line should contain a sharp s:
|
|
|
|
|
# ß
|
|
|
|
|
# If the above line is not correctly displayed, fix your editor first!
|
|
|
|
|
|
|
|
|
|
general {
|
|
|
|
|
colors = true
|
|
|
|
|
interval = 5
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
order += "disk /"
|
|
|
|
|
order += "volume master"
|
|
|
|
|
order += "wireless _first_"
|
|
|
|
|
order += "battery 1"
|
|
|
|
|
order += "load"
|
|
|
|
|
order += "tztime local"
|
|
|
|
|
|
|
|
|
|
wireless _first_ {
|
|
|
|
|
format_up = " (%essid - %quality) %ip"
|
|
|
|
|
format_down = "down"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
volume master {
|
|
|
|
|
format = " %volume"
|
|
|
|
|
format_muted = " (%volume)"
|
|
|
|
|
device = "pulse:1"
|
|
|
|
|
mixer = "Master"
|
|
|
|
|
mixer_idx = 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
battery 1 {
|
|
|
|
|
format = "%status %percentage %remaining"
|
|
|
|
|
status_bat = ""
|
|
|
|
|
status_chr = ""
|
|
|
|
|
status_full = ""
|
|
|
|
|
low_threshold = 30
|
|
|
|
|
threshold_type = percentage
|
|
|
|
|
integer_battery_capacity = true
|
|
|
|
|
color_good = "#0000FF"
|
|
|
|
|
path = "/sys/class/power_supply/BAT0/uevent"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
run_watch DHCP {
|
|
|
|
|
pidfile = "/var/run/dhclient*.pid"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
run_watch VPN {
|
|
|
|
|
pidfile = "/var/run/vpnc/pid"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tztime local {
|
|
|
|
|
format = " %h %d, %Y %I:%M:%S"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
load {
|
|
|
|
|
format = " %1min"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
disk "/" {
|
|
|
|
|
format = " %avail free"
|
|
|
|
|
}
|
|
|
|
|
'';
|
2020-01-01 21:12:08 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
nixpkgs = { config.allowUnfree = true; };
|
|
|
|
|
programs = {
|
2020-01-02 00:31:37 +00:00
|
|
|
|
alacritty = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = { font.normal.family = "Fira Code"; };
|
|
|
|
|
};
|
2020-01-01 21:12:08 +00:00
|
|
|
|
bat.enable = true;
|
|
|
|
|
broot.enable = true;
|
|
|
|
|
command-not-found.enable = true;
|
|
|
|
|
direnv.enable = true;
|
|
|
|
|
feh.enable = true;
|
|
|
|
|
firefox.enable = true;
|
|
|
|
|
fish = {
|
|
|
|
|
enable = true;
|
|
|
|
|
interactiveShellInit = ''
|
|
|
|
|
echo 'ヽ(´ᗜ`)ノ welcome ヽ(´ᗜ`)ノ'
|
|
|
|
|
if not functions -q fisher
|
|
|
|
|
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
|
|
|
|
|
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
|
|
|
|
|
fish -c fisher
|
|
|
|
|
end
|
2020-01-02 00:31:37 +00:00
|
|
|
|
fish_vi_key_bindings
|
2020-01-01 21:12:08 +00:00
|
|
|
|
set VIRTUAL_ENV_DISABLE_PROMPT true
|
2020-01-02 04:44:48 +00:00
|
|
|
|
|
|
|
|
|
alias cat=bat
|
|
|
|
|
alias br=broot
|
|
|
|
|
alias tree=br
|
|
|
|
|
alias ack=ag
|
|
|
|
|
alias grep=ag
|
|
|
|
|
alias sys="sudo systemctl"
|
|
|
|
|
alias rebuild="sudo nixos-rebuild switch"
|
|
|
|
|
alias upgrade="sudo nixos-rebuild switch --upgrade"
|
2020-01-01 21:12:08 +00:00
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
git = {
|
|
|
|
|
enable = true;
|
|
|
|
|
userName = "${name}";
|
|
|
|
|
userEmail = "${workEmail}";
|
|
|
|
|
ignores = [ ".*.sw[a-z]" "tags" ];
|
|
|
|
|
extraConfig = {
|
|
|
|
|
color.ui = true;
|
|
|
|
|
core.editor = "vim";
|
|
|
|
|
push.default = "simple";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
htop = {
|
|
|
|
|
enable = true;
|
|
|
|
|
highlightBaseName = true;
|
|
|
|
|
};
|
|
|
|
|
jq.enable = true;
|
|
|
|
|
man.enable = true;
|
|
|
|
|
neovim = {
|
|
|
|
|
enable = true;
|
|
|
|
|
viAlias = true;
|
|
|
|
|
vimAlias = true;
|
|
|
|
|
plugins = with pkgs.vimPlugins; [
|
|
|
|
|
neovim-sensible
|
|
|
|
|
vim-fugitive
|
|
|
|
|
vim-surround
|
|
|
|
|
nerdtree
|
|
|
|
|
nerdtree-git-plugin
|
|
|
|
|
vim-colorschemes
|
|
|
|
|
lightline-vim
|
|
|
|
|
];
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
set shell=/bin/bash
|
|
|
|
|
set nocompatible
|
|
|
|
|
|
|
|
|
|
set cursorline "highlight current line
|
|
|
|
|
set showmatch "highlight matching [{()}]
|
|
|
|
|
set tabstop=2 "number of visual spaces per TAB when reading
|
|
|
|
|
set softtabstop=2 "number of spaces per TAB when editing
|
|
|
|
|
set expandtab "tabs are spaces
|
|
|
|
|
set shiftwidth=2 "indents
|
|
|
|
|
cmap w!! w !sudo tee >/dev/null %
|
|
|
|
|
set ww=<,>,[,] "wrap
|
|
|
|
|
|
|
|
|
|
colorscheme Tomorrow-Night-Eighties
|
|
|
|
|
"lightline options
|
|
|
|
|
let g:lightline = {'colorscheme': 'jellybeans'}
|
|
|
|
|
|
|
|
|
|
"view saving
|
|
|
|
|
au BufWinLeave ?* mkview 1
|
|
|
|
|
au BufWinEnter ?* silent loadview 1
|
|
|
|
|
|
|
|
|
|
"nerdtree
|
|
|
|
|
"show hidden files
|
|
|
|
|
let NERDTreeShowHidden=1
|
|
|
|
|
"open on vim open
|
|
|
|
|
autocmd vimenter * NERDTree
|
|
|
|
|
"switch to editing window
|
|
|
|
|
autocmd vimenter * wincmd p
|
|
|
|
|
"close if only nerdtree is left
|
|
|
|
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
ssh.enable = true;
|
|
|
|
|
starship.enable = true;
|
|
|
|
|
};
|
|
|
|
|
services = {
|
|
|
|
|
gnome-keyring.enable = true;
|
|
|
|
|
lorri.enable = true;
|
|
|
|
|
redshift = {
|
|
|
|
|
enable = true;
|
|
|
|
|
provider = "geoclue2";
|
|
|
|
|
};
|
|
|
|
|
screen-locker = {
|
|
|
|
|
enable = true;
|
|
|
|
|
lockCmd = "i3lock-fancy";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
xsession = {
|
|
|
|
|
enable = true;
|
2020-01-02 04:44:48 +00:00
|
|
|
|
scriptPath = ".hm-xsession";
|
2020-01-01 21:12:08 +00:00
|
|
|
|
windowManager = {
|
|
|
|
|
i3 = {
|
|
|
|
|
enable = true;
|
|
|
|
|
config = rec {
|
2020-01-02 00:31:37 +00:00
|
|
|
|
assigns = {
|
|
|
|
|
"1: web" = [{ class = "Firefox"; }];
|
|
|
|
|
"2: devel" = [ { class = "Alacritty"; } { class = "Atom"; } ];
|
|
|
|
|
};
|
2020-01-02 04:44:48 +00:00
|
|
|
|
bars = [{ fonts = ["Fira Code" "FontAwesome 10"]; }];
|
2020-01-01 21:12:08 +00:00
|
|
|
|
modifier = "Mod4";
|
|
|
|
|
keybindings = lib.mkOptionDefault {
|
2020-01-02 00:31:37 +00:00
|
|
|
|
"${modifier}+c" = "exec CM_ONESHOT=1 clipmenud";
|
2020-01-01 21:12:08 +00:00
|
|
|
|
"${modifier}+v" = "exec clipmenu";
|
|
|
|
|
"${modifier}+Escape" = "exec i3lock-fancy";
|
2020-01-02 00:31:37 +00:00
|
|
|
|
"${modifier}+0" = "workspace number 0";
|
|
|
|
|
"${modifier}+1" = "workspace number 1";
|
|
|
|
|
"${modifier}+2" = "workspace number 2";
|
|
|
|
|
"${modifier}+3" = "workspace number 3";
|
|
|
|
|
"${modifier}+4" = "workspace number 4";
|
|
|
|
|
"${modifier}+5" = "workspace number 5";
|
|
|
|
|
"${modifier}+6" = "workspace number 6";
|
|
|
|
|
"${modifier}+7" = "workspace number 7";
|
|
|
|
|
"${modifier}+8" = "workspace number 8";
|
|
|
|
|
"${modifier}+9" = "workspace number 9";
|
2020-01-01 21:12:08 +00:00
|
|
|
|
};
|
2020-01-02 00:31:37 +00:00
|
|
|
|
workspaceLayout = "tabbed";
|
2020-01-01 21:12:08 +00:00
|
|
|
|
};
|
2020-01-02 00:31:37 +00:00
|
|
|
|
extraConfig = ''
|
|
|
|
|
exec --no-startup-id firefox
|
|
|
|
|
exec --no-startup-id atom
|
|
|
|
|
exec --no-startup-id alacritty
|
|
|
|
|
for_window [class="Firefox"] focus
|
|
|
|
|
'';
|
2020-01-01 21:12:08 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|