diff options
| author | Fuwn <[email protected]> | 2024-08-29 21:31:09 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-08-29 21:31:09 -0700 |
| commit | 653f81eec07eb3e33c380810676a7feb45e1df43 (patch) | |
| tree | 00d43c8f1b2cb2cf8ebaf1b7c1a4c026718033bb /home/ebisu/fortune/system/shell | |
| parent | some stuff (diff) | |
| download | nixos-config-653f81eec07eb3e33c380810676a7feb45e1df43.tar.xz nixos-config-653f81eec07eb3e33c380810676a7feb45e1df43.zip | |
some stuff
Diffstat (limited to 'home/ebisu/fortune/system/shell')
6 files changed, 517 insertions, 0 deletions
diff --git a/home/ebisu/fortune/system/shell/default.nix b/home/ebisu/fortune/system/shell/default.nix new file mode 100644 index 0000000..2ee83d1 --- /dev/null +++ b/home/ebisu/fortune/system/shell/default.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: +{ + imports = [ + ./fish + ./starship + ./scripting + ]; + + home.packages = with pkgs; [ + asciinema + navi + shellclear + watchexec + zoxide + shellcheck + termius + dash + mosh + killall + ]; +} diff --git a/home/ebisu/fortune/system/shell/fish/default.nix b/home/ebisu/fortune/system/shell/fish/default.nix new file mode 100644 index 0000000..bcc0def --- /dev/null +++ b/home/ebisu/fortune/system/shell/fish/default.nix @@ -0,0 +1,160 @@ +{ pkgs, config, ... }: +{ + programs.fish = { + enable = true; + + shellInit = '' + if status is-interactive + set fish_greeting + + fish_vi_key_bindings + + function fish_postexec --on-event fish_postexec + if test "$argv" != "clear" + echo + end + end + + function vpn + env BIND_INTERFACE=wgpia0 LD_PRELOAD=/usr/lib/bindToInterface.so $argv + end + + function nh + if test "$argv[1]" = "home" -a "$argv[2]" = "switch" + command nh $argv -- --impure + else + command nh $argv + end + end + + function nix-find + find $argv -type f -exec test ! -L {} \; -exec realpath {} \; | grep -v "^/nix/store" + end + end + + set -l config_home (set -q XDG_CONFIG_HOME; and echo $XDG_CONFIG_HOME; or echo $HOME/.config) + + set HISTSIZE -1 + set HISTFILESIZE -1 + set SAVEHIST -1 + + bind \ce edit_command_buffer + + zoxide init fish | source + + cat ~/.cache/wal/sequences + + starship init fish | source + ''; + + plugins = [ + { + name = "fzf.fish"; + + src = pkgs.fetchFromGitHub { + owner = "patrickf1"; + repo = "fzf.fish"; + rev = "8920367cf85eee5218cc25a11e209d46e2591e7a"; + sha256 = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM="; + }; + } + { + name = "bass"; + + src = pkgs.fetchFromGitHub { + owner = "edc"; + repo = "bass"; + rev = "79b62958ecf4e87334f24d6743e5766475bcf4d0"; + sha256 = "sha256-3d/qL+hovNA4VMWZ0n1L+dSM1lcz7P5CQJyy+/8exTc="; + }; + } + { + name = "nvm.fish"; + + src = pkgs.fetchFromGitHub { + owner = "jorgebucaran"; + repo = "nvm.fish"; + rev = "b8edb1ee24cbbf7259196b0cb3c6c4ab65b07929"; + sha256 = "sha256-7JxIQSseBv81SSpWH1pufx8fh9EQhbo3r2nVVREwc58="; + }; + } + { + name = "sponge"; + + src = pkgs.fetchFromGitHub { + owner = "meaningful-ooo"; + repo = "sponge"; + rev = "384299545104d5256648cee9d8b117aaa9a6d7be"; + sha256 = "sha256-MdcZUDRtNJdiyo2l9o5ma7nAX84xEJbGFhAVhK+Zm1w="; + }; + } + { + name = "autopair.fish"; + + src = pkgs.fetchFromGitHub { + owner = "jorgebucaran"; + repo = "autopair.fish"; + rev = "4d1752ff5b39819ab58d7337c69220342e9de0e2"; + sha256 = "sha256-qt3t1iKRRNuiLWiVoiAYOu+9E7jsyECyIqZJ/oRIT1A="; + }; + } + ]; + + shellAliases = { + # Verbosity + cp = "cp -iv"; + mv = "mv -iv"; + # rm = "rm -vI"; + bc = "bc -ql"; + rsync = "rsync -vrPlu"; + mkd = "mkdir -pv"; + yt = "yt-dlp --embed-metadata -i"; + yta = "yt -x -f bestaudio/best"; + ytt = "yt --skip-download --write-thumbnail"; + ffmpeg = "ffmpeg -hide_banner"; + wdic = "wdic --homophones --kanji --color --pager"; + hakuneko = "hakuneko-desktop --no-sandbox"; + fastfetch = "clear && /usr/bin/env fastfetch"; + wget = "wget --hsts-file=${config.xdg.dataHome}/wget-hsts"; + + # Modern Alternatives & Alias Rewrites + sxiv = "nsxiv"; + unzip = "ripunzip unzip-file"; + nvim = "lvim"; + vim = "lvim"; + vimdiff = "lvim -d"; + rm = "rip"; + + # Colourise + ls = "exa -h --no-quotes --color=auto --group-directories-first"; + grep = "grep --color=auto"; + diff = "diff --color=auto"; + ccat = "highlight --out-format=ansi"; + ip = "ip -color=auto"; + + # Abbreviations + ka = "killall"; + g = "git"; + sdn = "shutdown -h now"; + e = "$EDITOR"; + v = "$EDITOR"; + ff = "fastfetch"; + + # Other + pacbins = "comm -23 <(yay -Qqett | sort) <(yay -Qqg base -g base-devel | sort | uniq)"; + chan = "chan-downloader -c 10"; + taiga = "bottles-cli run -b Taiga -p Taiga"; + rotd = "systemctl --user restart opentabledriver.service"; + ks = "kaguya stream --user-agent 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0'"; + def = "myougiden"; + suzuri = "SUZURI_MINIMAL=1 SUZURI_REVERSE=1 ~/Documents/Code/Git/Fuwn/suzuri/suzuri"; + "5ch" = "html2md -i 'https://ff5ch.syoboi.jp/' -s section | glow"; + shinobu = "curl --silent https://shinobu.fuwn.workers.dev/shinobu -o /tmp/shinobu && nsxiv /tmp/shinobu"; + auto_subtitle = "source $HOME/Documents/Code/Git/Random/auto-subtitle/venv/bin/activate && auto_subtitle --model medium --task translate --srt_only True"; + steamy = "mangohud gamemoderun steam-runtime"; + koix = "koi -f"; + seamonkey = "$HOME/.local/src/seamonkey/seamonkey-bin"; + doom = "$HOME/.config/emacs/bin/doom"; + }; + }; +} diff --git a/home/ebisu/fortune/system/shell/scripting/charmbracelet/default.nix b/home/ebisu/fortune/system/shell/scripting/charmbracelet/default.nix new file mode 100644 index 0000000..e3b78df --- /dev/null +++ b/home/ebisu/fortune/system/shell/scripting/charmbracelet/default.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: { + home.packages = with pkgs; [ + gum + mods + ]; +} diff --git a/home/ebisu/fortune/system/shell/scripting/default.nix b/home/ebisu/fortune/system/shell/scripting/default.nix new file mode 100644 index 0000000..2fe33df --- /dev/null +++ b/home/ebisu/fortune/system/shell/scripting/default.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: { + imports = [ + ./charmbracelet + ./ripgrep + ]; + + programs.fzf.enable = true; + + home.packages = with pkgs; [ + mdcat + moreutils + pup + inxi + pv + yad + jq + ]; +} diff --git a/home/ebisu/fortune/system/shell/scripting/ripgrep/default.nix b/home/ebisu/fortune/system/shell/scripting/ripgrep/default.nix new file mode 100644 index 0000000..00de07f --- /dev/null +++ b/home/ebisu/fortune/system/shell/scripting/ripgrep/default.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: { + programs.ripgrep.enable = true; + + home.packages = with pkgs; [ + ripgrep-all + ]; +} diff --git a/home/ebisu/fortune/system/shell/starship/default.nix b/home/ebisu/fortune/system/shell/starship/default.nix new file mode 100644 index 0000000..0088038 --- /dev/null +++ b/home/ebisu/fortune/system/shell/starship/default.nix @@ -0,0 +1,305 @@ +{ pkgs, ... }: { + home.packages = with pkgs; [ + starship + ]; + + programs.starship = { + enable = true; + enableFishIntegration = true; + + # I CBA to update the formatting to match the rest of the expressions, since + # this is a one-off that I tend to import over directly from starship. + settings = { + format = "[term%](bold green) "; + right_format = "$character$all"; + add_newline = false; + + line_break = { + disabled = true; + }; + + character = { + success_symbol = "[i](bold green)"; + error_symbol = "[x](bold red)"; + vimcmd_symbol = "[n](bold green)"; + vimcmd_visual_symbol = "[v](bold green)"; + vimcmd_replace_symbol = "[R](bold green)"; + vimcmd_replace_one_symbol = "[r](bold green)"; + }; + + git_commit = { + tag_symbol = " tag "; + }; + + git_status = { + ahead = ">"; + behind = "<"; + diverged = "<>"; + renamed = "r"; + deleted = "x"; + }; + + aws = { + symbol = "aws "; + }; + + azure = { + symbol = "az "; + }; + + bun = { + symbol = "bun "; + }; + + c = { + symbol = "C "; + }; + + cobol = { + symbol = "cobol "; + }; + + conda = { + symbol = "conda "; + }; + + crystal = { + symbol = "cr "; + }; + + cmake = { + symbol = "cmake "; + }; + + daml = { + symbol = "daml "; + }; + + dart = { + symbol = "dart "; + }; + + deno = { + symbol = "deno "; + }; + + dotnet = { + symbol = ".NET "; + }; + + directory = { + read_only = " ro"; + }; + + docker_context = { + symbol = "docker "; + }; + + elixir = { + symbol = "exs "; + }; + + elm = { + symbol = "elm "; + }; + + fennel = { + symbol = "fnl "; + }; + + fossil_branch = { + symbol = "fossil "; + }; + + gcloud = { + symbol = "gcp "; + }; + + git_branch = { + symbol = "git "; + }; + + golang = { + symbol = "go "; + }; + + gradle = { + symbol = "gradle "; + }; + + guix_shell = { + symbol = "guix "; + }; + + hg_branch = { + symbol = "hg "; + }; + + java = { + symbol = "java "; + }; + + julia = { + symbol = "jl "; + }; + + kotlin = { + symbol = "kt "; + }; + + lua = { + symbol = "lua "; + }; + + nodejs = { + symbol = "nodejs "; + }; + + memory_usage = { + symbol = "memory "; + }; + + meson = { + symbol = "meson "; + }; + + nim = { + symbol = "nim "; + }; + + nix_shell = { + symbol = "nix "; + }; + + ocaml = { + symbol = "ml "; + }; + + opa = { + symbol = "opa "; + }; + + os = { + symbols = { + Alpaquita = "alq "; + Alpine = "alp "; + Amazon = "amz "; + Android = "andr "; + Arch = "rch "; + Artix = "atx "; + CentOS = "cent "; + Debian = "deb "; + DragonFly = "dfbsd "; + Emscripten = "emsc "; + EndeavourOS = "ndev "; + Fedora = "fed "; + FreeBSD = "fbsd "; + Garuda = "garu "; + Gentoo = "gent "; + HardenedBSD = "hbsd "; + Illumos = "lum "; + Linux = "lnx "; + Mabox = "mbox "; + Macos = "mac "; + Manjaro = "mjo "; + Mariner = "mrn "; + MidnightBSD = "mid "; + Mint = "mint "; + NetBSD = "nbsd "; + NixOS = "nix "; + OpenBSD = "obsd "; + OpenCloudOS = "ocos "; + openEuler = "oeul "; + openSUSE = "osuse "; + OracleLinux = "orac "; + Pop = "pop "; + Raspbian = "rasp "; + Redhat = "rhl "; + RedHatEnterprise = "rhel "; + Redox = "redox "; + Solus = "sol "; + SUSE = "suse "; + Ubuntu = "ubnt "; + Unknown = "unk "; + Windows = "win "; + }; + }; + + package = { + symbol = "pkg "; + }; + + perl = { + symbol = "pl "; + }; + + php = { + symbol = "php "; + }; + + pijul_channel = { + symbol = "pijul "; + }; + + pulumi = { + symbol = "pulumi "; + }; + + purescript = { + symbol = "purs "; + }; + + python = { + symbol = "py "; + }; + + raku = { + symbol = "raku "; + }; + + ruby = { + symbol = "rb "; + }; + + rust = { + symbol = "rs "; + }; + + scala = { + symbol = "scala "; + }; + + spack = { + symbol = "spack "; + }; + + solidity = { + symbol = "solidity "; + }; + + status = { + symbol = "[x](bold red) "; + }; + + sudo = { + symbol = "sudo "; + }; + + swift = { + symbol = "swift "; + }; + + typst = { + symbol = "typst "; + }; + + terraform = { + symbol = "terraform "; + }; + + zig = { + symbol = "zig "; + }; + }; + }; +} |