From c651fb7218d0d64d1eeb56d3e8cf4ad8df74f3f4 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Tue, 15 Aug 2023 00:17:33 -0600 Subject: [PATCH] added bash customization --- configuration.nix | 61 ++++++++++++++++++++++++++++++++++++++--- configuration.org | 70 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 122 insertions(+), 9 deletions(-) diff --git a/configuration.nix b/configuration.nix index 82de287..a5d61cb 100644 --- a/configuration.nix +++ b/configuration.nix @@ -128,7 +128,7 @@ users.users.jawz = { isNormalUser = true; extraGroups = [ "wheel" "networkmanager" "docker" "scanner" "lp" ]; initialPassword = "password"; - shell = pkgs.fish; + # shell = pkgs.fish; openssh = { authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacero\cdreyes@100CDREYES" ]; }; @@ -389,6 +389,57 @@ home-manager.users.jawz = { config, pkgs, ... }:{ home.packages = with pkgs; [ ]; programs.starship.enable = true; +programs.bash = { + enable = true; + shellAliases = { + ls = "exa --icons --group-directories-first --no-permissions --no-user --no-time"; + 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)"; + open_gallery = "open $(cd /mnt/disk2/scrapping/JawZ/gallery-dl && fd . ./ Husbands kemonoparty -tdirectory -d 1 | fzf)"; + unique_extensions = "fd -tf | rev | cut -d. -f1 | rev | tr '[:upper:]' '[:lower:]' | sort | uniq --count | sort -rn"; + cp = "cp -i"; + mv = "mv -i"; + mkcd = "mkdir -pv \"$1\" && cd \"$1\" || exit"; + mkdir = "mkdir -p"; + rm = "trash"; + ".." = "cd .."; + "..." = "cd ../.."; + ".3" = "cd ../../.."; + ".4" = "cd ../../../.."; + ".5" = "cd ../../../../.."; + dl = "download -u jawz -i"; + e = "edit"; + c = "cat"; + f = "fzf --multi --exact -i"; + sc = "systemctl --user"; + jc = "journalctl --user -xefu"; + }; + enableVteIntegration = true; + initExtra = '' + +/home/jawz/.local/bin/pokemon-colorscripts -r --no-title +# Lists +list_root=${config.home.homeDirectory}/.config/jawz/lists/jawz +export lw=$list_root/watch.txt +export li=$list_root/instant.txt +export lc=$list_root/comic.txt +export command_timeout=30 + +# GPG_TTY=$(tty) +# export GPG_TTY + +nixos-magic () { + local nix_file="$HOME/Development/NixOS/configuration.nix" + local hardware_file="$HOME/Development/NixOS/hardware-configuration.nix" + nixfmt "$nix_file" && nixfmt "$hardware_file" + sudo nixos-rebuild switch -I nixos-config="$nix_file" +} + + ''; +}; + +# programs.starship.enable = true; programs.fish = { enable = true; # useBabelfish = true; This setting doens't work from inside home-manager @@ -547,8 +598,8 @@ environment.variables = rec { "_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=\${XDG_CONFIG_HOME}/java"; # NVIDIA - CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv"; - WEBKIT_DISABLE_COMPOSITING_MODE = "1"; + # CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv"; + # WEBKIT_DISABLE_COMPOSITING_MODE = "1"; # GBM_BACKEND = "nvidia-drm"; # "__GLX_VENDOR_LIBRARY_NAME" = "nvidia"; @@ -593,7 +644,7 @@ snapraid = { "/multimedia/downloads/" "/scrapping/nextcloud/" "/backups/" - "/glue/Chaturbate/" + "/glue/Spankbank/____UNORGANIZED/Chaturbate/" ]; dataDisks = { d1 = "/mnt/disk1/"; @@ -608,6 +659,8 @@ snapraid = { programs = { fish.enable = true; + # bash.blesh.enable = true; + # fzf.fuzzyCompletion = true; mtr.enable = true; neovim = { enable = true; diff --git a/configuration.org b/configuration.org index e72aca5..09c4cb8 100755 --- a/configuration.org +++ b/configuration.org @@ -248,7 +248,7 @@ users.users.jawz = { isNormalUser = true; extraGroups = [ "wheel" "networkmanager" "docker" "scanner" "lp" ]; initialPassword = "password"; - shell = pkgs.fish; + # shell = pkgs.fish; openssh = { authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacero\cdreyes@100CDREYES" ]; }; @@ -613,10 +613,68 @@ home-manager.users.jawz = { config, pkgs, ... }:{ #+end_src ** DOTFILES -*** FISH +*** BASH #+begin_src nix programs.starship.enable = true; +programs.bash = { + enable = true; + shellAliases = { + ls = "exa --icons --group-directories-first --no-permissions --no-user --no-time"; + 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)"; + open_gallery = "open $(cd /mnt/disk2/scrapping/JawZ/gallery-dl && fd . ./ Husbands kemonoparty -tdirectory -d 1 | fzf)"; + unique_extensions = "fd -tf | rev | cut -d. -f1 | rev | tr '[:upper:]' '[:lower:]' | sort | uniq --count | sort -rn"; + cp = "cp -i"; + mv = "mv -i"; + mkcd = "mkdir -pv \"$1\" && cd \"$1\" || exit"; + mkdir = "mkdir -p"; + rm = "trash"; + ".." = "cd .."; + "..." = "cd ../.."; + ".3" = "cd ../../.."; + ".4" = "cd ../../../.."; + ".5" = "cd ../../../../.."; + dl = "download -u jawz -i"; + e = "edit"; + c = "cat"; + f = "fzf --multi --exact -i"; + sc = "systemctl --user"; + jc = "journalctl --user -xefu"; + }; + enableVteIntegration = true; + initExtra = '' +#+end_src + +#+begin_src fish +/home/jawz/.local/bin/pokemon-colorscripts -r --no-title +# Lists +list_root=${config.home.homeDirectory}/.config/jawz/lists/jawz +export lw=$list_root/watch.txt +export li=$list_root/instant.txt +export lc=$list_root/comic.txt +export command_timeout=30 + +# GPG_TTY=$(tty) +# export GPG_TTY + +nixos-magic () { + local nix_file="$HOME/Development/NixOS/configuration.nix" + local hardware_file="$HOME/Development/NixOS/hardware-configuration.nix" + nixfmt "$nix_file" && nixfmt "$hardware_file" + sudo nixos-rebuild switch -I nixos-config="$nix_file" +} +#+end_src +#+begin_src nix + ''; +}; +#+end_src + +*** FISH + +#+begin_src nix +# programs.starship.enable = true; programs.fish = { enable = true; # useBabelfish = true; This setting doens't work from inside home-manager @@ -814,8 +872,8 @@ environment.variables = rec { "_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=\${XDG_CONFIG_HOME}/java"; # NVIDIA - CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv"; - WEBKIT_DISABLE_COMPOSITING_MODE = "1"; + # CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv"; + # WEBKIT_DISABLE_COMPOSITING_MODE = "1"; # GBM_BACKEND = "nvidia-drm"; # "__GLX_VENDOR_LIBRARY_NAME" = "nvidia"; @@ -875,7 +933,7 @@ snapraid = { "/multimedia/downloads/" "/scrapping/nextcloud/" "/backups/" - "/glue/Chaturbate/" + "/glue/Spankbank/____UNORGANIZED/Chaturbate/" ]; dataDisks = { d1 = "/mnt/disk1/"; @@ -896,6 +954,8 @@ of some services. #+begin_src nix programs = { fish.enable = true; + # bash.blesh.enable = true; + # fzf.fuzzyCompletion = true; mtr.enable = true; neovim = { enable = true;