From e3aec69355f5a4b2a84db94369be27b8c5592479 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio Date: Sun, 18 Aug 2024 12:31:22 -0500 Subject: [PATCH] Initial commit --- dotfiles/.archive/copy-dots.bash | 31 ++ dotfiles/config/.config/amfora/config.toml | 367 ++++++++++++++++++ dotfiles/config/.config/amfora/newtab.gmi | 34 ++ dotfiles/config/.config/git/config | 10 + dotfiles/config/.config/rofi/catppuccin.rasi | 12 + dotfiles/config/.config/rofi/config.rasi | 104 +++++ dotfiles/config/.config/starship.toml | 113 ++++++ dotfiles/config/.config/zellij/config.kdl | 328 ++++++++++++++++ .../config/.config/zellij/layouts/default.kdl | 12 + dotfiles/just/.justfile | 39 ++ dotfiles/zsh/.zpath | 26 ++ dotfiles/zsh/.zshenv | 23 ++ dotfiles/zsh/.zshrc | 149 +++++++ dotfiles/zsh/.zshrc.d/aliases.zsh | 145 +++++++ dotfiles/zsh/.zshrc.d/bindings.zsh | 37 ++ ...tppuccin_mocha-zsh-syntax-highlighting.zsh | 74 ++++ dotfiles/zsh/.zshrc.d/functions.zsh | 235 +++++++++++ dotfiles/zsh/.zshrc.d/fzf.zsh | 12 + dotfiles/zsh/.zshrc.d/options.zsh | 151 +++++++ home.nix | 133 +++++++ 20 files changed, 2035 insertions(+) create mode 100755 dotfiles/.archive/copy-dots.bash create mode 100644 dotfiles/config/.config/amfora/config.toml create mode 100644 dotfiles/config/.config/amfora/newtab.gmi create mode 100644 dotfiles/config/.config/git/config create mode 100644 dotfiles/config/.config/rofi/catppuccin.rasi create mode 100644 dotfiles/config/.config/rofi/config.rasi create mode 100644 dotfiles/config/.config/starship.toml create mode 100644 dotfiles/config/.config/zellij/config.kdl create mode 100644 dotfiles/config/.config/zellij/layouts/default.kdl create mode 100644 dotfiles/just/.justfile create mode 100644 dotfiles/zsh/.zpath create mode 100644 dotfiles/zsh/.zshenv create mode 100644 dotfiles/zsh/.zshrc create mode 100644 dotfiles/zsh/.zshrc.d/aliases.zsh create mode 100644 dotfiles/zsh/.zshrc.d/bindings.zsh create mode 100644 dotfiles/zsh/.zshrc.d/catppuccin_mocha-zsh-syntax-highlighting.zsh create mode 100644 dotfiles/zsh/.zshrc.d/functions.zsh create mode 100644 dotfiles/zsh/.zshrc.d/fzf.zsh create mode 100644 dotfiles/zsh/.zshrc.d/options.zsh create mode 100644 home.nix diff --git a/dotfiles/.archive/copy-dots.bash b/dotfiles/.archive/copy-dots.bash new file mode 100755 index 0000000..f3ec20f --- /dev/null +++ b/dotfiles/.archive/copy-dots.bash @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +git_files=$(cd "${HOME}" && git ls-tree --name-only main) + +while IFS= read -r line; do + case $line in + ".config") + config_files=$(cd "${HOME}/.config" && git ls-tree --name-only main) + mkdir -p "$(pwd)/.config" + while IFS= read -r line; do + cp -rfv "${HOME}/.config/$line" "$(pwd)/.config/" + done <<< "$config_files" + ;; + ".gitignore") + echo "Skipping .gitignore" + ;; + ".gnupg") + echo "Skipping .gnupg" + ;; + ".local") + mkdir -p "$(pwd)/.local/share" + cp -rfv "${HOME}/.local/share/rofi" "$(pwd)/.local/share/" + ;; + ".ssh") + echo "Skipping .ssh" + ;; + *) + cp -rfv "${HOME}/$line" "$(pwd)/" + ;; + esac +done <<< "$git_files" diff --git a/dotfiles/config/.config/amfora/config.toml b/dotfiles/config/.config/amfora/config.toml new file mode 100644 index 0000000..e1f8b65 --- /dev/null +++ b/dotfiles/config/.config/amfora/config.toml @@ -0,0 +1,367 @@ +# This is the default config file. +# It also shows all the default values, if you don't create the file. + +# All URL values may omit the scheme and/or port, as well as the beginning double slash +# Valid URL examples: +# gemini://example.com +# //example.com +# example.com +# example.com:123 + + +[a-general] +# Press Ctrl-H to access it +home = "about:newtab" + +# Follow up to 5 Gemini redirects without prompting. +# A prompt is always shown after the 5th redirect and for redirects to protocols other than Gemini. +# If set to false, a prompt will be shown before following redirects. +auto_redirect = false + +# What command to run to open a HTTP(S) URL. +# Set to "default" to try to guess the browser, or set to "off" to not open HTTP(S) URLs. +# If a command is set, than the URL will be added (in quotes) to the end of the command. +# A space will be prepended to the URL. +# +# The best to define a command is using a string array. +# Examples: +http = ['firefox'] +# http = ['custom-browser', '--flag', '--option=2'] +# http = ['/path/with spaces/in it/firefox'] +# +# Note the use of single quotes, so that backslashes will not be escaped. +# Using just a string will also work, but it is deprecated, and will degrade if +# you use paths with spaces. + +# Any URL that will accept a query string can be put here +search = "gemini://gus.guru/search" + +# Whether colors will be used in the terminal +color = true + +# Whether ANSI color codes from the page content should be rendered +ansi = true + +# Whether or not to support source code highlighting in preformatted blocks based on alt text +highlight_code = true + +# Which highlighting style to use (see https://xyproto.github.io/splash/docs/) +highlight_style = "dracula" + +# Whether to replace list asterisks with unicode bullets +bullets = true + +# Whether to show link after link text +show_link = false + +# A number from 0 to 1, indicating what percentage of the terminal width the left margin should take up. +left_margin = 0.15 + +# The max number of columns to wrap a page's text to. Preformatted blocks are not wrapped. +max_width = 100 + +# 'downloads' is the path to a downloads folder. +# An empty value means the code will find the default downloads folder for your system. +# If the path does not exist it will be created. +# Note the use of single quotes, so that backslashes will not be escaped. +downloads = '/home/jas/downloads' + +# Max size for displayable content in bytes - after that size a download window pops up +page_max_size = 2097152 # 2 MiB +# Max time it takes to load a page in seconds - after that a download window pops up +page_max_time = 10 + +# Whether to replace tab numbers with emoji favicons, which are cached. +emoji_favicons = true + +# When a scrollbar appears. "never", "auto", and "always" are the only valid values. +# "auto" means the scrollbar only appears when the page is longer than the window. +scrollbar = "auto" + + +[auth] +# Authentication settings +# Note the use of single quotes for values, so that backslashes will not be escaped. + +[auth.certs] +# Client certificates +# Set domain name equal to path to client cert +# "example.com" = 'mycert.crt' +"bbs.geminispace.org" = "~/.config/amfora/idents/fd10177ef16eb7c13bf68cccc144e09bd7b87d885f77b6a34c0a7599582535a0.crt" + +[auth.keys] +# Client certificate keys +# Set domain name equal to path to key for the client cert above +# "example.com" = 'mycert.key' +"bbs.geminispace.org" = "~/.config/amfora/idents/fd10177ef16eb7c13bf68cccc144e09bd7b87d885f77b6a34c0a7599582535a0.key" + +[keybindings] +# If you have a non-US keyboard, use bind_tab1 through bind_tab0 to +# setup the shift-number bindings: Eg, for US keyboards (the default): +# bind_tab1 = "!" +# bind_tab2 = "@" +# bind_tab3 = "#" +# bind_tab4 = "$" +# bind_tab5 = "%" +# bind_tab6 = "^" +# bind_tab7 = "&" +# bind_tab8 = "*" +# bind_tab9 = "(" +# bind_tab0 = ")" + +# Whitespace is not allowed in any of the keybindings! Use 'Space' and 'Tab' to bind to those keys. +# Multiple keys can be bound to one command, just use a TOML array. +# To add the Alt modifier, the binding must start with Alt-, should be reasonably universal +# Ctrl- won't work on all keys, see this for a list: +# https://github.com/gdamore/tcell/blob/cb1e5d6fa606/key.go#L83 + +# An example of a TOML array for multiple keys being bound to one command is the default +# binding for reload: +# bind_reload = ["R","Ctrl-R"] +# One thing to note here is that "R" is capitalization sensitive, so it means shift-r. +# "Ctrl-R" means both ctrl-r and ctrl-shift-R (this is a quirk of what ctrl-r means on +# an ANSI terminal) + +# The default binding for opening the bottom bar for entering a URL or link number is: +# bind_bottom = "Space" +# This is how to get the Spacebar as a keybinding, if you try to use " ", it won't work. +# And, finally, an example of a simple, unmodified character is: +# bind_edit = "e" +# This binds the "e" key to the command to edit the current URL. + +# The bind_link[1-90] options are for the commands to go to the first 10 links on a page, +# typically these are bound to the number keys: +# bind_link1 = "1" +# bind_link2 = "2" +# bind_link3 = "3" +# bind_link4 = "4" +# bind_link5 = "5" +# bind_link6 = "6" +# bind_link7 = "7" +# bind_link8 = "8" +# bind_link9 = "9" +# bind_link0 = "0" + +# All keybindings: +# +# bind_bottom +# bind_edit +# bind_home +# bind_bookmarks +# bind_add_bookmark +# bind_save +# bind_reload +# bind_back +# bind_forward +# bind_pgup +# bind_pgdn +# bind_new_tab +# bind_close_tab +# bind_next_tab +# bind_prev_tab +# bind_quit +# bind_help +# bind_sub: for viewing the subscriptions page +# bind_add_sub + +[url-handlers] +# Allows setting the commands to run for various URL schemes. +# E.g. to open FTP URLs with FileZilla set the following key: +# ftp = 'filezilla' +# You can set any scheme to "off" or "" to disable handling it, or +# just leave the key unset. +# +# DO NOT use this for setting the HTTP command. +# Use the http setting in the "a-general" section above. +# +# NOTE: These settings are overrided by the ones in the proxies section. +# Note the use of single quotes, so that backslashes will not be escaped. + +# This is a special key that defines the handler for all URL schemes for which +# no handler is defined. +other = 'off' + + +# [[mediatype-handlers]] section +# --------------------------------- +# +# Specify what applications will open certain media types. +# By default your default application will be used to open the file when you select "Open". +# You only need to configure this section if you want to override your default application, +# or do special things like streaming. +# +# Note the use of single quotes for commands, so that backslashes will not be escaped. +# +# +# To open jpeg files with the feh command: +# +# Each command that you specify must come under its own [[mediatype-handlers]]. You may +# specify as many [[mediatype-handlers]] as you want to setup multiple commands. +# +# If the subtype is omitted then the specified command will be used for the +# entire type: +# +# [[mediatype-handlers]] +# command = ['vlc', '--flag'] +# types = ["audio", "video"] +# +# A catch-all handler can by specified with "*". +# Note that there are already catch-all handlers in place for all OSes, +# that open the file using your default application. This is only if you +# want to override that. +# +# [[mediatype-handlers]] +# cmd = ['some-command'] +# types = [ +# "application/pdf", +# "*", +# ] +# +# You can also choose to stream the data instead of downloading it all before +# opening it. This is especially useful for large video or audio files, as +# well as radio streams, which will never complete. You can do this like so: +# +# [[mediatype-handlers]] +# cmd = ['vlc', '-'] +# types = ["audio", "video"] +# stream = true +# +# This uses vlc to stream all video and audio content. +# By default stream is set to off for all handlers +# +# +# If you want to always open a type in its viewer without the download or open +# prompt appearing, you can add no_prompt = true +# +[[mediatype-handlers]] +cmd = ['eog'] +types = ["image"] +no_prompt = true + +[[mediatype-handlers]] +cmd = ['foliate'] +types = ["application/epub+zip"] +no_prompt = true + +[[mediatype-handlers]] +cmd = ['evince'] +types = ["application/pdf"] +no_prompt = true + +[[mediatype-handlers]] +cmd = ['vlc', '-'] +types = ["audio", "video"] +stream = true + +[[mediatype-handlers]] +cmd = ['emacsclient'] +types = [ + "application/json", + "text/plain", +] +no_prompt = true + +# +# Note: Multiple handlers cannot be defined for the same full media type, but +# still there needs to be an order for which handlers are used. The following +# order applies regardless of the order written in the config: +# +# 1. Full media type: "image/jpeg" +# 2. Just type: "image" +# 3. Catch-all: "*" + + +[cache] +# Options for page cache - which is only for text pages +# Increase the cache size to speed up browsing at the expense of memory +# Zero values mean there is no limit + +max_size = 0 # Size in bytes +max_pages = 30 # The maximum number of pages the cache will store + +# How long a page will stay in cache, in seconds. +timeout = 1800 # 30 mins + +[proxies] +# Allows setting a Gemini proxy for different schemes. +# The settings are similar to the url-handlers section above. +# E.g. to open a gopher page by connecting to a Gemini proxy server: +# gopher = "example.com:123" +# +# Port 1965 is assumed if no port is specified. +# +# NOTE: These settings override any external handlers specified in +# the url-handlers section. +# +# Note that HTTP and HTTPS are treated as separate protocols here. + + +[subscriptions] +# For tracking feeds and pages + +# Whether a pop-up appears when viewing a potential feed +popup = true + +# How often to check for updates to subscriptions in the background, in seconds. +# Set it to 0 to disable this feature. You can still update individual feeds +# manually, or restart the browser. +# +# Note Amfora will check for updates on browser start no matter what this setting is. +update_interval = 1800 # 30 mins + +# How many subscriptions can be checked at the same time when updating. +# If you have many subscriptions you may want to increase this for faster +# update times. Any value below 1 will be corrected to 1. +workers = 3 + +# The number of subscription updates displayed per page. +entries_per_page = 20 + +# Catppuccin Mocha +[theme] +bg = "#1E1E2E" +tab_num = "#cba6f7" +tab_divider = "#a6adc8" +bottombar_text = "#94e2d5" +bottombar_bg = "#45475a" +scrollbar = "#45475a" + +hdg_1 = "#cba6f7" +hdg_2 = "#cba6f7" +hdg_3 = "#cba6f7" +amfora_link = "#f38ba8" +foreign_link = "#fab387" +link_number = "#94e2d5" +regular_text = "#cdd6f4" +quote_text = "#f9e2af" +preformatted_text = "#fab387" +list_text = "#cdd6f4" + +btn_bg = "#45475a" +btn_text = "#cdd6f4" + +dl_choice_modal_bg = "#45475a" +dl_choice_modal_text = "#cdd6f4" +dl_modal_bg = "#45475a" +dl_modal_text = "#cdd6f4" +info_modal_bg = "#45475a" +info_modal_text = "#cdd6f4" +error_modal_bg = "#f38ba8" +error_modal_text = "#181825" +yesno_modal_bg = "#45475a" +yesno_modal_text = "#cdd6f4" +tofu_modal_bg = "#45475a" +tofu_modal_text = "#cdd6f4" +subscription_modal_bg = "#45475a" +subscription_modal_text = "#cdd6f4" + +input_modal_bg = "#45475a" +input_modal_text = "#cdd6f4" +input_modal_field_bg = "#313244" +input_modal_field_text = "#cdd6f4" + +bkmk_modal_bg = "#45475a" +bkmk_modal_text = "#cdd6f4" +bkmk_modal_label = "#cdd6f4" +bkmk_modal_field_bg = "#313244" +bkmk_modal_field_text = "#cdd6f4" diff --git a/dotfiles/config/.config/amfora/newtab.gmi b/dotfiles/config/.config/amfora/newtab.gmi new file mode 100644 index 0000000..ffe4bb3 --- /dev/null +++ b/dotfiles/config/.config/amfora/newtab.gmi @@ -0,0 +1,34 @@ + _____ _ _ _____ + / ____| (_) (_) / ____| +| | __ ___ _ __ ___ _ _ __ _ | (___ _ __ __ _ ___ ___ +| | |_ |/ _ \ '_ ` _ \| | '_ \| | \___ \| '_ \ / _` |/ __/ _ \ +| |__| | __/ | | | | | | | | | | ____) | |_) | (_| | (_| __/ + \_____|\___|_| |_| |_|_|_| |_|_| |_____/| .__/ \__,_|\___\___| + | | + |_| + + +## Internal pages +=> about:bookmarks Bookmarks +=> about:subscriptions Subscriptions + +## Gemini Space +=> gemini://hyperreal.coffee hyperreal.coffee +=> gemini://makeworld.space/amfora-wiki/ Amfora Wiki +=> gemini://gemini.circumlunar.space/ Project Gemini + +## BBS Quicklinks +=> gemini://bbs.geminispace.org bbs.geminispace.org +=> gemini://bbs.geminispace.org/s/ascii-art?feed s/ascii-art +=> gemini://bbs.geminispace.org/s/emacs?feed s/emacs +=> gemini://bbs.geminispace.org/s/Fediverse?feed s/Fediverse +=> gemini://bbs.geminispace.org/s/Gemini?feed s/Gemini +=> gemini://bbs.geminispace.org/s/Geminispace?feed s/Geminispace +=> gemini://bbs.geminispace.org/s/homelab?feed s/homelab +=> gemini://bbs.geminispace.org/s/IPFS?feed s/IPFS +=> gemini://bbs.geminispace.org/s/IRL-Issues?feed s/IRL-Issues +=> gemini://bbs.geminispace.org/s/Lagrange?feed s/Lagrange +=> gemini://bbs.geminispace.org/s/Linux?feed s/Linux +=> gemini://bbs.geminispace.org/s/privacy?feed s/privacy +=> gemini://bbs.geminispace.org/s/retrocomputing?feed s/retrocomputing +=> gemini://bbs.geminispace.org/s/retrogaming?feed s/retrogaming diff --git a/dotfiles/config/.config/git/config b/dotfiles/config/.config/git/config new file mode 100644 index 0000000..774886a --- /dev/null +++ b/dotfiles/config/.config/git/config @@ -0,0 +1,10 @@ +[core] + editor = "emacsclient" + pager = "diff-so-fancy | less --tabs=4 -RFX" +[init] + defaultBranch = "main" +[pull] + rebase = true +[user] + email = "23226432+hyperreal64@users.noreply.github.com" + name = "Jeffrey Serio" diff --git a/dotfiles/config/.config/rofi/catppuccin.rasi b/dotfiles/config/.config/rofi/catppuccin.rasi new file mode 100644 index 0000000..778ae54 --- /dev/null +++ b/dotfiles/config/.config/rofi/catppuccin.rasi @@ -0,0 +1,12 @@ +* { + bg-col: #1e1e2e; + bg-col-light: #313244; + border-col: #43465a; + selected-col: #181825; + blue: #f38ba8; + fg-col: #c6d0f5; + fg-col2: #cba6f7; + grey: #696d86; + width: 600; +} + diff --git a/dotfiles/config/.config/rofi/config.rasi b/dotfiles/config/.config/rofi/config.rasi new file mode 100644 index 0000000..430e00f --- /dev/null +++ b/dotfiles/config/.config/rofi/config.rasi @@ -0,0 +1,104 @@ +configuration{ + modi: "drun,filebrowser,window"; + lines: 5; + font: "JetBrainsMono Nerd Font Mono 14"; + show-icons: true; + icon-theme: "Papirus-Dark"; + terminal: "gnome-terminal"; + drun-display-format: "{icon} {name}"; + location: 0; + disable-history: false; + hide-scrollbar: true; + display-drun: " ๏”— Apps "; + display-run: " ๏„ต Run "; + display-window: " ๐Ÿ—” Windows "; + display-Network: " ๓ฐคจ Network "; + display-filebrowser: " ๐Ÿ“ Files "; + sidebar-mode: true; +} + +@theme "catppuccin" + +element-text, element-icon , mode-switcher { + background-color: inherit; + text-color: inherit; +} + +window { + height: 800px; + width: 1200px; + border: 3px; + border-color: @border-col; + background-color: @bg-col; +} + +mainbox { + background-color: @bg-col; +} + +inputbar { + children: [prompt,entry]; + background-color: @bg-col; + border-radius: 5px; + padding: 2px; +} + +prompt { + background-color: @blue; + padding: 6px; + text-color: @bg-col; + border-radius: 3px; + margin: 20px 0px 0px 20px; +} + +textbox-prompt-colon { + expand: false; + str: ":"; +} + +entry { + padding: 3px; + margin: 20px 0px 0px 10px; + text-color: @fg-col; + background-color: @bg-col; +} + +listview { + border: 0px 0px 0px; + padding: 3px 0px 0px; + margin: 10px 0px 0px 20px; + columns: 2; + background-color: @bg-col; +} + +element { + padding: 1px; + background-color: @bg-col; + text-color: @fg-col ; +} + +element-icon { + size: 32px; +} + +element selected { + background-color: @selected-col ; + text-color: @fg-col2 ; +} + +mode-switcher { + spacing: 0; + } + +button { + padding: 8px; + background-color: @bg-col-light; + text-color: @grey; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +button selected { + background-color: @bg-col; + text-color: @blue; +} diff --git a/dotfiles/config/.config/starship.toml b/dotfiles/config/.config/starship.toml new file mode 100644 index 0000000..a4b6d5d --- /dev/null +++ b/dotfiles/config/.config/starship.toml @@ -0,0 +1,113 @@ +# Sets user-defined palette +palette = "catppuccin_mocha" + +format = """$time$container$directory$all$line_break$username$hostname$character""" +right_format = """$cmd_duration $jobs $status""" + +[time] +disabled = false +format = '[\[ $time \]]($style) ' +time_format = "%T" +style = "bold peach" + +[username] +format = "[$user]($style)@" +style_user = "red" +style_root = "bold red" +show_always = true + +# Second param +[hostname] +format = "[$hostname]($style)" +style = "lavender" +trim_at = ".local" +ssh_only = false +disabled = false + +# Third param +[directory] +style = "subtext0" +truncation_length = 8 +truncate_to_repo = true +truncation_symbol = "repo: " + +# Before all the version info (python, nodejs, php, etc.) +[git_status] +style = "text" +ahead = "โ‡ก${count}" +diverged = "โ‡•โ‡ก${ahead_count}โ‡ฃ${behind_count}" +behind = "โ‡ฃ${count}" +deleted = "x" + +[container] +style = "bold pink" +format = "[$symbol \\[ $name \\]]($style) " + +# Last param in the first line/row +[cmd_duration] +min_time = 1 +style = "yellow" +format = "duration: [$duration]($style)" +disabled = false + +# Prompt: param 2 +[character] +format = "$symbol " +success_symbol = ' [%](teal)' +error_symbol = ' [%](red)' +vicmd_symbol = " [<](teal)" + +# SYMBOLS +[status] +format = 'exit status: [$status_common_meaning$status_signal_name$status]($style)' +disabled = false +style = "bold red" + +[docker_context] +symbol = "๏Œˆ " + +[git_branch] +symbol = "๏˜ " + +[golang] +symbol = "๎˜ง " + +[nodejs] +symbol = "๎‰ " + +[package] +symbol = "๏ฃ– " + +[python] +symbol = "๎˜† " + +[rust] +symbol = "๎žจ " + +[palettes.catppuccin_mocha] +rosewater = "#f5e0dc" +flamingo = "#f2cdcd" +pink = "#f5c2e7" +mauve = "#cba6f7" +red = "#f38ba8" +maroon = "#eba0ac" +peach = "#fab387" +yellow = "#f9e2af" +green = "#a6e3a1" +teal = "#94e2d5" +sky = "#89dceb" +sapphire = "#74c7ec" +blue = "#89b4fa" +lavender = "#b4befe" +text = "#cdd6f4" +subtext1 = "#bac2de" +subtext0 = "#a6adc8" +overlay2 = "#9399b2" +overlay1 = "#7f849c" +overlay0 = "#6c7086" +surface2 = "#585b70" +surface1 = "#45475a" +surface0 = "#313244" +base = "#1e1e2e" +mantle = "#181825" +crust = "#11111b" diff --git a/dotfiles/config/.config/zellij/config.kdl b/dotfiles/config/.config/zellij/config.kdl new file mode 100644 index 0000000..312f028 --- /dev/null +++ b/dotfiles/config/.config/zellij/config.kdl @@ -0,0 +1,328 @@ +// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true" +keybinds { + normal { + // uncomment this and adjust key if using copy_on_select=false + // bind "Alt c" { Copy; } + } + locked { + bind "Ctrl g" { SwitchToMode "Normal"; } + } + resize { + bind "Ctrl n" { SwitchToMode "Normal"; } + bind "h" "Left" { Resize "Increase Left"; } + bind "j" "Down" { Resize "Increase Down"; } + bind "k" "Up" { Resize "Increase Up"; } + bind "l" "Right" { Resize "Increase Right"; } + bind "H" { Resize "Decrease Left"; } + bind "J" { Resize "Decrease Down"; } + bind "K" { Resize "Decrease Up"; } + bind "L" { Resize "Decrease Right"; } + bind "=" "+" { Resize "Increase"; } + bind "-" { Resize "Decrease"; } + } + pane { + bind "Ctrl p" { SwitchToMode "Normal"; } + bind "h" "Left" { MoveFocus "Left"; } + bind "l" "Right" { MoveFocus "Right"; } + bind "j" "Down" { MoveFocus "Down"; } + bind "k" "Up" { MoveFocus "Up"; } + bind "p" { SwitchFocus; } + bind "n" { NewPane; SwitchToMode "Normal"; } + bind "d" { NewPane "Down"; SwitchToMode "Normal"; } + bind "r" { NewPane "Right"; SwitchToMode "Normal"; } + bind "x" { CloseFocus; SwitchToMode "Normal"; } + bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; } + bind "z" { TogglePaneFrames; SwitchToMode "Normal"; } + bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; } + bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; } + bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;} + } + move { + bind "Ctrl h" { SwitchToMode "Normal"; } + bind "n" "Tab" { MovePane; } + bind "h" "Left" { MovePane "Left"; } + bind "j" "Down" { MovePane "Down"; } + bind "k" "Up" { MovePane "Up"; } + bind "l" "Right" { MovePane "Right"; } + } + tab { + bind "Ctrl t" { SwitchToMode "Normal"; } + bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } + bind "h" "Left" "Up" "k" { GoToPreviousTab; } + bind "l" "Right" "Down" "j" { GoToNextTab; } + bind "n" { NewTab; SwitchToMode "Normal"; } + bind "x" { CloseTab; SwitchToMode "Normal"; } + bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; } + bind "1" { GoToTab 1; SwitchToMode "Normal"; } + bind "2" { GoToTab 2; SwitchToMode "Normal"; } + bind "3" { GoToTab 3; SwitchToMode "Normal"; } + bind "4" { GoToTab 4; SwitchToMode "Normal"; } + bind "5" { GoToTab 5; SwitchToMode "Normal"; } + bind "6" { GoToTab 6; SwitchToMode "Normal"; } + bind "7" { GoToTab 7; SwitchToMode "Normal"; } + bind "8" { GoToTab 8; SwitchToMode "Normal"; } + bind "9" { GoToTab 9; SwitchToMode "Normal"; } + bind "Tab" { ToggleTab; } + } + scroll { + bind "Ctrl s" { SwitchToMode "Normal"; } + bind "e" { EditScrollback; SwitchToMode "Normal"; } + bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; } + bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } + bind "j" "Down" { ScrollDown; } + bind "k" "Up" { ScrollUp; } + bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } + bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } + bind "d" { HalfPageScrollDown; } + bind "u" { HalfPageScrollUp; } + // uncomment this and adjust key if using copy_on_select=false + // bind "Alt c" { Copy; } + } + search { + bind "Ctrl s" { SwitchToMode "Normal"; } + bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } + bind "j" "Down" { ScrollDown; } + bind "k" "Up" { ScrollUp; } + bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } + bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } + bind "d" { HalfPageScrollDown; } + bind "u" { HalfPageScrollUp; } + bind "n" { Search "down"; } + bind "p" { Search "up"; } + bind "c" { SearchToggleOption "CaseSensitivity"; } + bind "w" { SearchToggleOption "Wrap"; } + bind "o" { SearchToggleOption "WholeWord"; } + } + entersearch { + bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; } + bind "Enter" { SwitchToMode "Search"; } + } + renametab { + bind "Ctrl c" { SwitchToMode "Normal"; } + bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; } + } + renamepane { + bind "Ctrl c" { SwitchToMode "Normal"; } + bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; } + } + session { + bind "Ctrl o" { SwitchToMode "Normal"; } + bind "Ctrl s" { SwitchToMode "Scroll"; } + bind "d" { Detach; } + } + tmux { + bind "[" { SwitchToMode "Scroll"; } + bind "Ctrl b" { Write 2; SwitchToMode "Normal"; } + bind "\"" { NewPane "Down"; SwitchToMode "Normal"; } + bind "%" { NewPane "Right"; SwitchToMode "Normal"; } + bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; } + bind "c" { NewTab; SwitchToMode "Normal"; } + bind "," { SwitchToMode "RenameTab"; } + bind "p" { GoToPreviousTab; SwitchToMode "Normal"; } + bind "n" { GoToNextTab; SwitchToMode "Normal"; } + bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; } + bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; } + bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; } + bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; } + bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; } + bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; } + bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; } + bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; } + bind "o" { FocusNextPane; } + bind "d" { Detach; } + } + shared_except "locked" { + bind "Ctrl g" { SwitchToMode "Locked"; } + bind "Ctrl q" { Quit; } + bind "Alt n" { NewPane; } + bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } + bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } + bind "Alt j" "Alt Down" { MoveFocus "Down"; } + bind "Alt k" "Alt Up" { MoveFocus "Up"; } + bind "Alt =" "Alt +" { Resize "Increase"; } + bind "Alt -" { Resize "Decrease"; } + } + shared_except "normal" "locked" { + bind "Enter" "Esc" { SwitchToMode "Normal"; } + } + shared_except "pane" "locked" { + bind "Ctrl p" { SwitchToMode "Pane"; } + } + shared_except "resize" "locked" { + bind "Ctrl n" { SwitchToMode "Resize"; } + } + shared_except "scroll" "locked" { + bind "Ctrl s" { SwitchToMode "Scroll"; } + } + shared_except "session" "locked" { + bind "Ctrl o" { SwitchToMode "Session"; } + } + shared_except "tab" "locked" { + bind "Ctrl t" { SwitchToMode "Tab"; } + } + shared_except "move" "locked" { + bind "Ctrl h" { SwitchToMode "Move"; } + } + shared_except "tmux" "locked" { + bind "Ctrl b" { SwitchToMode "Tmux"; } + } +} + +plugins { + tab-bar { path "tab-bar"; } + status-bar { path "status-bar"; } + strider { path "strider"; } +// compact-bar { path "compact-bar"; } +} + +// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP +// eg. when terminal window with an active zellij session is closed +// Options: +// - detach (Default) +// - quit +// +// on_force_close "quit" + +// Send a request for a simplified ui (without arrow fonts) to plugins +// Options: +// - true +// - false (Default) +// +// simplified_ui true + +// Choose the path to the default shell that zellij will use for opening new panes +// Default: $SHELL +// +// default_shell "fish" + +// Toggle between having pane frames around the panes +// Options: +// - true (default) +// - false +// +// pane_frames true + +// Define color themes for Zellij +// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes +// Once these themes are defined, one of them should to be selected in the "theme" section of this file +// +// themes { +// dracula { +// fg 248 248 242 +// bg 40 42 54 +// red 255 85 85 +// green 80 250 123 +// yellow 241 250 140 +// blue 98 114 164 +// magenta 255 121 198 +// orange 255 184 108 +// cyan 139 233 253 +// black 0 0 0 +// white 255 255 255 +// } +// } +themes { + catppuccin-mocha { + bg "#585b70" + fg "#cdd6f4" + red "#f38ba8" + green "#a6e3a1" + blue "#89b4fa" + yellow "#f9e2af" + magenta "#f5c2e7" + orange "#fab387" + cyan "#89dceb" + black "#181825" + white "#cdd6f4" + } + rose-pine { + bg "#191724" + fg "#e0def4" + red "#eb6f92" + green "#31748f" + blue "#9ccfd8" + yellow "#f6c177" + magenta "#c4a7e7" + orange "#fe640b" + cyan "#ebbcba" + black "#26233a" + white "#e0def4" + } +} + + +// Choose the theme that is specified in the themes section. +// Default: default +// +theme "catppuccin-mocha" + +// The name of the default layout to load on startup +// Default: "default" +// +default_layout "default" + +// Choose the mode that zellij uses when starting up. +// Default: normal +// +// default_mode "locked" + +// Toggle enabling the mouse mode. +// On certain configurations, or terminals this could +// potentially interfere with copying text. +// Options: +// - true (default) +// - false +// +// mouse_mode false + +// Configure the scroll back buffer size +// This is the number of lines zellij stores for each pane in the scroll back +// buffer. Excess number of lines are discarded in a FIFO fashion. +// Valid values: positive integers +// Default value: 10000 +// +// scroll_buffer_size 10000 + +// Provide a command to execute when copying text. The text will be piped to +// the stdin of the program to perform the copy. This can be used with +// terminal emulators which do not support the OSC 52 ANSI control sequence +// that will be used by default if this option is not set. +// Examples: +// +//copy_command "xclip -selection clipboard" // x11 +copy_command "wl-copy" // wayland +// copy_command "pbcopy" // osx + +// Choose the destination for copied text +// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. +// Does not apply when using copy_command. +// Options: +// - system (default) +// - primary +// +copy_clipboard "system" + +// Enable or disable automatic copy (and clear) of selection when releasing mouse +// Default: true +// +copy_on_select true + +// Path to the default editor to use to edit pane scrollbuffer +// Default: $EDITOR or $VISUAL +// +scrollback_editor "/bin/emacs -nw" + +// When attaching to an existing session with other users, +// should the session be mirrored (true) +// or should each user have their own cursor (false) +// Default: false +// +// mirror_session true + +// The folder in which Zellij will look for layouts +// +layout_dir "/home/jas/.config/zellij/layouts" + +// The folder in which Zellij will look for themes +// +// theme_dir "/path/to/my/theme_dir" diff --git a/dotfiles/config/.config/zellij/layouts/default.kdl b/dotfiles/config/.config/zellij/layouts/default.kdl new file mode 100644 index 0000000..600de8d --- /dev/null +++ b/dotfiles/config/.config/zellij/layouts/default.kdl @@ -0,0 +1,12 @@ +layout { + default_tab_template { + pane size=1 borderless=true { + plugin location="zellij:tab-bar" + } + children + pane size=2 borderless=true { + plugin location="zellij:status-bar" + } + } + tab +} diff --git a/dotfiles/just/.justfile b/dotfiles/just/.justfile new file mode 100644 index 0000000..9ef9640 --- /dev/null +++ b/dotfiles/just/.justfile @@ -0,0 +1,39 @@ +# justfile for common household tasks + +set shell := ["zsh", "-cu"] + +go-tools: + go install golang.org/x/tools/gpls@latest + go install github.com/fatih/gomodifytags@latest + go install github.com/cweill/gotests/...@latest + go install github.com/x-motemen/gore/cmd/gore@latest + go install golang.org/x/tools/cmd/guru@latest + +python-tools: + pipx install --include-deps ansible + pipx install black + pipx install nose + pipx install pytest + pipx install hyfetch + pip install --user pyright + +webdev-tools: + sudo npm install -g @catppuccin/inkcat + sudo npm install -g prettier + sudo npm install -g js-beautify + sudo npm install -g stylelint + sudo dnf install -y tidy + +rust-tools: + source "${HOME}/.cargo/env" + cargo install cargo-binstall + cargo_pkgs=(arp-scan bandwhich bat diskonaut du-dust fblog fd hyperfine procs ripgrep skim vivid wthrr) + for pkg in "${cargo_pkgs[@]}"; do cargo-binstall -y "$pkg"; done + +refresh-doom-emacs: + rm -rf "${HOME}/.config/emacs" + git clone --depth 1 https://github.com/doomemacs/doomemacs "${HOME}/.config/emacs" + "${HOME}/.config/emacs/bin/doom" install --force --verbose + +rustup: + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh diff --git a/dotfiles/zsh/.zpath b/dotfiles/zsh/.zpath new file mode 100644 index 0000000..0722688 --- /dev/null +++ b/dotfiles/zsh/.zpath @@ -0,0 +1,26 @@ +#!/usr/bin/env zsh + +# PATH variable declaration as array +# -U means unique, which tells the shell not to add anything to the array if it's +# already there. +typeset -U PATH path + +# Set Go path if it exists +[ -d "${HOME}/go/bin" ] && path+=("${HOME}/go/bin") + +# Set Cargo path for Rust binaries +[ -d "${HOME}/.cargo/bin" ] && path+=("${HOME}/.cargo/bin") + +# Add ~/bin to PATH +[ -d "${HOME}/bin" ] && path+=("${HOME}/bin") + +# Add ~/.local/bin to PATH +[ -d "${HOME}/.local/bin" ] && path+=("${HOME}/.local/bin") + +# Add ~/.npm-global/bin to PATH +[ -d "${HOME}/.npm-global/bin" ] && path+=("${HOME}/.npm-global/bin") + +export PATH + +# Automatically remove duplicates from these arrays +typeset -gU path cdpath manpath fpath diff --git a/dotfiles/zsh/.zshenv b/dotfiles/zsh/.zshenv new file mode 100644 index 0000000..0868542 --- /dev/null +++ b/dotfiles/zsh/.zshenv @@ -0,0 +1,23 @@ +# +# Generic .zshenv file for zsh +# +# .zshenv is sourced on ALL invocations of the shell, unless the -f option is +# set. It should NOT normally contain commands to set the command search path, +# or other common environment variables unless you really know what you're +# doing. E.g. running "PATH=/custom/path gdb program" sources this file (when +# gdb runs the program via $SHELL), so you want to be sure not to override a +# custom environment in such cases. Note also that .zshenv should not contain +# commands that produce output or assume the shell is attached to a tty. +# + +# Some people insist on setting their PATH here to affect things like ssh. +# Those that do should probably use $SHLVL to ensure that this only happens +# the first time the shell is started (to avoid overriding a customized +# environment). Also, the various profile/rc/login files all get sourced +# *after* this file, so they will override this value. One solution is to +# put your path-setting code into a file named .zpath, and source it from +# both here (if we're not a login shell) and from the .zprofile file (which +# is only sourced if we are a login shell). +if [[ $SHLVL == 1 ]]; then + source ~/.zpath +fi diff --git a/dotfiles/zsh/.zshrc b/dotfiles/zsh/.zshrc new file mode 100644 index 0000000..b73ebdf --- /dev/null +++ b/dotfiles/zsh/.zshrc @@ -0,0 +1,149 @@ +# Filename : ~/.zshrc +# Purpose : setup file for zsh +# Author : Jeffrey Serio +# Homepage : https://hyperreal.coffee +# +# Zsh Manual - https://zsh-manual.netlify.app +# Zsh Guide - https://zsh-guide.netlify.app +# +# ,----[ man -k zsh ] +# | +# | zsh (1) - the Z shell +# | zshall (1) - the Z shell meta-man page +# | zshbuiltins (1) - zsh builtin commands +# | zshcalsys (1) - zsh calendar system +# | zshcompctl (1) - zsh programmable completion +# | zshcompsys (1) - zsh completion system +# | zshcompwid (1) - zsh completion widgets +# | zshcontrib (1) - user contributions to zsh +# | zshexpn (1) - zsh expansion and substitution +# | zshmisc (1) - everything and then some +# | zshmodules (1) - zsh loadable modules +# | zshoptions (1) - zsh options +# | zshparam (1) - zsh parameters +# | zshroadmap (1) - informal introduction to the zsh manual +# | zshtcpsys (1) - zsh tcp system +# | zshzftpsys (1) - zftp function front-end +# | zshzle (1) - zsh command line editor +# `---- +# +# Zsh startup sequence +# 1) /etc/zshenv -> Always run for every zsh. (login + interactive + other) +# 2) ~/.zshenv -> Usually run for every zsh. (login + interactive + other) +# 3) /etc/zprofile -> Run for login shells. (login) +# 4) ~/.zprofile -> Run for login shells. (login) +# 5) /etc/zshrc -> Run for interactive shells. (login + interactive) +# 6) ~/.zshrc -> Run for interactive shells. (login + interactive) +# 7) /etc/zlogin -> Run for login shells. (login) +# 8) ~/.zlogin -> Run for login shells. (login) +# +# This file is based on Christian Schneider's zsh configuration +# https://www.strcat.de/dotfiles + +# Load Homebrew +if test -d "/home/linuxbrew"; then + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +fi + +# Plugins +if ! test -f ~/.zplug/init.zsh; then + export ZPLUG_HOME=~/.zplug + git clone https://github.com/zplug/zplug $ZPLUG_HOME +fi + +source ~/.zplug/init.zsh + +# Use autosuggestions when typing commands +zplug "zsh-users/zsh-autosuggestions" + +# Use a keybinding to complete parts of command from the history file +zplug "zsh-users/zsh-history-substring-search" + +# Use syntax highlighting when typing commands +zplug "zsh-users/zsh-syntax-highlighting", defer:2 + +# Press escape twice to prepend `sudo` to the command line +zplug "plugins/sudo", from:oh-my-zsh + +# extract archives +zplug "plugins/extract", from:oh-my-zsh + +# systemd aliases +zplug "plugins/systemd", from:oh-my-zsh + +# bookmarks +zplug "zpm-zsh/zshmarks" + +# Load file from ~/.zshrc.d +zplug "~/.zshrc.d", from:local, use:'*' + +if ! zplug check; then + zplug install; + exec $SHELL $SHELL_ARGS "$@" +fi + +zplug load + +# ----------------------------------------------------------------------------- +# ENVIRONMENT VARS +# ----------------------------------------------------------------------------- +export SHELL=/usr/bin/zsh +export DOOMDIR="${HOME}/nextcloud/doom" +export LS_COLORS=$(vivid generate catppuccin-mocha) +export PAGER="less -X" +export MANWIDTH="88" +export MANROFFOPT="-c" +export MANPAGER="less -X" + +if test -x "$(command -v emacs)"; then + EDITOR="emacs" +else + EDITOR="nvim" +fi +export EDITOR + +# Have less display colours +# from: https://wiki.archlinux.org/index.php/Color_output_in_console#man +export LESS_TERMCAP_mb=$'\e[1;31m' # begin bold +export LESS_TERMCAP_md=$'\e[1;34m' # begin blink +export LESS_TERMCAP_so=$'\e[01;0;33m' # begin reverse video +export LESS_TERMCAP_us=$'\e[01;31m' # begin underline +export LESS_TERMCAP_me=$'\e[0m' # reset bold/blink +export LESS_TERMCAP_se=$'\e[0m' # reset reverse video +export LESS_TERMCAP_ue=$'\e[0m' # reset underline +export GROFF_NO_SGR=1 # for konsole and gnome-terminal + +# HISTSIZE is the number of lines of history that is kept within any given +# running zsh instance. SAVEHIST is the number of lines of history that is +# written out to the HISTFILE when that event occurs. If you use the +# HIST_EXPIRE_DUPS_FIRST option, setting this value larger than the SAVEHIST +# size will give you the difference as a cushion for saving duplicated history +# events. +HISTSIZE=100000 +SAVEHIST=65536 + +# Name of the file used to store command history +HISTFILE=~/.zsh_history + +# Language +export LANG="en_US.UTF-8" + +# Manpages +export MANPATH="${MANPATH:-/usr/share/man:/usr/local/share/man}" + +if [ -d "${HOME}/.fzf/man" ]; then + export MANPATH="${MANPATH}:${HOME}/.fzf/man" +fi + +# Bat theme +export BAT_THEME="Catppuccin Mocha" + +# Automatically remove duplicates from these arrays +typeset -gU path cdpath manpath fpath + +# compatibility with vterm-buffer-name-string in Emacs +autoload -U add-zsh-hook +add-zsh-hook -Uz chpwd() { print -Pn "\e]2;%m:%2~\a" } + +# starship.rs +eval "$(starship init zsh)" diff --git a/dotfiles/zsh/.zshrc.d/aliases.zsh b/dotfiles/zsh/.zshrc.d/aliases.zsh new file mode 100644 index 0000000..9bed0ee --- /dev/null +++ b/dotfiles/zsh/.zshrc.d/aliases.zsh @@ -0,0 +1,145 @@ +# Get top 10 shell commands +alias top10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10' + +# history mechanism +alias h='history' + +# Aliases for APT +if [ -e "/etc/debian_version" ]; then + alias acs="sudo apt-cache search" + alias acp="sudo apt-cache policy" + alias afs="sudo apt-file search" + alias afu="sudo apt-file update" + alias aac="sudo apt autoclean" + alias agc="sudo apt clean" + alias agi="sudo apt install" + alias agli="sudo apt list --installed" + alias agp="sudo apt purge" + alias agr="sudo apt remove" + alias agu="sudo apt update" + alias agud="sudo apt update && sudo apt dist-upgrade" + alias agar="sudo apt autoremove" +fi + +if [ -e "/etc/redhat-release" ]; then + alias dnfc='sudo dnf clean all' + alias dnfgi='sudo dnf groupinstall' + alias dnfgl='dnf grouplist' + alias dnfgr='sudo dnf groupremove' + alias dnfi='sudo dnf install' + alias dnfl='dnf list' + alias dnfli='dnf list installed' + alias dnfmc='dnf makecache' + alias dnfp='dnf info' + alias dnfr='sudo dnf remove' + alias dnfs='dnf search' + alias dnfu='sudo dnf update' +fi + +# Convert UPPER to lower (or back) +alias UP2low='for i in *(.); mv $i ${i:l}' +alias low2UP='for i in *(.); mv $i ${i:u}' + +# The ls family +if test -x "$(command -v lsd)"; then + alias ls='lsd' +else + alias ls='ls --color=auto' +fi + +alias l='ls -lFhg' +alias la='ls -a' +alias ll='ls -l' +alias lal='ls -al' +alias ldot='ls -gld .*' +alias lse='ls -lZ' + +# greps +alias grep='grep --color' +alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}' + +# Copy SSH public key to clipboard (requires xclip or xsel) +if test -x "$(command -v xclip)"; then + alias pubkey='printf "$(cat ~/.ssh/id_ed25519.pub)" | xclip -selection clipboard | echo "SSH public key copied"' +fi + +# Prompt user before overwriting files +alias cp='cp -i' +alias mv='mv -i' +alias rm='trash' +alias del='/bin/rm -i' + +# Display zsh functions with bat +alias zfun='functions | bat -l zsh' + +# Assorted global aliases +alias -g H='| head' +alias -g T='| tail' +alias -g G='| grep' +alias -g L='| less -X' +alias -g B='| bat' +alias -g J='| jq' +alias -g CC='| wl-copy' +alias -g C='| wc -l' + +# Get public IP address +alias pubip4='curl -s -m 5 ipv4.icanhazip.com' +alias pubip6='curl -s -m 5 ipv6.icanhazip.com' + +# List apps with network connections +alias netcons='lsof -i' + +# List ports +alias tulp='ss -tulp' + +# List open ports +alias openports='sudo lsof -i | grep LISTEN' + +# Ping google.com +alias pong='ping -c 3 www.google.com' + +# Ping alias +alias ping='ping -c 3' + +# List sockets in use +alias lsock='sudo lsof -i -P' + +# List UDP sockets in use +alias lsocku='sudo lsof -nP | grep UDP' + +# List TCP sockets in use +alias lsockt='sudo lsof -nP | grep TCP' + +# Reboot / Poweroff +alias rbt='sudo systemctl reboot' +alias shut='sudo systemctl poweroff' + +# firewalld +if test -x "$(command -v firewall-cmd)"; then + alias fw='sudo firewall-cmd' + alias fwp='sudo firewall-cmd --permanent' + alias fwr='sudo firewall-cmd --reload' + alias fwrp='sudo firewall-cmd --runtime-to-permanent' +fi + +# git +alias ga='git add' +alias gcl='git clone' +alias gcmsg='git commit -m' +alias gd='git diff' +alias gl='git pull' +alias gp='git push' +alias gr='git remote' +alias grbi='git rebase -i' +alias grm='git rm' +alias grv='git remote -v' +alias gst='git status' + +# doom emacs +alias doomdoc="~/.config/emacs/bin/doom doctor" +alias dsync="~/.config/emacs/bin/doom sync" +alias dclean="~/.config/emacs/bin/doom clean" +alias dcomp="~/.config/emacs/bin/doom compile" +alias dpurge="~/.config/emacs/bin/doom purge" +alias denv="~/.config/emacs/bin/doom env" +alias dupgrade="~/.config/emacs/bin/doom upgrade" diff --git a/dotfiles/zsh/.zshrc.d/bindings.zsh b/dotfiles/zsh/.zshrc.d/bindings.zsh new file mode 100644 index 0000000..a716406 --- /dev/null +++ b/dotfiles/zsh/.zshrc.d/bindings.zsh @@ -0,0 +1,37 @@ +typeset -g -A key + +key[Home]="${terminfo[khome]}" +key[End]="${terminfo[kend]}" + +[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line +[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line + +if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then + autoload -Uz add-zle-hook-widget + function zle_application_mode_start { echoti smkx } + function zle_application_mode_stop { echoti rmkx } + add-zle-hook-widget -Uz zle-line-init zle_application_mode_start + add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop +fi + +## keybinding for convenient viewing of man pages +if test -x "${HOME}/bin/split-man"; then + split-man-widget() { "${HOME}/bin/split-man"} + zle -N split-man-widget + + bindkey '^[m' split-man-widget +fi + +## gumssh +if test -x "$(command -v gumssh)"; then + bindkey -s '^[s' 'gumssh^M' +fi + +## ranger +if test -x "$(command -v ranger)"; then + bindkey -s '^[f' 'ranger^M' +fi + +## history substring search +bindkey '^[[1;5A' history-substring-search-up +bindkey '^[[1;5B' history-substring-search-down diff --git a/dotfiles/zsh/.zshrc.d/catppuccin_mocha-zsh-syntax-highlighting.zsh b/dotfiles/zsh/.zshrc.d/catppuccin_mocha-zsh-syntax-highlighting.zsh new file mode 100644 index 0000000..b7387fa --- /dev/null +++ b/dotfiles/zsh/.zshrc.d/catppuccin_mocha-zsh-syntax-highlighting.zsh @@ -0,0 +1,74 @@ +# Catppuccin Mocha Theme (for zsh-syntax-highlighting) +# +# Paste this files contents inside your ~/.zshrc before you activate zsh-syntax-highlighting +ZSH_HIGHLIGHT_HIGHLIGHTERS=(main cursor) +typeset -gA ZSH_HIGHLIGHT_STYLES + +# Main highlighter styling: https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters/main.md +# +## General +### Diffs +### Markup +## Classes +## Comments +ZSH_HIGHLIGHT_STYLES[comment]='fg=#585b70' +## Constants +## Entitites +## Functions/methods +ZSH_HIGHLIGHT_STYLES[alias]='fg=#a6e3a1' +ZSH_HIGHLIGHT_STYLES[suffix-alias]='fg=#a6e3a1' +ZSH_HIGHLIGHT_STYLES[global-alias]='fg=#a6e3a1' +ZSH_HIGHLIGHT_STYLES[function]='fg=#a6e3a1' +ZSH_HIGHLIGHT_STYLES[command]='fg=#a6e3a1' +ZSH_HIGHLIGHT_STYLES[precommand]='fg=#a6e3a1,italic' +ZSH_HIGHLIGHT_STYLES[autodirectory]='fg=#fab387,italic' +ZSH_HIGHLIGHT_STYLES[single-hyphen-option]='fg=#fab387' +ZSH_HIGHLIGHT_STYLES[double-hyphen-option]='fg=#fab387' +ZSH_HIGHLIGHT_STYLES[back-quoted-argument]='fg=#cba6f7' +## Keywords +## Built ins +ZSH_HIGHLIGHT_STYLES[builtin]='fg=#a6e3a1' +ZSH_HIGHLIGHT_STYLES[reserved-word]='fg=#a6e3a1' +ZSH_HIGHLIGHT_STYLES[hashed-command]='fg=#a6e3a1' +## Punctuation +ZSH_HIGHLIGHT_STYLES[commandseparator]='fg=#f38ba8' +ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-unquoted]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]='fg=#f38ba8' +ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]='fg=#f38ba8' +ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]='fg=#f38ba8' +## Serializable / Configuration Languages +## Storage +## Strings +ZSH_HIGHLIGHT_STYLES[command-substitution-quoted]='fg=#f9e2af' +ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-quoted]='fg=#f9e2af' +ZSH_HIGHLIGHT_STYLES[single-quoted-argument]='fg=#f9e2af' +ZSH_HIGHLIGHT_STYLES[single-quoted-argument-unclosed]='fg=#eba0ac' +ZSH_HIGHLIGHT_STYLES[double-quoted-argument]='fg=#f9e2af' +ZSH_HIGHLIGHT_STYLES[double-quoted-argument-unclosed]='fg=#eba0ac' +ZSH_HIGHLIGHT_STYLES[rc-quote]='fg=#f9e2af' +## Variables +ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument-unclosed]='fg=#eba0ac' +ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[assign]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[named-fd]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[numeric-fd]='fg=#cdd6f4' +## No category relevant in spec +ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=#eba0ac' +ZSH_HIGHLIGHT_STYLES[path]='fg=#cdd6f4,underline' +ZSH_HIGHLIGHT_STYLES[path_pathseparator]='fg=#f38ba8,underline' +ZSH_HIGHLIGHT_STYLES[path_prefix]='fg=#cdd6f4,underline' +ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]='fg=#f38ba8,underline' +ZSH_HIGHLIGHT_STYLES[globbing]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[history-expansion]='fg=#cba6f7' +#ZSH_HIGHLIGHT_STYLES[command-substitution]='fg=?' +#ZSH_HIGHLIGHT_STYLES[command-substitution-unquoted]='fg=?' +#ZSH_HIGHLIGHT_STYLES[process-substitution]='fg=?' +#ZSH_HIGHLIGHT_STYLES[arithmetic-expansion]='fg=?' +ZSH_HIGHLIGHT_STYLES[back-quoted-argument-unclosed]='fg=#eba0ac' +ZSH_HIGHLIGHT_STYLES[redirection]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[arg0]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[default]='fg=#cdd6f4' +ZSH_HIGHLIGHT_STYLES[cursor]='fg=#cdd6f4' diff --git a/dotfiles/zsh/.zshrc.d/functions.zsh b/dotfiles/zsh/.zshrc.d/functions.zsh new file mode 100644 index 0000000..ada679a --- /dev/null +++ b/dotfiles/zsh/.zshrc.d/functions.zsh @@ -0,0 +1,235 @@ +# Command checker helper +function check_cmd() { + test -x "$(command -v $1)" +} + +## Nushell and jc functions + +# nushell: df +function nudf() { + nu -c 'jc df | from json' +} + +# nushell: free +function numem() { + nu -c 'jc free | from json' +} + +# nushell: lsof -i +function nunetcons() { + nu -c 'jc lsof -i | from json' +} + +# nushell: nutulp +function nutulp() { + nu -c 'jc ss -tulp | from json' +} + +# nushell: openports +function nuopenports() { + nu -c 'sudo jc lsof -i | from json | find "LISTEN"' +} + +# nushell: timestamp Z +function nutsz() { + nu -c 'date now | format date "%FT%T%:z"' +} + +# watch directory listing, update every 0.1s +function watchdir() { + watch -n0,1 "ls -lh $1/ | tail" +} + +# get time in timezone +function timein() { + continent=$(find /usr/share/zoneinfo -maxdepth 1 -mindepth 1 -type d -not -name "posix" -not -name "right" -exec basename {} \; | gum choose --limit=1) + city=$(find "/usr/share/zoneinfo/$continent" -type f -exec basename {} \; | gum choose --limit=1) + TZ="$continent/$city" date +} + +# Generate a pseudo-random 16-character string. +function genrand() { + openssl rand -base64 16 +} + +# Remove ~/.ssh/known_hosts* +function rmknownhosts() { + rm -v "${HOME}/.ssh/known_hosts"* +} + +# Empty trash +function rubbish() { + if check_cmd trash-empty; then + trash-empty + fi +} + +# Compatibility with emacs-libvterm +function vterm_printf() { + if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ]); then + # Tell tmux to pass the escape sequences through + printf "\ePtmux;\e\e]%s\007\e\\" "$1" + elif [ "${TERM%%-*}" = "screen" ]; then + # GNU screen (screen, screen-256color, screen-256color-bce) + printf "\eP\e]%s\007\e\\" "$1" + else + printf "\e]%s\e\\" "$1" + fi +} + +# Remove all .jpeg .jpg .png .svg files from downloads +function rmpics() { + find "${HOME}/downloads" \ + -maxdepth 1 \ + -type f \ + \( -name "*.jpg" -o -name "*.jpg_original" -o -name "*.jpeg" -o -name "*.svg" -o -name "*.png" \) \ + -delete +} + +# Remove all ISOs and disc images from downloads +function rmisos() { + find "${HOME}/downloads" \ + -maxdepth 1 \ + -type f \ + \( -name "*.iso" -o -name "*.img" \) \ + -delete +} + +# Create a bookmark. +function mark() { + + if ! test -f "${HOME}/.shellmarks"; then + touch "${HOME}/.shellmarks" + fi + + mark_to_add="$(pwd)" + + if grep -qxFe "${mark_to_add}" "${HOME}/.shellmarks"; then + gum style \ + --foreground 210 \ + --margin "1 2" \ + "This bookmark already exists: ${mark_to_add}" + else + echo "${mark_to_add}" >> "${HOME}/.shellmarks" + gum style \ + --foreground "#73F59F" \ + --margin "1 2" \ + "${mark_to_add} added to shellmarks file" + fi + + cat "${HOME}/.shellmarks" | sort | tee "${HOME}/.shellmarks" >/dev/null + + return 0 +} + +# List bookmarks. +function lsmarks() { + echo "# Shellmarks" | gum format + + while IFS= read -r line; do + echo "- $line" + done < "${HOME}/.shellmarks" | gum format +} + +# Remove bookmarks. +function delmark() { + selection=$(cat "${HOME}/.shellmarks" | gum choose --no-limit) + + if test -n "${selection}"; then + while read -r line; do + perl -n -i -e "print unless /^\\Q${line//\//\\/}\\E\$/" "${HOME}/.shellmarks" + done <<< "${selection}" + else + return 0 + fi + + gum format -t markdown -- \ + "# The following bookmarks were deleted:" \ + "$(printf "%s\n" "${selection}")" + + return 0 +} + +# Goto a bookmark. +function gotomark() { + if ! test -f "${HOME}/.shellmarks"; then + echo "No bookmarks exist yet. Add some!" + return 1 + fi + + echo + builtin cd $(cat "${HOME}/.shellmarks" | gum choose --limit=1) + + local precmd + for precmd in $precmd_functions; do + $precmd + done + zle && zle reset-prompt +} +zle -N gotomark +bindkey '^[g' gotomark + +# Choose a directory from the directory stack. +function dstack() { + echo "# Choose a directory" | gum format -t markdown + selection=$(dirs -lp | gum choose --limit=1) + cd $selection +} + +# Print timestamp as %Y-%m-%d %H:%M:%S. +function tstamp() { + emulate -L zsh + date '+%Y-%m-%d %H:%M:%S' +} + +# Print timestamp as %Y-%m-%dT%H:%M:%S%:z +function tstampz() { + emulate -L zsh + date '+%Y-%m-%dT%H:%M:%S%:z' +} + +# Create a /overview/ of all available function()'s; the description for +# each funtion() *must* be the first line above the string `function'! +# Otherwise it wont work. +# Display all function()'s with their descriptions. +function funlist() { + grep -B 1 "^function" $HOME/.zshrc.d/functions.zsh | \ + grep -v "^\-\-$" | \ + awk '{ if(/^#/) { gsub(/^#[:space:]*/, ""); ht=$0 }; getline; gsub(/ ?\(\)/, ":"); printf("-> %-20s %s\n", $2, ht); }' | \ + sort -u -k 3 +} + +# zrmcomp() remove *.zwc files. +function zrmcomp() { + local i + for i in ${HOME}/*.zwc(N); do + printf "Removing $i\n" + command rm -f $i + done +} + +# Invoke this every time you change .zshrc to recompile it. +function src() { + autoload -U zrecompile + [ -f ~/.zshrc ] && zrecompile -p ~/.zshrc + [ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump + [ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump + [ -f ~/.zshrc.zwc.old ] && command rm -f ~/.zshrc.zwc.old + [ -f ~/.zcompdump.zwc.old ] && command rm -f ~/.zcompdump.zwc.old + source ~/.zshrc +} + +# Do an ls after cd. +function cd() { builtin cd "$@" && ls; } + +# Create new directory and enter it. +function mkd() { mkdir -p "$@" && cd "$_"; } + +# Display pids of commands. +function pids() { pgrep -a "$@"; } + +# Restart zsh. +function restart() { exec $SHELL $SHELL_ARGS "$@"; } + +# cd to ~, clear screen, and restart zsh. +function rsrc() { cd && clear && restart; } diff --git a/dotfiles/zsh/.zshrc.d/fzf.zsh b/dotfiles/zsh/.zshrc.d/fzf.zsh new file mode 100644 index 0000000..a132f1d --- /dev/null +++ b/dotfiles/zsh/.zshrc.d/fzf.zsh @@ -0,0 +1,12 @@ +# ~/.zshrc.d/fzf.zsh + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +## default opts uses Catppuccin (mocha) color palette +export FZF_DEFAULT_OPTS='--color=bg+:#302D41,bg:#1E1E2E,spinner:#F8BD96,hl:#F28FAD --color=fg:#D9E0EE,header:#F28FAD,info:#DDB6F2,pointer:#F8BD96 --color=marker:#F8BD96,fg+:#F2CDCD,prompt:#DDB6F2,hl+:#F28FAD' + +## completion trigger +export FZF_COMPLETION_TRIGGER="~~" + +## default source for fzf +export FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git" diff --git a/dotfiles/zsh/.zshrc.d/options.zsh b/dotfiles/zsh/.zshrc.d/options.zsh new file mode 100644 index 0000000..b24ca93 --- /dev/null +++ b/dotfiles/zsh/.zshrc.d/options.zsh @@ -0,0 +1,151 @@ +## General shell options +# See https://zsh-manual.netlify.app/options + +# This is a multiple move based on zsh pattern matching (like "mmv"). +# Read ``less ${^fpath}/zmv(N)'' for more details. +autoload zmv + +# A builtin that can clone a running shell onto another terminal. +zmodload -e zsh/clone + +# When listing options (by 'setopt', 'unsetopt', 'set -o', or 'set +o'), +# those turned on by default appear in the list prefixed with 'no'. +# Hence (unless KSH_OPTION_PRINT is set), 'setopt' shows all options whose +# settings are changed from default. +# +# Report the status of background jobs immediately, rather than waiting until +# just before printing a prompt. +setopt notify + +# Allow comments even in interactive shells. +setopt interactivecomments + +# Send *not* a HUP signal to running jobs when the shell exits. +setopt nohup + +# If a pattern for filename generation has no matches, delete the pattern from +# the argument list instead of reporting an error. +# Overrides NOMATCH +setopt nullglob + +# Perform =filename access +# $ setopt EQUALS +# $ echo =ls +# /bin/ls +# $ unsetopt EQUALS +# $ echo =ls +# =ls +# NOTE: It's not really needed because zsh sets the per default. +setopt equals + +# Try to make completion list smaller by printing the matches in columns with +# different widths. +setopt list_packed + +# Expands single letters and ranges of letters between braces +# $ print 1{abw-z}2 +# $ 1a2 1b2 1w2 1y2 1z2 +setopt braceccl + +# If the argument to a cd command (or an implied cd with the AUTO_CD option +# set) is not a directory, and does not begin with a slash, try to expand the +# expression as if it were preceded by a '~' (See section 14.7 Filename +# Expansion). +setopt cdablevars + +# Report the status of background and suspended jobs before exiting a shell +# with job control; a second attempt to exit the shell will succeed. +setopt checkjobs + +# Make cd push the old directory onto the directory stack. +setopt autopushd + +# Change to directory without cd +setopt autocd + +# Query the user before executing 'rm *' or 'rm path/*' +setopt normstarsilent +setopt no_rm_star_wait + +# Shaddapa you face +setopt nobeep + +# When writing out the history file, older commands that duplicate newer ones +# are omitted. +set histsavenodups + +# When searching for history entries in the line editor, do not display +# duplicates of a line previously found, even if the duplicates are not +# contiguous. +setopt histfindnodups + +# If the internal history needs to be trimmed to add the current command line, +# setting this option will cause the oldest history event that has a duplicate +# to be lost before losing a unique event from the list. +setopt hist_expire_dups_first + +# If a new command line being added to the history list duplicates an older +# one, the older command is removed from the list (even if it is not the +# previous event). +setopt hist_ignore_all_dups + +# Do not enter command lines into the history list if they are duplicates of +# the previous event. +setopt hist_ignore_dups + +# Remove superfluous blanks from each command line being added to history. +setopt hist_reduce_blanks + +# Whenever the user enters a line with history expansion, don't execute the +# line directly; instead, perform history expansion and reload the line into +# the editing buffer. +setopt hist_verify + +# Do not remove function definitions from the history list. +unsetopt hist_no_functions + +# Remove the history (fc -l) command from the history list when invoked. +# Note that the command lingers in the internal history until the next command +# is entered before it vanishes, allowing you to briefly reuse or edit the +# line. +setopt hist_no_store + +# If this is set, zsh sessions will append their history list to the history +# file, rather than overwrite it. Thus, multiple parallel zsh sessions will all +# have their history lists added to the history file, in the order they are +# killed. +setopt appendhistory + +# If unset, the cursor is set to the end of the word if completion is started. +# Otherwise, it stays there and completion is done from both ends. +unsetopt completeinword + +# When listing files that are possible completions, show the type of each file +# with a trailing identifying mark. +setopt listtypes + +# Do not require a leading '.' in a filename to be matched explicitly. +setopt globdots + +# List jobs in long format by default +setopt longlistjobs + +# Don't push multiple copies of the same directory onto the directory staack. +setopt pushdignoredups + +# This option both imports new commands from the history file, and also causes +# your typed commands to be appended to the history file (the latter is like +# specifying INC_APPEND_HISTORY). +# The history lines are also output with timestamps ala EXTENDED_HISTORY +# (which makes it easier to find the spot where we left off reading the file +# after it gets re-written). +setopt sharehistory + +# Save each command's beginning timestamp (in seconds since the epoch) +# and the duration (in seconds) to the history file. The format of this +# prefixed data is: +# '::;' +setopt extendedhistory + +# Do *not* run all background jobs at a lower nice priority +unsetopt bgnice diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..11c76a8 --- /dev/null +++ b/home.nix @@ -0,0 +1,133 @@ +{ config, pkgs, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "jas"; + home.homeDirectory = "/home/jas"; + + home.stateVersion = "24.05"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = with pkgs; [ + ansible + arp-scan + autossh + bat + diskonaut + doggo + dust + fblog + fd + gcc + glow + go + gomodifytags + gopls + gore + gotests + gotools + gum + html-tidy + hyfetch + hyperfine + just + lagrange + lsd + nmap + nodejs + nodePackages.js-beautify + nodePackages.npm + nodePackages.prettier + procs + pyright + python312 + python312Packages.ansible + python312Packages.black + python312Packages.nose + python312Packages.pytest + ripgrep + rustc + rustscan + starship + stow + stylelint + tealdeer + vivid + wl-clipboard + wthrr + zellij + ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + ".justfile".source = dotfiles/just/.justfile; + ".zshrc".source = dotfiles/zsh/.zshrc; + ".zshrc.d".source = dotfiles/zsh/.zshrc.d; + ".zpath".source = dotfiles/zsh/.zpath; + ".zshenv".source = dotfiles/zsh/.zshenv; + ".config/zellij".source = dotfiles/config/.config/zellij; + ".config/starship.toml".source = dotfiles/config/.config/starship.toml; + }; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + + # git config + programs.git = { + enable = true; + diff-so-fancy = { + enable = true; + pagerOpts = ["--tabs=4" "-RFX"]; + }; + userName = "Jeffrey Serio"; + userEmail = "hyperreal@moonshadow.dev"; + extraConfig = { + core = { + editor = "emacsclient"; + }; + init = { + defaultBranch = "main"; + }; + pull = { + rebase = true; + }; + }; + }; + + # ssh config + programs.ssh.enable = true; + programs.ssh.matchBlocks = { + "hyperreal.coffee" = { + hostname = "hyperreal.coffee"; + user = "jas"; + identityFile = "~/.ssh/id_ed25519"; + }; + "box.moonshadow.dev" = { + hostname = "box.moonshadow.dev"; + user = "jas"; + identityFile = "~/.ssh/id_ed25519"; + }; + "truenas" = { + hostname = "10.0.0.81"; + user = "admin"; + identityFile = "~/.ssh/id_ed25519"; + }; + "aux-vm" = { + hostname = "10.0.0.26"; + user = "jas"; + identityFile = "~/.ssh/id_ed25519"; + }; + "bttracker.nirn.quest" = { + hostname = "bttracker.nirn.quest"; + user = "jas"; + identityFile = "~/.ssh/id_ed25519"; + }; + }; +}