More prose

This commit is contained in:
Joe Frikker
2026-01-13 21:48:09 -05:00
parent a64288ced3
commit 4897472bf5

201
home.org
View File

@@ -31,57 +31,34 @@ This is the basic structure of the home.nix file. Individual sections are define
:header-args: :noweb-ref packages :header-args: :noweb-ref packages
:END: :END:
~SBCL~ is the current leading open-source common lisp compiler. It requires any libraries you want to be availble to be installed using withPackages. I really should install this per-project using direnv, rather than globally. I think it may work today, but I think I want to start using ~SBCL~ for scripting / exploratory development. So for now, it stays global. ~SBCL~ is the current leading open-source common lisp compiler. It requires any libraries you want
to be availble to be installed using withPackages. Many lisp projects I work on have this overridden
in a ~nix~ devshell I think I'd also like to use it for scripting / exploratory development, though,
so I'm installing it globally with a useful set of libraries. I should curate this somewhat
carefully so it doesn't get carried away...
#+BEGIN_SRC nix #+BEGIN_SRC nix
rlwrap rlwrap
roswell
(sbcl.withPackages (ps: with ps; [ (sbcl.withPackages (ps: with ps; [
_3bmd
_3bmd-ext-code-blocks
agnostic-lizard
alexandria alexandria
anypool
arrows
async-process
binding-arrows
bt-semaphore
chanl
cl-annot
cl-charms
cl-markup cl-markup
cl-migratum
cl-migratum_dot_provider_dot_local-path
cl-migratum_dot_driver_dot_dbi
cl-mock cl-mock
cl-punch
cl-rdkafka cl-rdkafka
cl-readline
cl-setlocale
clack clack
clack-handler-hunchentoot
clack-handler-woo clack-handler-woo
dbd-mysql dbd-mysql
dbi dbi
deploy
dexador dexador
fare-csv fare-csv
fiveam
group-by group-by
inquisitor
lack-request lack-request
lack-response lack-response
lisp-preprocessor
local-time local-time
log4cl log4cl
mito mito
mockingbird
myway myway
prove prove
prove-asdf prove-asdf
queues
queues_dot_priority-cqueue
queues_dot_simple-cqueue
replic replic
serapeum serapeum
shasht shasht
@@ -90,35 +67,66 @@ This is the basic structure of the home.nix file. Individual sections are define
split-sequence split-sequence
str str
sxql-composer sxql-composer
trivia
trivial-ws trivial-ws
trivial-open-browser trivial-open-browser
trivial-timeout trivial-timeout
uuid uuid
yason ])) ]))
#+END_SRC #+END_SRC
These are the other programs I have installed globally. A few (like ~awscli~, ~mysql-client~, etc.) are still Shibumi specific; ideally I'd find another way to install them. [[https://github.com/str4d/rage][~rage~]] is a rust implementation of [[https://pkg.go.dev/filippo.io/age][~age~]]. It implements a simple system for generating public /
private encryption keys, and encrypting / decrypting files with those keys. [[https://github.com/str4d/age-plugin-yubikey][~age-plugin-yubikey~]], as
the name implies, allows generating and storing ~age~ keys on a Yubikey. ~rage~ is required over
~age~ when using ~age.el~, because it supports ~pinentry~. That allows it to prompt for yubikey pins
using a dialog, rather than a command line prompt.
#+BEGIN_SRC nix #+BEGIN_SRC nix
rage
age-plugin-yubikey age-plugin-yubikey
aws-iam-authenticator #+END_SRC
awscli
bashInteractive ~dust~, ~fd~, ~ripgrep~, and ~xh~ are rust re-implementations of a few longtime Linux command-line
tools. They boost better speed, or simply more streamlined features.
| Command | Original |
| ~dust~ | ~du~ |
| ~fd~ | ~find~ |
| ~ripgrep~ | ~grep~ |
| ~xh~ | ~curl~ |
#+BEGIN_SRC nix
dust dust
fd fd
ripgrep
xh
#+END_SRC
[[https://ledger-cli.org/][~ledger~]] is how I manage my budget. It's a plain-text accounting tool that's really awesome.
#+BEGIN_SRC nix
ledger
#+END_SRC
~nil~ is an LSP server for nix files.
#+BEGIN_SRC nix
nil
#+END_SRC
These are the other programs I have installed globally. A few (like ~awscli~, ~mysql-client~, etc.)
are still Shibumi-specific; ideally I'd find another way to install them.
#+BEGIN_SRC nix
aws-iam-authenticator
awscli
iosevka iosevka
kube kube
kubectl kubectl
ledger
magic-wormhole magic-wormhole
nerd-fonts.jetbrains-mono nerd-fonts.jetbrains-mono
neovim
nil
openssh openssh
rage
ripgrep
tokei tokei
xh
yubikey-manager yubikey-manager
#+END_SRC #+END_SRC
@@ -127,11 +135,15 @@ These are the other programs I have installed globally. A few (like ~awscli~, ~m
:header-args: :noweb-ref programs :noweb no-export :header-args: :noweb-ref programs :noweb no-export
:END: :END:
This section contains applications whose config files will be generated by Home Manager. Home Manager calls these "programs" (as opposed to "packages", which are just binaries to put on the path). This section contains applications whose config files will be generated by Home Manager. Home
Manager calls these "programs" (as opposed to "packages", which are just binaries to put on the
path).
** Simple Programs ** Simple Programs
Although Home-Manager generates config files for these programs, they don't need their own dedicated configuration. I'm not sure what benefit there is to enabling ~jq~ as a Home Manager program, rather than just as an available package, but there doesn't seem to be a downside. Although Home-Manager generates config files for these programs, they don't need their own dedicated
configuration. I'm not sure what benefit there is to enabling ~jq~ as a Home Manager program, rather
than just as an available package, but there doesn't seem to be a downside.
#+BEGIN_SRC nix #+BEGIN_SRC nix
bash.enable = true; bash.enable = true;
@@ -144,7 +156,9 @@ Although Home-Manager generates config files for these programs, they don't need
** Bat ** Bat
~bat~ is a less alternative that performs syntax highlighting for a variety of languages. It also provides syntax-highlighting versions of a few other commands. It's honestly not incredibly useful, but still nice to have. ~bat~ is a less alternative that performs syntax highlighting for a variety of languages. It also
provides syntax-highlighting versions of a few other commands. It's honestly not incredibly useful,
but still nice to have.
#+BEGIN_SRC nix #+BEGIN_SRC nix
bat.enable = true; bat.enable = true;
@@ -153,7 +167,8 @@ Although Home-Manager generates config files for these programs, they don't need
** Direnv ** Direnv
~direnv~ allows loading per-project paths as I navigate to their directories on the command line. I leverage this with the emacs ~envrc~ package. ~direnv~ allows loading per-project paths as I navigate to their directories on the command line. I
leverage this with the emacs ~envrc~ package.
#+BEGIN_SRC nix #+BEGIN_SRC nix
direnv.enable = true; direnv.enable = true;
@@ -173,7 +188,8 @@ Although Home-Manager generates config files for these programs, they don't need
** Fzf ** Fzf
~fzf~ offers a variety of fuzzy finders right from the shell. I haven't been using this, so I'll turn it off for now. ~fzf~ offers a variety of fuzzy finders right from the shell. I haven't been using this, so I'll
turn it off for now.
#+BEGIN_SRC nix #+BEGIN_SRC nix
fzf.defaultCommand = "fd --type f"; fzf.defaultCommand = "fd --type f";
@@ -270,7 +286,8 @@ The best text editor ever? Heresy!
** Starship ** Starship
~starship~ gives me a nice shell prompt, mostly showing the versions of relevant software I have installed. It's shell-agnostic, so it works with both bash and zsh. ~starship~ gives me a nice shell prompt, mostly showing the versions of relevant software I have
installed. It's shell-agnostic, so it works with both bash and zsh.
#+BEGIN_SRC nix :noweb no-export #+BEGIN_SRC nix :noweb no-export
starship.enable = true; starship.enable = true;
@@ -300,7 +317,8 @@ The best text editor ever? Heresy!
** Tmux ** Tmux
I'm using ~wezterm~ instead of ~tmux~ for now, so this is disabled, but I'm keeping the config here in case I need it later. I'm using ~wezterm~ instead of ~tmux~ for now, so this is disabled, but I'm keeping the config here
in case I need it later.
#+BEGIN_SRC nix #+BEGIN_SRC nix
tmux.baseIndex = 1; tmux.baseIndex = 1;
@@ -326,7 +344,8 @@ set -g default-command ""
#+END_SRC #+END_SRC
** Wezterm ** Wezterm
~wezterm~ is a fast terminal emulator and multiplexer. It is configured using lua. We'll define its config in two blocks, so we can get lua syntax highlighting in org. First, the nix configuration: ~wezterm~ is a fast terminal emulator and multiplexer. It is configured using lua. We'll define its
config in two blocks, so we can get lua syntax highlighting in org. First, the nix configuration:
#+BEGIN_SRC nix :noweb no-export #+BEGIN_SRC nix :noweb no-export
wezterm.enable = true; wezterm.enable = true;
@@ -354,14 +373,19 @@ Then the real lua config:
config.window_decorations = "RESIZE" config.window_decorations = "RESIZE"
#+END_SRC #+END_SRC
I use a workspace switcher plugin, bouned to ~cmd-s~, that lets me quickly switch between per-project workspaces using a single OS window. I use a workspace switcher plugin, bouned to ~cmd-s~, that lets me quickly switch between
per-project workspaces using a single OS window.
#+BEGIN_SRC lua :noweb-ref wezterm #+BEGIN_SRC lua :noweb-ref wezterm
local workspace_switcher = wezterm.plugin.require("https://github.com/MLFlexer/smart_workspace_switcher.wezterm") local workspace_switcher = wezterm.plugin.require("https://github.com/MLFlexer/smart_workspace_switcher.wezterm")
workspace_switcher.zoxide_path='~/.nix-profile/bin/zoxide' workspace_switcher.zoxide_path='~/.nix-profile/bin/zoxide'
#+END_SRC #+END_SRC
Set up a default window layout when switching to a workspace that hasn't been opened in this session yet. This will create three tabs, caled "edit", "run", and "term", and open helix in the first one. I use "edit" for running the editor (obviously), "run" for building / running the application, and "term" for miscellaneous other tasks. I sometimes split the "run" window into multiple panes if the project requires multiple things to run simultaneously. Set up a default window layout when switching to a workspace that hasn't been opened in this session
yet. This will create three tabs, caled "edit", "run", and "term", and open helix in the first
one. I use "edit" for running the editor (obviously), "run" for building / running the application,
and "term" for miscellaneous other tasks. I sometimes split the "run" window into multiple panes if
the project requires multiple things to run simultaneously.
#+BEGIN_SRC lua :noweb-ref wezterm #+BEGIN_SRC lua :noweb-ref wezterm
wezterm.on('smart_workspace_switcher.workspace_switcher.created', function(window, path, workspace) wezterm.on('smart_workspace_switcher.workspace_switcher.created', function(window, path, workspace)
@@ -377,7 +401,8 @@ Set up a default window layout when switching to a workspace that hasn't been op
#+END_SRC #+END_SRC
Put the current workspace name in the lower-right corner of the window. Taken from [https://alexplescan.com/posts/2024/08/10/wezterm/]. Put the current workspace name in the lower-right corner of the window. Taken from
[https://alexplescan.com/posts/2024/08/10/wezterm/].
#+BEGIN_SRC lua :noweb-ref wezterm #+BEGIN_SRC lua :noweb-ref wezterm
local function segments_for_right_status(window) local function segments_for_right_status(window)
@@ -526,7 +551,8 @@ Now we'll set up some keybindings:
** Zsh ** Zsh
This is my default shell for now. Unfortunately, nix requires a posix-compliant shell, so bash or zsh it is. This is my default shell for now. Unfortunately, nix requires a posix-compliant shell, so bash or
zsh it is.
#+BEGIN_SRC nix #+BEGIN_SRC nix
zsh.enable = true; zsh.enable = true;
@@ -557,7 +583,10 @@ Actually, nix *really* requires ~bash~. This is a plugin that allows using zsh f
* Emacs * Emacs
Emacs is a huge portion of this configuration, so although it's a home-manager "program", I'm breaking it out into its own top-level section. Many of the sections here have two code blocks: a nix code block listing the emacs packages to include, and an elisp code block to configure them in emacs. Emacs is a huge portion of this configuration, so although it's a home-manager "program", I'm
breaking it out into its own top-level section. Many of the sections here have two code blocks: a
nix code block listing the emacs packages to include, and an elisp code block to configure them in
emacs.
#+BEGIN_SRC nix :noweb no-export :noweb-ref programs #+BEGIN_SRC nix :noweb no-export :noweb-ref programs
emacs.enable = true; emacs.enable = true;
@@ -571,7 +600,8 @@ Emacs is a huge portion of this configuration, so although it's a home-manager "
#+END_SRC #+END_SRC
** Keybindings ** Keybindings
These keybindings are scattered throughout this file, I'm collecting them all here to make it easier to track them. These keybindings are scattered throughout this file, I'm collecting them all here to make it easier
to track them.
| Key | Normal Key | Action | Mode | | Key | Normal Key | Action | Mode |
| s-b | | [[id:6D1A8B35-3093-4DA6-A5AA-2A0D45112BAB][Switch project buffer]] | | | s-b | | [[id:6D1A8B35-3093-4DA6-A5AA-2A0D45112BAB][Switch project buffer]] | |
@@ -626,49 +656,64 @@ Make sure which-key mode is always on. The on-the-fly keymap help it gives is in
(which-key-mode) (which-key-mode)
#+END_SRC #+END_SRC
Automatically refresh ~dired~ buffers when switching to them, instead of requiring an explicit refresh. Automatically refresh ~dired~ buffers when switching to them, instead of requiring an explicit
refresh.
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(setq dired-auto-revert-buffer t) (setq dired-auto-revert-buffer t)
#+END_SRC #+END_SRC
Similarly, highlighting the line the cursor is on is really useful for figuring out where you are, especially on monitors with a lot of vertical space. Similarly, highlighting the line the cursor is on is really useful for figuring out where you are,
especially on monitors with a lot of vertical space.
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(global-hl-line-mode) (global-hl-line-mode)
#+END_SRC #+END_SRC
From the docs: "If complete, TAB first tries to indent the current line, and if the line was already indented, then try to complete the thing at point." Recommended by [[https://github.com/minad/corfu][the ~corfu~ readme]]. From the docs: "If complete, TAB first tries to indent the current line, and if the line was
already indented, then try to complete the thing at point." Recommended by [[https://github.com/minad/corfu][the ~corfu~ readme]].
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(setq tab-always-indent 'complete) (setq tab-always-indent 'complete)
#+END_SRC #+END_SRC
Set the cursor to be a bar. I'm not sure what the benefit would be of a block cursor, since the current character isn't really "selected" like it would be in Helix. When I had God mode set up, I switched to a block cursor during normal mode, just because I was so used to it from Helix and Vim. Now, I don't think there's really a need to ever switch. Set the cursor to be a bar. I'm not sure what the benefit would be of a block cursor, since the
current character isn't really "selected" like it would be in Helix. When I had God mode set up, I
switched to a block cursor during normal mode, just because I was so used to it from Helix and
Vim. Now, I don't think there's really a need to ever switch.
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(setq-default cursor-type 'bar) (setq-default cursor-type 'bar)
#+END_SRC #+END_SRC
Emacs is supposed to be all about automation (maybe?). There's basically never a case where I don't want changes I've made to be immediately saved to disk. So let's have Emacs do that. There's still a fairly long (~5 sec) delay before changes are saved, which is kind of annoying. Maybe I'll look into that at some point? Emacs is supposed to be all about automation (maybe?). There's basically never a case where I don't
want changes I've made to be immediately saved to disk. So let's have Emacs do that. There's still a
fairly long (~5 sec) delay before changes are saved, which is kind of annoying. Maybe I'll look into
that at some point?
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(auto-save-visited-mode) (auto-save-visited-mode)
#+END_SRC #+END_SRC
Repeat-mode takes care of eliminating some annoying duplicate keypresses. I mostly use repeat-mode for two-character commands that need to be repeated; ~devil~ also has some single-key-with-modifier repeats set up that only apply in that mode. Repeat-mode takes care of eliminating some annoying duplicate keypresses. I mostly use repeat-mode
for two-character commands that need to be repeated; ~devil~ also has some single-key-with-modifier
repeats set up that only apply in that mode.
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(repeat-mode) (repeat-mode)
#+END_SRC #+END_SRC
Save the minibuffer history to disk, so recently-used options show up at the top of the picker across restarts. Save the minibuffer history to disk, so recently-used options show up at the top of the picker
across restarts.
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(savehist-mode) (savehist-mode)
#+END_SRC #+END_SRC
The doom modeline looks nice. I'm turning off IRC notifications, because it was slow to update (and it would update after every command, slowing down everything). I don't need the workspace name when I have the tab bar at the top of the window. The other settings just clear up some space, and make things look at little nicer. The doom modeline looks nice. I'm turning off IRC notifications, because it was slow to update (and
it would update after every command, slowing down everything). I don't need the workspace name when
I have the tab bar at the top of the window. The other settings just clear up some space, and make
things look at little nicer.
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(setq doom-modeline-irc nil) (setq doom-modeline-irc nil)
@@ -678,7 +723,9 @@ The doom modeline looks nice. I'm turning off IRC notifications, because it was
(doom-modeline-mode) (doom-modeline-mode)
#+END_SRC #+END_SRC
Ligature mode combines character sequences like <= into a single on-screen glyph. It looks kind of cool, so I'm turning it on in prog mode. The enabled ligatures are font-specific, taken from [[https://github.com/mickeynp/ligature.el/wiki#jetbrains-mono][the ligature wiki]]. Ligature mode combines character sequences like <= into a single on-screen glyph. It looks kind of
cool, so I'm turning it on in prog mode. The enabled ligatures are font-specific, taken from [[https://github.com/mickeynp/ligature.el/wiki#jetbrains-mono][the
ligature wiki]].
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(use-package ligature (use-package ligature
@@ -738,7 +785,8 @@ Don't run a server. I'm not using this, I can always turn it back on if I need t
(server-mode -1) (server-mode -1)
#+END_SRC #+END_SRC
All the beeping is annoying. This flashes a huge icon over the screen, which is still annoying, but less so? All the beeping is annoying. This flashes a huge icon over the screen, which is still annoying, but
less so?
#+BEGIN_SRC elisp :noweb no :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb no :noweb-ref emacs_config
(setq visible-bell t) (setq visible-bell t)
@@ -772,7 +820,16 @@ This configuration affects general text editing, across all modes. First, some p
string-inflection string-inflection
#+END_SRC #+END_SRC
I find Emacs to be almost unusable on a normal keyboard unless there's some way to avoid all the modifier keys. I tried Evil mode first. But although I love Vim, it just seemed to be hiding too much of the Emacs native functionality. The keybindings were also much harder to configure. I tried God mode, which has the benefit of re-using the normal Emacs keybindings and commands. It was annoying, though, because some read-only buffers (like magit buffers) have their own "normal-mode" commands that don't use modifiers. It felt jarring to switch to "insert mode" to use those keys. It's also hard to repeat sequences of M-f, M-b, etc. I could have made a ton of repeat maps, but I'm worried that having too many repeat maps will also be annoying (I'll have to explicitly cancel them more frequently). In the end, I opted for Devil mode. It avoids modifier keys, and has its own devil-mode-only repeat maps that don't interfere when using normal modifier key sequences. I find Emacs to be almost unusable on a normal keyboard unless there's some way to avoid all the
modifier keys. I tried Evil mode first. But although I love Vim, it just seemed to be hiding too
much of the Emacs native functionality. The keybindings were also much harder to configure. I tried
God mode, which has the benefit of re-using the normal Emacs keybindings and commands. It was
annoying, though, because some read-only buffers (like magit buffers) have their own "normal-mode"
commands that don't use modifiers. It felt jarring to switch to "insert mode" to use those
keys. It's also hard to repeat sequences of M-f, M-b, etc. I could have made a ton of repeat maps,
but I'm worried that having too many repeat maps will also be annoying (I'll have to explicitly
cancel them more frequently). In the end, I opted for Devil mode. It avoids modifier keys, and has
its own devil-mode-only repeat maps that don't interfere when using normal modifier key sequences.
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(use-package devil (use-package devil
@@ -857,9 +914,6 @@ I find Emacs to be almost unusable on a normal keyboard unless there's some way
#+END_SRC #+END_SRC
** Language Support ** Language Support
:PROPERTIES:
:ID: 5CCB676B-9FF0-47B4-8AF2-10FD3899A646
:END:
#+BEGIN_SRC nix :noweb-ref emacs_packages #+BEGIN_SRC nix :noweb-ref emacs_packages
consult-eglot consult-eglot
@@ -878,7 +932,9 @@ I find Emacs to be almost unusable on a normal keyboard unless there's some way
yaml-pro yaml-pro
#+END_SRC #+END_SRC
I had some weird problems with jsx code where the default M-q would just do a text fill rather than a re-indent. The solution seems to be to only do the ~syntax-ppss~ stuff if tree-sitter isn't available? It seems to work for now anyway... I had some weird problems with jsx code where the default M-q would just do a text fill rather than
a re-indent. The solution seems to be to only do the ~syntax-ppss~ stuff if tree-sitter isn't
available? It seems to work for now anyway...
#+BEGIN_SRC elisp :noweb-ref emacs_config #+BEGIN_SRC elisp :noweb-ref emacs_config
(use-package prog-mode (use-package prog-mode
@@ -1110,9 +1166,6 @@ I had some weird problems with jsx code where the default M-q would just do a te
#+END_SRC #+END_SRC
** Magit ** Magit
:PROPERTIES:
:ID: 4F426E77-CE03-4BF8-8D1B-7791C7C02B28
:END:
#+BEGIN_SRC nix :noweb-ref emacs_packages #+BEGIN_SRC nix :noweb-ref emacs_packages
consult-gh consult-gh
@@ -1147,9 +1200,6 @@ I had some weird problems with jsx code where the default M-q would just do a te
#+END_SRC #+END_SRC
** Vertico ** Vertico
:PROPERTIES:
:ID: 6D1A8B35-3093-4DA6-A5AA-2A0D45112BAB
:END:
#+BEGIN_SRC nix :noweb-ref emacs_packages #+BEGIN_SRC nix :noweb-ref emacs_packages
cape cape
@@ -1271,9 +1321,6 @@ I had some weird problems with jsx code where the default M-q would just do a te
#+END_SRC #+END_SRC
** Org ** Org
:PROPERTIES:
:ID: 3B0BFCDC-DFD5-42A0-97D8-3B032B128AF7
:END:
#+BEGIN_SRC nix :noweb-ref emacs_packages #+BEGIN_SRC nix :noweb-ref emacs_packages
org-modern org-modern