2020-03-05 14:18:17 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2020-03-05 16:02:23 +01:00
|
|
|
home = {
|
|
|
|
packages = with pkgs; [
|
|
|
|
bat
|
|
|
|
exa
|
|
|
|
ripgrep
|
|
|
|
fd
|
|
|
|
pass
|
|
|
|
tokei
|
|
|
|
nmap
|
|
|
|
tldr
|
|
|
|
diskus
|
|
|
|
jq
|
|
|
|
pup
|
|
|
|
];
|
|
|
|
sessionVariables = {
|
|
|
|
};
|
|
|
|
stateVersion = "19.09";
|
|
|
|
};
|
2020-03-05 14:18:17 +01:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# Programs
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
programs.home-manager = {
|
|
|
|
enable = true;
|
|
|
|
path = builtins.toPath ~/home-manager;
|
|
|
|
};
|
|
|
|
|
2020-03-05 15:06:14 +01:00
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
userName = "William Carroll";
|
|
|
|
userEmail = "wpcarro@gmail.com";
|
|
|
|
aliases = {
|
|
|
|
today = "! git log --date=relative --since=00:00:00 --all --no-merges --oneline --author=\"$(git config --get user.email)\"";
|
|
|
|
yday = "! git log --since=yesterday.midnight --until=today.midnight --oneline --author=\"$(git config --get user.email)\"";
|
|
|
|
changed-files = "! git --no-pager diff --name-only $(current_branch) $(git merge-base $(current_branch) master)";
|
|
|
|
conflicts = "! git --no-pager diff --name-only --diff-filter=U";
|
|
|
|
unstage = "reset HEAD --";
|
|
|
|
};
|
|
|
|
extraConfig = {
|
|
|
|
push.default = "current";
|
|
|
|
rebase = {
|
|
|
|
autosquash = true;
|
|
|
|
autostash = true;
|
|
|
|
};
|
|
|
|
rerere.enabled = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-03-05 15:14:03 +01:00
|
|
|
programs.gpg = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
keyserver = "hkp://pgp.mit.edu";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-03-05 15:22:32 +01:00
|
|
|
programs.ssh = {
|
|
|
|
enable = true;
|
|
|
|
matchBlocks = {
|
|
|
|
desktop = {
|
|
|
|
user = "wpcarro";
|
|
|
|
hostname = "zeno.lon.corp.google.com";
|
|
|
|
};
|
|
|
|
socrates = {
|
|
|
|
user = "wpcarro";
|
|
|
|
hostname = "84.92.33.141";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-03-06 12:19:29 +01:00
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
|
|
|
shellAliases = {
|
|
|
|
c = "xclip -selection clipboard -i";
|
|
|
|
p = "xclip -selection clipboard -o";
|
|
|
|
cat = "bat";
|
|
|
|
rgh = "rg --hidden";
|
|
|
|
fdh = "fd --hidden";
|
|
|
|
tpr = "tput reset";
|
|
|
|
ls = "exa --sort=type";
|
|
|
|
ll = "exa --long --sort=type";
|
|
|
|
la = "exa --long --all --sort=type";
|
|
|
|
gst = "git status";
|
|
|
|
gsh = "git show HEAD";
|
|
|
|
gpf = "git push --force-with-lease";
|
|
|
|
gd = "git diff";
|
|
|
|
};
|
|
|
|
shellAbbrs = {
|
|
|
|
sys = "systemctl";
|
|
|
|
sysu = "systemctl --user";
|
|
|
|
};
|
|
|
|
promptInit = builtins.readFile ../fish/prompt.fish;
|
|
|
|
};
|
|
|
|
|
2020-03-05 16:01:23 +01:00
|
|
|
programs.fzf = rec {
|
2020-03-06 12:19:29 +01:00
|
|
|
enable = true;
|
2020-03-05 16:01:23 +01:00
|
|
|
defaultCommand = "fd --hidden --follow --exclude '.git'";
|
|
|
|
fileWidgetCommand = defaultCommand;
|
2020-03-06 12:19:29 +01:00
|
|
|
enableFishIntegration = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.direnv = {
|
|
|
|
enable = true;
|
|
|
|
enableFishIntegration = true;
|
2020-03-05 16:01:23 +01:00
|
|
|
};
|
|
|
|
|
2020-03-05 14:18:17 +01:00
|
|
|
##############################################################################
|
|
|
|
# Services
|
|
|
|
##############################################################################
|
2020-03-05 15:48:47 +01:00
|
|
|
|
|
|
|
services.lorri.enable = true;
|
2020-03-05 16:05:21 +01:00
|
|
|
|
|
|
|
services.gpg-agent = {
|
|
|
|
enable = true;
|
|
|
|
defaultCacheTtl = 7200;
|
|
|
|
maxCacheTtl = 7200;
|
|
|
|
};
|
2020-03-05 14:18:17 +01:00
|
|
|
}
|