chore: initial commit
This commit is contained in:
commit
cc4f3398ff
37 changed files with 2210 additions and 0 deletions
5
modules/shell/default.nix
Normal file
5
modules/shell/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
# ./git.nix
|
||||
./zsh.nix
|
||||
# ./direnv.nix
|
||||
]
|
||||
20
modules/shell/git/home.nix
Normal file
20
modules/shell/git/home.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, lib, pkgs, user, ... }: {
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Glen Goodwin";
|
||||
userEmail = "glen.goodwin1992@gmail.com";
|
||||
extraConfig = {
|
||||
merge = {
|
||||
ff = "only";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
cocogitto
|
||||
lazygit
|
||||
gh
|
||||
pre-commit
|
||||
];
|
||||
}
|
||||
34
modules/shell/zsh.nix
Normal file
34
modules/shell/zsh.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
autosuggestions.enable = true; # Auto suggest options and highlights syntax, searches in history for options
|
||||
syntaxHighlighting.enable = true;
|
||||
enableCompletion = true;
|
||||
histSize = 100000;
|
||||
|
||||
ohMyZsh = {
|
||||
# Extra plugins for zsh
|
||||
enable = true;
|
||||
plugins = [ "git" ];
|
||||
};
|
||||
|
||||
shellInit = '' # Zsh theme
|
||||
# Spaceship
|
||||
source ${pkgs.spaceship-prompt}/share/zsh/site-functions/prompt_spaceship_setup
|
||||
autoload -U promptinit; promptinit
|
||||
# Hook direnv
|
||||
#emulate zsh -c "$(direnv hook zsh)"
|
||||
# Swag
|
||||
${pkgs.nitch}/bin/nitch
|
||||
|
||||
#eval "$(direnv hook zsh)"
|
||||
eval "$(atuin init zsh)"
|
||||
clear
|
||||
pfetch
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
76
modules/shell/zsh/home.nix
Normal file
76
modules/shell/zsh/home.nix
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
{ config, lib, pkgs, user, ... }: {
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
update = "sudo nixos-rebuild switch";
|
||||
reload = "source ~/.zshrc";
|
||||
|
||||
"." = "cd ../";
|
||||
".." = "cd ../../";
|
||||
"..." = "cd ../../../";
|
||||
"...." = "cd ../../../../";
|
||||
|
||||
ls = "exa --icons";
|
||||
l = "exa -al --icons";
|
||||
la = "exa -a --color=always --group-directories-first --icons"; # all files and dirs
|
||||
ll = "exa -l --color=always --group-directories-first --icons"; # long format
|
||||
lt = "exa -aT --color=always --group-directories-first --icons"; # tree listing
|
||||
|
||||
cat = "bat";
|
||||
ps = "procs";
|
||||
grep = "rg";
|
||||
|
||||
# Default flags
|
||||
rm = "rm -i";
|
||||
chmod = "chmod -R";
|
||||
cp = "cp -R -i -v";
|
||||
mv = "mv -i -v";
|
||||
mkdir = "mkdir -p -v";
|
||||
df = "df -h";
|
||||
du = "du -h -s";
|
||||
dd = "dd status=progress bs=4M conv=fdatasync ";
|
||||
wgetpaste = "wgetpaste -Xx";
|
||||
sudo = "sudo "; # Makes sudo work with es
|
||||
ssh = "TERM=xterm ssh"; # Fixes some issues with ssh on some terminals
|
||||
wget = "wget -c";
|
||||
ping = "ping -c 5";
|
||||
|
||||
# Misc alieses I use often
|
||||
|
||||
ports = "netstat -tulanp";
|
||||
rmd = "rm -rf";
|
||||
mine = "sudo chown -R $(whoami):users";
|
||||
benchmark = "hyperfine --warmup 3 ";
|
||||
c = "clear";
|
||||
listen = "lsof -P -i -n";
|
||||
nc = "nordvpn connect sweden";
|
||||
nd = "nordvpn disconnect";
|
||||
tra = "transmission-remote -a";
|
||||
clock = "sudo ntpd -gq";
|
||||
octal = "stat -c '%a %n'";
|
||||
|
||||
};
|
||||
|
||||
zplug = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
{ name = "zsh-users/zsh-autosuggestions"; }
|
||||
{ name = "zsh-users/zsh-completions"; }
|
||||
{ name = "zsh-users/zsh-syntax-highlighting"; }
|
||||
{ name = "MichaelAquilina/zsh-you-should-use"; }
|
||||
];
|
||||
};
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
};
|
||||
initExtra = ''
|
||||
#clear
|
||||
#neofetch
|
||||
eval "$(atuin init zsh)"
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue