dotfiles/nixos/home.nix

253 lines
5.3 KiB
Nix
Raw Normal View History

2021-08-09 12:19:21 +00:00
{ pkgs, ... }:
let
2022-01-13 14:39:48 +00:00
# Nothing
2021-08-09 12:19:21 +00:00
in
{
2022-01-13 13:51:13 +00:00
nixpkgs.config.allowUnfree = true;
2021-08-09 12:19:21 +00:00
home.packages = with pkgs; [
2022-01-13 13:51:13 +00:00
firefox
2021-08-09 12:19:21 +00:00
unzip
2021-11-24 03:19:19 +00:00
neovim
gcc # for tree-sitter
2022-01-13 13:51:13 +00:00
alacritty
2021-08-09 12:19:21 +00:00
tmux
rsync
ripgrep
bat
fd
exa
sd
jq
tealdeer
2022-01-13 13:51:13 +00:00
_1password-gui
discord
2022-01-13 14:39:48 +00:00
gh
2021-08-09 12:19:21 +00:00
];
2022-01-13 23:44:56 +00:00
programs.alacritty = {
enable = true;
settings = {
window = {
dimensions = {
columns = 85;
lines = 30;
};
padding = {
x = 20;
y = 20;
};
};
scrolling.history = 10000;
font = {
size = 13.0;
};
key_bindings = [
{
key = "F";
mods = "Super";
action = "ToggleFullscreen";
}
{
key = "L";
mods = "Super";
2022-01-14 00:07:52 +00:00
chars = "\\x1F";
2022-01-13 23:44:56 +00:00
}
];
colors = {
primary = {
background = "0x1d2021";
foreground = "0xd5c4a1";
};
cursor = {
text = "0x1d2021";
cursor = "0xd5c4a1";
};
normal = {
black = "0x1d2021";
red = "0xfb4934";
green = "0xb8bb26";
yellow = "0xfabd2f";
blue = "0x83a598";
magenta = "0xd3869b";
cyan = "0x8ec07c";
white = "0xd5c4a1";
};
bright = {
black = "0x665c54";
red = "0xfe8019";
green = "0x3c3836";
yellow = "0x504945";
blue = "0xbdae93";
magenta = "0xebdbb2";
cyan = "0xd65d0e";
white = "0xfbf1c7";
};
};
draw_bold_text_with_bright_colors = false;
};
};
2021-08-09 12:19:21 +00:00
programs.fish = {
enable = true;
2021-08-09 12:45:46 +00:00
functions = {};
interactiveShellInit = "";
loginShellInit = "";
shellAbbrs = {
# Directory aliases
l = "ls";
lh = "ls -lh";
ll = "ls -alhF";
lf = "ls -lh | fzf";
c = "cd";
# -- - = "cd -";
mkd = "mkdir -pv";
# Tmux
ta = "tmux attach-session";
tan = "tmux attach-session -t noah";
tnn = "tmux new-session -s noah";
# Git
g = "git";
gs = "git status";
gd = "git diff";
gds = "git diff --staged";
gdp = "git diff HEAD^";
ga = "git add";
gaa = "git add -A";
gac = "git commit -am";
gc = "git commit -m";
gca = "git commit --amend";
gu = "git pull";
gp = "git push";
gpp = "git_set_upstream";
gl = "git log --graph --decorate --oneline -20";
gll = "git log --graph --decorate --oneline";
gco = "git checkout";
gcom = "git switch master";
gcob = "git switch -c";
gb = "git branch";
gbd = "git branch -d";
gbD = "git branch -D";
gr = "git reset";
grh = "git reset --hard";
gm = "git merge";
gcp = "git cherry-pick";
cdg = "cd (git rev-parse --show-toplevel)";
# GitHub
ghr = "gh repo view -w";
gha = "gh run list | head -1 | awk \'{ print $(NF-2) }\' | xargs gh run view";
grw = "gh run watch";
grf = "gh run view --log-failed";
grl = "gh run view --log";
# Vim
2021-11-24 03:19:19 +00:00
v = "nvim";
vl = "nvim -c 'normal! `0'";
vll = "nvim -c 'Hist'";
2021-08-09 12:45:46 +00:00
# Notes
qn = "quicknote";
sn = "syncnotes";
to = "today";
work = "vim $NOTES_PATH/work.md";
# Improved CLI Tools
cat = "bat"; # Swap cat with bat
h = "http -Fh --all"; # Curl site for headers
2021-11-24 03:19:19 +00:00
j = "just";
2021-08-09 12:45:46 +00:00
# Fun CLI Tools
weather = "curl wttr.in/$WEATHER_CITY";
moon = "curl wttr.in/Moon";
# Cheat Sheets
ssl = "openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr";
fingerprint = "ssh-keyscan myhost.com | ssh-keygen -lf -";
publickey = "ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub";
forloop = "for i in (seq 1 100)";
# Docker
dc = "$DOTS/bin/docker_cleanup";
dr = "docker run --rm -it";
db = "docker build . -t";
# Terraform
te = "terraform";
# Kubernetes
k = "kubectl";
pods = "kubectl get pods -A";
nodes = "kubectl get nodes";
deploys = "kubectl get deployments -A";
dash = "kube-dashboard";
ks = "k9s";
# Python
py = "python";
po = "poetry";
pr = "poetry run python";
# Rust
ca = "cargo";
};
shellAliases = {};
shellInit = "";
2021-08-09 12:19:21 +00:00
};
home.sessionVariables = {
EDITOR = "nvim";
2021-11-06 19:16:53 +00:00
fish_greeting = "";
2021-08-09 12:19:21 +00:00
};
programs.starship = {
enable = true;
enableFishIntegration = true;
};
programs.fzf = {
enable = true;
enableFishIntegration = true;
};
2021-08-09 12:45:46 +00:00
programs.zoxide = {
enable = true;
enableFishIntegration = true;
};
2021-08-09 12:19:21 +00:00
# Other configs
xdg.configFile = {
"starship.toml".source = ../starship/starship.toml.configlink;
2022-01-13 23:23:49 +00:00
"nvim/init.lua".source = ../nvim.configlink/init.lua;
2022-01-13 23:54:26 +00:00
"fish/functions".source = ../fish.configlink/functions;
2021-08-09 12:19:21 +00:00
};
programs.git = {
enable = true;
userName = "Noah Masur";
userEmail = "7386960+nmasur@users.noreply.github.com";
extraConfig = {
core = {
editor = "nvim";
};
2022-01-13 14:39:48 +00:00
pager = {
branch = "false";
};
2021-08-09 12:19:21 +00:00
};
};
2022-01-13 14:39:48 +00:00
programs.gh = {
enable = true;
enableGitCredentialHelper = true;
settings.git_protocol = "https";
};
2021-08-09 12:19:21 +00:00
}