migrating fish settings to bash

This commit is contained in:
Danilo Reyes 2023-08-19 13:05:52 -06:00
parent a65344420c
commit 2aedb7039b
2 changed files with 50 additions and 32 deletions

View File

@ -128,7 +128,6 @@ users.users.jawz = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker" "scanner" "lp" ];
initialPassword = "password";
# shell = pkgs.fish;
openssh = {
authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacero\cdreyes@100CDREYES" ];
};
@ -152,7 +151,7 @@ wineWowPackages.full
vulkan-tools
# nix-gaming.packages.${pkgs.hostPlatform.system}.wine-tkg
winetricks
# nix-gaming.packages.${pkgs.hostPlatform.system}.wine-discord-ipc-bridge
nix-gaming.packages.${pkgs.hostPlatform.system}.wine-discord-ipc-bridge
# grapejuice # roblox manager
# minecraft # minecraft official launcher
parsec-bin # remote gaming with friends
@ -211,14 +210,14 @@ gdu # disk-space utility, somewhat useful
du-dust # rusty du
gocryptfs # encrypted filesystem! shhh!!!
exa # like ls but with colors
trash-cli # oop! didn't meant to delete that
ffmpeg_6 # coolest video converter!
neofetch # use once for brag, never again
trashy # oop! didn't meant to delete that
ffmpeg # coolest video converter!
# neofetch # use once for brag, never again
rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS
tldr # man for retards
# ffmpegthumbnailer # create video thumbnails for nautilus, in absence of totem
vcsi # video thumbnails for torrents, can I replace it with ^?
mediainfo # technical info about videos, needed by some of my scripts
# mediainfo # technical info about videos, needed by some of my scripts
tree-sitter # code parsing, required by Doom emacs
torrenttools # create torrent files from the terminal!
lm_sensors # for extension, displays cpu temp
@ -241,8 +240,6 @@ xdotool
tetex
# development environment
nix-direnv # creates ephimeral environments
direnv # manages development environment
exercism # learn to code
# SH
@ -382,15 +379,17 @@ home-manager.users.jawz = { config, pkgs, ... }:{
home.stateVersion = VERSION;
home.packages = with pkgs; [ ];
programs.starship.enable = true;
programs.bash = {
enable = true;
historyFile = "\${XDG_STATE_HOME}/bash/history";
historyControl = [ "erasedups" ];
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)";
open_gallery = "cd /mnt/disk2/scrapping/JawZ/gallery-dl && nautilus \
\"$(fd . ./ Husbands -tdirectory -d 1 | fzf -i)\"";
unique_extensions = "fd -tf | rev | cut -d. -f1 | rev | tr '[:upper:]' '[:lower:]' | sort | uniq --count | sort -rn";
cp = "cp -i";
mv = "mv -i";
@ -423,6 +422,11 @@ export command_timeout=30
# GPG_TTY=$(tty)
# export GPG_TTY
if command -v fzf-share >/dev/null; then
source "$(fzf-share)/key-bindings.bash"
source "$(fzf-share)/completion.bash"
fi
nixos-magic () {
local nix_file="$HOME/Development/NixOS/configuration.nix"
local hardware_file="$HOME/Development/NixOS/hardware-configuration.nix"
@ -433,7 +437,6 @@ nixos-magic () {
'';
};
# programs.starship.enable = true;
programs.fish = {
enable = true;
# useBabelfish = true; This setting doens't work from inside home-manager
@ -505,6 +508,12 @@ sudo nixos-rebuild switch -I nixos-config=$nix_file
};
programs = {
starship.enable = true;
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
bat = {
enable = true;
config = {
@ -581,7 +590,7 @@ environment.variables = rec {
PNPM_HOME = "\${XDG_DATA_HOME}/pnpm";
# OPTIONS
HISTFILE = "\${XDG_STATE_HOME}/bash/history";
# HISTFILE = "\${XDG_STATE_HOME}/bash/history";
LESSHISTFILE = "-";
GHCUP_USE_XDG_DIRS = "true";
RIPGREP_CONFIG_PATH = "\${XDG_CONFIG_HOME}/ripgrep/ripgreprc";
@ -590,9 +599,10 @@ environment.variables = rec {
WGETRC = "\${XDG_CONFIG_HOME}/wgetrc";
XCOMPOSECACHE = "${XDG_CACHE_HOME}/X11/xcompose";
"_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=\${XDG_CONFIG_HOME}/java";
DOCKER_CONFIG="\${XDG_CONFIG_HOME}/docker";
# NVIDIA
# CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv";
CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv";
# WEBKIT_DISABLE_COMPOSITING_MODE = "1";
# GBM_BACKEND = "nvidia-drm";
# "__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
@ -653,8 +663,7 @@ snapraid = {
programs = {
fish.enable = true;
# bash.blesh.enable = true;
# fzf.fuzzyCompletion = true;
fzf.fuzzyCompletion = true;
mtr.enable = true;
neovim = {
enable = true;

View File

@ -59,7 +59,7 @@ let
nextcloud_scrapsync = pkgs.writeScriptBin
"nextcloud_scrapsync" (builtins.readFile ./scripts/nextcloud_scrapsync.sh);
manage_library = pkgs.writeScriptBin
"manage_library" (builtins.readFile ./scripts/manage_library.fish);
"manage_library" (builtins.readFile ./scripts/manage_library.sh);
ffmpeg4discord = pkgs.writeScriptBin
"ffmpeg4discord" (builtins.readFile ./scripts/ffmpeg4discord.py);
chat-dl = pkgs.writeScriptBin
@ -248,7 +248,6 @@ users.users.jawz = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker" "scanner" "lp" ];
initialPassword = "password";
# shell = pkgs.fish;
openssh = {
authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacero\cdreyes@100CDREYES" ];
};
@ -289,7 +288,7 @@ wineWowPackages.full
vulkan-tools
# nix-gaming.packages.${pkgs.hostPlatform.system}.wine-tkg
winetricks
# nix-gaming.packages.${pkgs.hostPlatform.system}.wine-discord-ipc-bridge
nix-gaming.packages.${pkgs.hostPlatform.system}.wine-discord-ipc-bridge
# grapejuice # roblox manager
# minecraft # minecraft official launcher
parsec-bin # remote gaming with friends
@ -377,14 +376,14 @@ gdu # disk-space utility, somewhat useful
du-dust # rusty du
gocryptfs # encrypted filesystem! shhh!!!
exa # like ls but with colors
trash-cli # oop! didn't meant to delete that
ffmpeg_6 # coolest video converter!
neofetch # use once for brag, never again
trashy # oop! didn't meant to delete that
ffmpeg # coolest video converter!
# neofetch # use once for brag, never again
rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS
tldr # man for retards
# ffmpegthumbnailer # create video thumbnails for nautilus, in absence of totem
vcsi # video thumbnails for torrents, can I replace it with ^?
mediainfo # technical info about videos, needed by some of my scripts
# mediainfo # technical info about videos, needed by some of my scripts
tree-sitter # code parsing, required by Doom emacs
torrenttools # create torrent files from the terminal!
lm_sensors # for extension, displays cpu temp
@ -411,8 +410,6 @@ xdotool
tetex
# development environment
nix-direnv # creates ephimeral environments
direnv # manages development environment
exercism # learn to code
# SH
@ -610,15 +607,17 @@ home-manager.users.jawz = { config, pkgs, ... }:{
*** BASH
#+begin_src nix
programs.starship.enable = true;
programs.bash = {
enable = true;
historyFile = "\${XDG_STATE_HOME}/bash/history";
historyControl = [ "erasedups" ];
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)";
open_gallery = "cd /mnt/disk2/scrapping/JawZ/gallery-dl && nautilus \
\"$(fd . ./ Husbands -tdirectory -d 1 | fzf -i)\"";
unique_extensions = "fd -tf | rev | cut -d. -f1 | rev | tr '[:upper:]' '[:lower:]' | sort | uniq --count | sort -rn";
cp = "cp -i";
mv = "mv -i";
@ -641,7 +640,7 @@ programs.bash = {
initExtra = ''
#+end_src
#+begin_src fish
#+begin_src bash
/home/jawz/.local/bin/pokemon-colorscripts -r --no-title
# Lists
list_root=${config.home.homeDirectory}/.config/jawz/lists/jawz
@ -653,6 +652,11 @@ export command_timeout=30
# GPG_TTY=$(tty)
# export GPG_TTY
if command -v fzf-share >/dev/null; then
source "$(fzf-share)/key-bindings.bash"
source "$(fzf-share)/completion.bash"
fi
nixos-magic () {
local nix_file="$HOME/Development/NixOS/configuration.nix"
local hardware_file="$HOME/Development/NixOS/hardware-configuration.nix"
@ -668,7 +672,6 @@ nixos-magic () {
*** FISH
#+begin_src nix
# programs.starship.enable = true;
programs.fish = {
enable = true;
# useBabelfish = true; This setting doens't work from inside home-manager
@ -757,6 +760,12 @@ sudo nixos-rebuild switch -I nixos-config=$nix_file
#+begin_src nix
programs = {
starship.enable = true;
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
bat = {
enable = true;
config = {
@ -855,7 +864,7 @@ environment.variables = rec {
PNPM_HOME = "\${XDG_DATA_HOME}/pnpm";
# OPTIONS
HISTFILE = "\${XDG_STATE_HOME}/bash/history";
# HISTFILE = "\${XDG_STATE_HOME}/bash/history";
LESSHISTFILE = "-";
GHCUP_USE_XDG_DIRS = "true";
RIPGREP_CONFIG_PATH = "\${XDG_CONFIG_HOME}/ripgrep/ripgreprc";
@ -864,9 +873,10 @@ environment.variables = rec {
WGETRC = "\${XDG_CONFIG_HOME}/wgetrc";
XCOMPOSECACHE = "${XDG_CACHE_HOME}/X11/xcompose";
"_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=\${XDG_CONFIG_HOME}/java";
DOCKER_CONFIG="\${XDG_CONFIG_HOME}/docker";
# NVIDIA
# CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv";
CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv";
# WEBKIT_DISABLE_COMPOSITING_MODE = "1";
# GBM_BACKEND = "nvidia-drm";
# "__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
@ -948,8 +958,7 @@ of some services.
#+begin_src nix
programs = {
fish.enable = true;
# bash.blesh.enable = true;
# fzf.fuzzyCompletion = true;
fzf.fuzzyCompletion = true;
mtr.enable = true;
neovim = {
enable = true;