2020-01-01 21:12:08 +00:00
|
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
name = "Matthew Ess";
|
|
|
|
|
email = "daringseal@gmail.com";
|
|
|
|
|
workEmail = "mess@yelp.com";
|
2020-01-03 01:51:01 +00:00
|
|
|
|
lockCmd = "i3lock -i ~/.lockscreen-image";
|
2020-03-14 08:49:32 +00:00
|
|
|
|
statusCmd = "i3status-rs ~/.config/i3status.toml";
|
|
|
|
|
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
2020-01-01 21:12:08 +00:00
|
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
home = {
|
2020-01-02 00:31:37 +00:00
|
|
|
|
sessionVariables = {
|
|
|
|
|
EDITOR = "vim";
|
|
|
|
|
BROWSER = "firefox";
|
2020-03-14 08:49:32 +00:00
|
|
|
|
TERMINAL = "kitty";
|
2020-01-02 00:31:37 +00:00
|
|
|
|
};
|
2020-01-01 21:12:08 +00:00
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
# nix utilities
|
2020-01-03 06:06:04 +00:00
|
|
|
|
cachix
|
2020-03-14 08:49:32 +00:00
|
|
|
|
unstable.niv
|
2020-01-01 21:12:08 +00:00
|
|
|
|
nixfmt
|
|
|
|
|
nix-prefetch-git
|
|
|
|
|
# command line utilities
|
|
|
|
|
ag
|
2020-03-14 08:49:32 +00:00
|
|
|
|
exercism
|
2020-01-05 09:53:17 +00:00
|
|
|
|
fzy
|
2020-01-24 21:19:15 +00:00
|
|
|
|
imagemagick
|
2020-01-01 21:12:08 +00:00
|
|
|
|
jq
|
2020-03-14 08:49:32 +00:00
|
|
|
|
rlwrap
|
2020-01-01 21:12:08 +00:00
|
|
|
|
tldr
|
2020-01-24 21:19:15 +00:00
|
|
|
|
unzip
|
2020-01-01 21:12:08 +00:00
|
|
|
|
# graphical applications
|
|
|
|
|
atom
|
2020-03-14 08:49:32 +00:00
|
|
|
|
unstable.discord
|
|
|
|
|
(dunst.override { dunstify = true; })
|
2020-01-01 21:12:08 +00:00
|
|
|
|
enpass
|
2020-01-02 04:44:48 +00:00
|
|
|
|
firefox
|
2020-03-14 08:49:32 +00:00
|
|
|
|
kitty
|
2020-01-17 17:11:49 +00:00
|
|
|
|
nheko
|
|
|
|
|
slack
|
2020-01-03 06:06:04 +00:00
|
|
|
|
steam
|
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
|
2020-01-02 06:23:41 +00:00
|
|
|
|
i3lock
|
2020-03-14 08:49:32 +00:00
|
|
|
|
unstable.i3status-rust
|
|
|
|
|
libnotify
|
2020-01-03 01:13:32 +00:00
|
|
|
|
rofi
|
2020-01-03 06:06:04 +00:00
|
|
|
|
xclip
|
2020-01-01 21:12:08 +00:00
|
|
|
|
];
|
|
|
|
|
file = {
|
2020-01-02 04:44:48 +00:00
|
|
|
|
".background-image".source = ./assets/background-image;
|
2020-01-03 01:51:01 +00:00
|
|
|
|
".lockscreen-image".source = ./assets/lockscreen-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 =
|
2020-01-24 21:19:15 +00:00
|
|
|
|
./assets/systemctl.fish;
|
2020-03-14 08:49:32 +00:00
|
|
|
|
".config/fish/functions/colortest.fish".source =
|
|
|
|
|
./assets/colortest.fish;
|
2020-01-24 21:19:15 +00:00
|
|
|
|
".config/fish/functions/kbl.fish".text = ''
|
|
|
|
|
function kbl -a level
|
|
|
|
|
set -l initial (cat /sys/class/leds/tpacpi\:\:kbd_backlight/brightness)
|
|
|
|
|
test -z "$level"; and set -l level $initial
|
|
|
|
|
echo $level > /sys/class/leds/tpacpi\:\:kbd_backlight/brightness
|
|
|
|
|
end
|
|
|
|
|
'';
|
|
|
|
|
".config/fish/functions/mkdcd.fish".text = ''
|
|
|
|
|
function mkdcd -a target
|
|
|
|
|
mkdir $target
|
|
|
|
|
cd $target
|
|
|
|
|
end
|
|
|
|
|
'';
|
|
|
|
|
".config/fish/functions/unz.fish".text = ''
|
|
|
|
|
function unz -a target
|
2020-03-14 08:49:32 +00:00
|
|
|
|
# strip extensions
|
|
|
|
|
string match \*.zip $target; and set target (string split -r -m1 . $target)[1]
|
2020-01-24 21:19:15 +00:00
|
|
|
|
unzip -d $target $target
|
|
|
|
|
end
|
|
|
|
|
'';
|
2020-03-14 08:49:32 +00:00
|
|
|
|
".config/i3status.toml".source = ./assets/i3status.toml;
|
|
|
|
|
".config/kitty/kitty.conf".text = ''
|
|
|
|
|
font_family Fira Code Regular
|
|
|
|
|
bold_font Fira Code Bold
|
|
|
|
|
font_size 15.0
|
2020-01-02 04:44:48 +00:00
|
|
|
|
'';
|
2020-03-14 08:49:32 +00:00
|
|
|
|
".config/rofi/theme.rasi".source = ./assets/sidetab.rasi;
|
2020-01-01 21:12:08 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
nixpkgs = { config.allowUnfree = true; };
|
|
|
|
|
programs = {
|
2020-01-02 00:31:37 +00:00
|
|
|
|
alacritty = {
|
2020-03-14 08:49:32 +00:00
|
|
|
|
enable = false;
|
|
|
|
|
settings = {
|
|
|
|
|
font = {
|
|
|
|
|
normal.family = "Fira Code";
|
|
|
|
|
size = 10.5;
|
|
|
|
|
};
|
|
|
|
|
};
|
2020-01-02 00:31:37 +00:00
|
|
|
|
};
|
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"
|
2020-03-14 08:49:32 +00:00
|
|
|
|
alias rebuildd="sudo nixos-rebuild switch; and systemctl restart display-manager"
|
|
|
|
|
alias upgrade="sudo rm -rf /root/.cache/nix/tarballs; and sudo nixos-rebuild switch --upgrade"
|
2020-01-03 06:06:04 +00:00
|
|
|
|
alias clip="xclip -selection c"
|
|
|
|
|
alias cxuse="sudo cachix use -d ~/dotfiles.nix"
|
2020-01-05 09:53:17 +00:00
|
|
|
|
alias cxpsh="nix build -f shell.nix; nix-store -qR --include-outputs (nix-instantiate shell.nix) | cachix push"
|
2020-03-14 08:49:32 +00:00
|
|
|
|
alias home="vim ~/dotfiles.nix/home.nix +'cd %:p:h'"
|
|
|
|
|
alias i3="vim ~/dotfiles.nix/i3.nix +'cd %:p:h'"
|
|
|
|
|
alias vims="vim -S Session.vim"
|
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
|
2020-01-03 06:06:04 +00:00
|
|
|
|
vim-nix
|
2020-01-01 21:12:08 +00:00
|
|
|
|
lightline-vim
|
2020-01-17 17:11:49 +00:00
|
|
|
|
haskell-vim
|
2020-03-14 08:49:32 +00:00
|
|
|
|
auto-pairs
|
|
|
|
|
vim-fish
|
2020-01-01 21:12:08 +00:00
|
|
|
|
];
|
|
|
|
|
extraConfig = ''
|
2020-03-14 08:49:32 +00:00
|
|
|
|
syntax on
|
|
|
|
|
filetype plugin indent on
|
2020-01-01 21:12:08 +00:00
|
|
|
|
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
|
|
|
|
|
set ww=<,>,[,] "wrap
|
2020-03-14 08:49:32 +00:00
|
|
|
|
set splitbelow "split underneath
|
2020-01-01 21:12:08 +00:00
|
|
|
|
|
2020-03-14 08:49:32 +00:00
|
|
|
|
command Mks NERDTreeClose | mksession!
|
|
|
|
|
|
|
|
|
|
"save readonly
|
|
|
|
|
cmap w!! w !sudo tee >/dev/null %
|
2020-01-05 09:53:17 +00:00
|
|
|
|
"terminal exit
|
2020-03-14 08:49:32 +00:00
|
|
|
|
tnoremap <Esc> <C-\><C-n><CR>
|
|
|
|
|
"nohl
|
|
|
|
|
nnoremap <silent> ,<space> :nohlsearch<CR>
|
2020-01-05 09:53:17 +00:00
|
|
|
|
|
2020-01-01 21:12:08 +00:00
|
|
|
|
colorscheme Tomorrow-Night-Eighties
|
|
|
|
|
"lightline options
|
|
|
|
|
let g:lightline = {'colorscheme': 'jellybeans'}
|
|
|
|
|
|
2020-01-03 19:10:52 +00:00
|
|
|
|
"cursor saving
|
|
|
|
|
autocmd BufReadPost * if @% !~# '\.git[\/\\]COMMIT_EDITMSG$' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
2020-01-01 21:12:08 +00:00
|
|
|
|
|
|
|
|
|
"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
|
|
|
|
|
'';
|
|
|
|
|
};
|
2020-01-03 01:13:32 +00:00
|
|
|
|
rofi = {
|
|
|
|
|
enable = true;
|
|
|
|
|
font = "Fira Code 14";
|
2020-03-14 08:49:32 +00:00
|
|
|
|
lines = 10;
|
2020-01-03 01:13:32 +00:00
|
|
|
|
location = "center";
|
2020-03-14 08:49:32 +00:00
|
|
|
|
theme = "~/.config/rofi/theme.rasi";
|
2020-01-03 01:13:32 +00:00
|
|
|
|
};
|
2020-01-05 10:02:12 +00:00
|
|
|
|
ssh = {
|
|
|
|
|
enable = true;
|
2020-03-14 08:49:32 +00:00
|
|
|
|
extraOptionOverrides = { "AddKeysToAgent" = "true"; };
|
2020-01-05 10:02:12 +00:00
|
|
|
|
};
|
2020-01-01 21:12:08 +00:00
|
|
|
|
starship.enable = true;
|
|
|
|
|
};
|
|
|
|
|
services = {
|
2020-03-14 08:49:32 +00:00
|
|
|
|
dunst = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
global = {
|
|
|
|
|
geometry = "0x5-30+20";
|
|
|
|
|
notification_height = 25;
|
|
|
|
|
indicate_hidden = "yes";
|
|
|
|
|
corner_radius = 5;
|
|
|
|
|
padding = 10;
|
|
|
|
|
horizontal_padding = 10;
|
|
|
|
|
idle_threshold = 60;
|
|
|
|
|
font = "Fira Code 16";
|
|
|
|
|
markup = "full";
|
|
|
|
|
format = ''
|
|
|
|
|
<b>%s<b> %a
|
|
|
|
|
%b'';
|
|
|
|
|
alignment = "center";
|
|
|
|
|
horizontal_alignment = "center";
|
|
|
|
|
icon_position = "left";
|
|
|
|
|
separator_color = "#383838";
|
|
|
|
|
frame_color = "#383838";
|
|
|
|
|
frame_width = 2;
|
|
|
|
|
};
|
|
|
|
|
shortcuts = {
|
|
|
|
|
close = "ctrl+space";
|
|
|
|
|
history = "ctrl+grave";
|
|
|
|
|
};
|
|
|
|
|
urgency_low = {
|
|
|
|
|
background = "#282828";
|
|
|
|
|
foreground = "#5882FA";
|
|
|
|
|
};
|
|
|
|
|
urgency_normal = {
|
|
|
|
|
background = "#282828";
|
|
|
|
|
foreground = "#5882FA";
|
|
|
|
|
};
|
|
|
|
|
urgency_critical = {
|
|
|
|
|
background = "#282828";
|
|
|
|
|
foreground = "#FF0040";
|
|
|
|
|
timeout = 0;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2020-01-01 21:12:08 +00:00
|
|
|
|
gnome-keyring.enable = true;
|
|
|
|
|
lorri.enable = true;
|
|
|
|
|
redshift = {
|
|
|
|
|
enable = true;
|
|
|
|
|
provider = "geoclue2";
|
|
|
|
|
};
|
|
|
|
|
screen-locker = {
|
|
|
|
|
enable = true;
|
2020-01-02 06:23:41 +00:00
|
|
|
|
lockCmd = "${lockCmd}";
|
2020-01-01 21:12:08 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
xsession = {
|
|
|
|
|
enable = true;
|
2020-01-02 04:44:48 +00:00
|
|
|
|
scriptPath = ".hm-xsession";
|
2020-01-01 21:12:08 +00:00
|
|
|
|
windowManager = {
|
2020-01-03 01:13:32 +00:00
|
|
|
|
i3 = import ./i3.nix {
|
|
|
|
|
inherit lib;
|
|
|
|
|
inherit lockCmd;
|
2020-03-14 08:49:32 +00:00
|
|
|
|
inherit statusCmd;
|
2020-01-01 21:12:08 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|