NixOS/home-manager/default.nix
2024-05-15 20:50:53 -06:00

132 lines
4.0 KiB
Nix

{ config, lib, pkgs, inputs, outputs, ... }: {
# let
# version = "23.11";
# home-manager = builtins.fetchTarball
# "https://github.com/nix-community/home-manager/archive/release-${version}.tar.gz";
# in {
# imports = [ (import "${home-manager}/nixos") ];
home.stateVersion = "23.11";
programs.bash = {
enable = true;
historyFile = "\${XDG_STATE_HOME}/bash/history";
historyControl = [ "erasedups" "ignorespace" "ignoredups" ];
shellAliases = {
hh = "hstr";
ls = "eza --icons --group-directories-first";
edit = "emacsclient -t";
comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"'';
gallery = ''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
cp = "cp -i";
mv = "mv -i";
mkdir = "mkdir -p";
rm = "trash";
".." = "cd ..";
"..." = "cd ../..";
".3" = "cd ../../..";
".4" = "cd ../../../..";
".5" = "cd ../../../../..";
dl = "download -u jawz -i";
e = "edit";
c = "cat";
b = "bat";
f = "fzf --multi --exact -i";
sc = "systemctl --user";
jc = "journalctl --user -xefu";
open-gallery = ''
cd /mnt/pool/scrapping/JawZ/gallery-dl &&
xdg-open "$(fd . ./ Husbands -tdirectory -d 1 | fzf -i)"'';
unique-extensions = ''
fd -tf | rev | cut -d. -f1 | rev |
tr '[:upper:]' '[:lower:]' | sort |
uniq --count | sort -rn'';
};
enableVteIntegration = true;
initExtra = ''
$HOME/.local/bin/pokemon-colorscripts -r --no-title
list_root="${config.xdg.configHome}"/jawz/lists/jawz
export LW=$list_root/watch.txt
export LI=$list_root/instant.txt
export LC=$list_root/comic.txt
export command_timeout=60
if command -v fzf-share >/dev/null; then
source "$(fzf-share)/key-bindings.bash"
source "$(fzf-share)/completion.bash"
fi
nixos-reload () {
NIXOSDIR=/home/jawz/Development/NixOS
# nix-store --add-fixed sha256 \
# $NIXOSDIR/PureRef-1.11.1_x64.Appimage
fd --full-path $NIXOSDIR -e nix -x nixfmt \;
sudo nixos-rebuild switch \
--flake "$NIXOSDIR/#$HOSTNAME" \
& nom
}
'';
};
xdg = {
enable = true;
userDirs = {
enable = true;
createDirectories = false;
desktop = "${config.home.homeDirectory}";
documents = "${config.home.homeDirectory}/Documents";
download = "${config.home.homeDirectory}/Downloads";
music = "${config.home.homeDirectory}/Music";
pictures = "${config.home.homeDirectory}/Pictures";
templates = "${config.xdg.dataHome}/Templates";
videos = "${config.home.homeDirectory}/Videos";
};
configFile = {
"wgetrc".source = ../dotfiles/wget/wgetrc;
"configstore/update-notifier-npm-check.json".source =
../dotfiles/npm/update-notifier-npm-check.json;
"npm/npmrc".source = ../dotfiles/npm/npmrc;
"gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json;
"htop/htoprc".source = ../dotfiles/htop/htoprc;
"python/pythonrc".source = ../dotfiles/pythonrc;
};
};
programs = {
helix = { enable = true; };
hstr.enable = true;
zoxide = {
enable = true;
enableBashIntegration = true;
};
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
bat = {
enable = true;
config = {
pager = "less -FR";
theme = "base16";
};
extraPackages = with pkgs.bat-extras; [
batman # man pages
batpipe # piping
batgrep # ripgrep
batdiff # this is getting crazy!
batwatch # probably my next best friend
prettybat # trans your sourcecode!
];
};
git = {
enable = true;
userName = "Danilo Reyes";
userEmail = "CaptainJawZ@protonmail.com";
};
htop = {
enable = true;
package = pkgs.htop-vim;
};
};
services = { lorri.enable = true; };
}