How i tried to use my config at

Well, i was trying to make my dotfiles portable, and coming to tilde became an opportunity to test this portability.

In such kinda restricted environment i discovered some flaws of my configuration. If nix was there this "relocation" would pass well, but nix isn't there. Also i didn't actually want to bloat the tilde server with the entire dependency tree of my packages in case i install nix as user. I see nix more as a tool for restoring my own machine state in case i break it somehow, maybe reinstall because i can bloat linux with constant experiments or if i buy a new PC.

Without access to system package manager extra dependencies feel painful. Well, i installed nushell and yadm anyhow, but it turned out nushell with my config throws errors if i don't have vivid and direnv. I replaced the first one with just a text file. Not bad exchange: 1MB of rust binary to 9kb text file, yeah? Well, text file has less functionality but idk who even need to change LS_COLORS like gloves. Even if you want to do that... you can just export LS_COLORS=$(cat cool_theme.txt), don't you? Idk why would one download/compile an entire Rust program for that.

For direnv, i simply added a check for its existence before adding the hook.

Also i have to pipe everything to less every time because my $PAGER is set to moar and that's not cool. I'm planning to make my config more flexible by moving options which require some dependencies to yadm alt-files or conditions.

Nushell startup and errors

If e.g. zsh encounters an error while executing .zshrc it just logs the error and continues executing. For interactive shell that's good. For scripting, as i know there is set -euo pipefail for bash and probably something for zsh too.

In contrast to them, nushell behaves like any normal language. C.*, python, Java, JS would stop the whole program on first error/exception. And that's cool for serious programming, but that sucks for config of interactive shell. When i'm testing some configs in nushell i can't even restart it fast because r is aliased to exec nu in the nushell config! And it doesn't work if something in the config throws an error. Maybe it's just my config tho. I am going to try to reorder the sources and module imports in my config.

I'm writing about that because nushell throwed an error because i didn't have zoxide. I configured it so it would generate the init script on shell startup but now i see that sucks. Shell is an entry point and it should start succesfully with the minimal amount of dependencies so that i could "bootstrap" these dependencies either manually or automatically or even ignore them. I love compiled and strongly typed languages because i can produce more reliable apps with them. But there is an exception for shell. I would better have some checkhealth function and runtime errors than fully disabled shell.

Or maybe i should use some testing environment for my configs how anyone would do with any project. Idk who would compile the app and output right to $PATH in the middle of development. It sucks that dotfiles merge conflicts break neovim. I actually need this editor to resolve these conflicts! Maybe i need some VM, container or a separate user for testing. Or just wrap an entire config into a try-catch block?