Refactor home modules and update configs

- Remove unused `pkgs` import from hardware and adjust user stateVersion
to 25.11 with updated wheel comment. - Split Bash aliases and functions
into separate modules and rename `bash.nix` to `bash/default.nix` with
imports. - Delete old Bash alias/function files and consolidate them
under the new structure. - Simplify `bat.nix` by removing commented
style lines. - Increase Cava `frame_rate` from 60 to 144 and clean up
legacy color settings. - Refactor Chromium configuration: separate
extensions into `extensions.nix` and use a minimal default module. -
Replace large Kitty config with minimal enable/module and import
`extra-config.nix` and `settings.nix`. - Overhaul Librewolf setup:
extract profiles, extensions, search, and settings into dedicated files.
- Update home `default.nix` imports to reflect new module paths and
remove obsolete references. - Modularize SwayNC by moving settings and
style to separate files. - Add explicit Vesktop package definition. -
Remove old VSCode module; introduce VSCodium with profile-based
extensions, keybindings, and user settings. - Reorganize XDG portal and
desktop entries into modular files. - Rebuild Zed configuration: split
user settings, language models, languages, LSP, extensions, and extra
packages into distinct files.
This commit is contained in:
2025-11-23 19:38:52 +01:00
parent 900b565405
commit 196db56791
48 changed files with 1839 additions and 1809 deletions

View File

@@ -0,0 +1,128 @@
{
username,
host,
...
}: {
programs.bash.shellAliases = {
# GarandOS aliases
pullos = "git -C /home/${username}/garandos pull";
upd = "nh os switch --hostname ${host}";
upg = "nh os switch --hostname ${host} --update";
upf = "sudo nix flake update";
upd-bt = "nh os boot --hostname ${host}";
upd-ts = "nh os test --hostname ${host}";
upd-bd = "nh os build --hostname ${host}";
ncg = "nh clean all";
# Development aliases
srvenv = "source .venv/bin/activate";
"..srvenv" = "source ../.venv/bin/activate";
pm = "uv run manage.py";
f8 = "uv run flake8 .";
bbr = "bun --bun run";
mkgidf = "git add . --intent-to-add . && git diff > git-diff.txt";
zed = "MANGOHUD=0 /home/${username}/.local/bin/zed";
# Development aliases for nix flake
nd = "nix develop";
nb = "nix build";
nr = "nix run";
nbr = "nix build && nix run";
nbd = "nix build .#develop";
nrd = "nix run .#develop";
nbrd = "nix build .#develop && nix run .#develop";
# System aliases
# flush-codium = "sudo killall codium && sudo rm -rf ~/.config/VSCodium/Cache && sudo rm -rf ~/.config/VSCodium/CachedData";
kys = "shutdown now";
ookla = "speedtest";
hypr-cli = "hyprctl clients";
# Navigation aliases
"~" = "cd ~";
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
# Modifies commands
cat = "bat";
cp = "cp -i";
mv = "mv -i";
rm = "trash -v";
mkdir = "mkdir -p";
ps = "ps auxf";
ping = "ping -c 10";
less = "less -R";
cls = "clear";
multitail = "multitail --no-repeat -c";
freshclam = "sudo freshclam";
# Alias"s for multiple directory listing commands
la = "eza -alh --icons"; # show hidden files
ls = "eza -aF --icons --color=always"; # add colors and file type extensions
lx = "eza -lh --icons --sort=extension"; # sort by extension
lk = "eza -lh --icons --sort=size --reverse"; # sort by size
lc = "eza -lh --icons --sort=changed"; # sort by change time
lu = "eza -lh --icons --sort=accessed"; # sort by access time
lr = "eza -lh --icons --recurse"; # recursive ls
lt = "eza -lh --icons --sort=modified"; # sort by date
lm = "eza -alh --icons | more"; # pipe through "more"
lw = "eza -xh --icons"; # wide listing format
ll = "eza -lh --icons"; # long listing format
labc = "eza -lah --icons --sort=name"; # alphabetical sort
lf = "eza -lh --icons | grep -v '^d'"; # files only (przybliżenie)
ldir = "eza -lh --icons --only-dirs"; # directories only
lla = "eza -alh --icons"; # List and Hidden Files
las = "eza -a --icons"; # Hidden Files
lls = "eza -lh --icons"; # List
# chmod commands
mx = "chmod a+x";
"000" = "chmod -R 000";
"644" = "chmod -R 644";
"666" = "chmod -R 666";
"755" = "chmod -R 755";
"777" = "chmod -R 777";
# Search command line history
h = "history | grep ";
# Search running processes
p = "ps aux | grep ";
topcpu = "/bin/ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10";
# Search files in the current folder
f = "find . | grep ";
# Count all files (recursively) in the current folder
countfiles = "for t in files links directories; do echo \`find . -type \${t:0:1} | wc -l\` \$t; done 2> /dev/null";
# Alias"s to show disk space and space used in a folder
diskspace = "du -S | sort -n -r |more";
folders = "du -h --max-depth=1";
folderssort = "find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn";
tree = "tree -CAhF --dirsfirst";
treed = "tree -CAFd";
mountedinfo = "df -hT";
# Show all logs in /var/log
logs = "sudo find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f";
# fix kitty ssh connection
kssh = "kitty +kitten ssh";
docker-clean = "docker container prune -f ; docker image prune -f ; docker network prune -f ; docker volume prune -f";
# Remove a directory and all files
rmd = "/bin/rm --recursive --force --verbose ";
# Fun aliases
pasjans = "ttysolitaire -p 10 --no-background-color";
fc = "fortune | cowsay";
# Network aliases
kssh-server = "kssh garand_plg@192.168.1.156 -i ~/.ssh/hp-t640-homeserver";
ssh-server = "ssh garand_plg@192.168.1.156 -i ~/.ssh/hp-t640-homeserver";
};
}