Ask HN: Go deep into AI/LLMs or just use them as tools?
154 points by pella_may 13h ago 119 comments
Ask HN: Selling software to company I work for as an employee
40 points by apohak 3d ago 51 comments
Show HN: Lnk – Git-native dotfiles manager
69 yar-kravtsov 47 5/24/2025, 11:41:19 AM github.com ↗
Move dotfiles to ~/.config/lnk, get symlinks back, use Git normally. Single binary, no config files, no fluff. Built because chezmoi was too complex and plain Git was too manual.
When you ‘lnk add’ a file, check it for patterns that might indicate it contains a secret, and warn the user if indications of a secret are found. Require —force or something to override.
we only see those dotfiles that are public so how can we know?
Then you can just not track that file in the tool and figure out a safe way to back it up.
And it adds "how safe are those encrypted secrets [edit: changed from "keys" to more general language] that are committed?" and "what about previous revisions . . . because it's version control?" and "are we sure we're managing offboarding securely?"
There are probably other concerns but those are the ones the immediately shout at me.
GNU Stow: - Package-based structure: Requires organizing dotfiles into "packages" (subdirectories) - Symlink-only: Just handles symlinking, no version control integration - Manual Git: You manage Git separately (git clone → stow package-name) - Perl dependency: Requires Perl to be installed - No safety net: No atomic operations or rollback if something goes wrong
lnk: - File-based workflow: Takes your existing dotfiles as-is, moves them to managed location - Git-integrated: Wraps Git commands (lnk push, lnk pull) for seamless workflow - Atomic operations: If something fails, automatically rolls back changes - Single binary: No dependencies, just download and run - New machine workflow: lnk init -r repo && lnk pull handles clone + restore in one step
Key Difference in Workflow:
Stow approach: # Organize files into packages first mkdir -p ~/.dotfiles/vim/.config/nvim mv ~/.config/nvim/init.lua ~/.dotfiles/vim/.config/nvim/ git add . && git commit # On new machine: git clone repo ~/.dotfiles stow vim # Creates symlinks
lnk approach: # Start with files where they are lnk add ~/.config/nvim/init.lua # Moves and links automatically lnk push "added nvim config" # On new machine: lnk init -r repo && lnk pull # Clone + restore in one command
Bottom line: Stow is a pure symlinking tool that you combine with Git manually. lnk is an opinionated workflow that handles the entire dotfiles lifecycle (move → version → sync → restore).
No comments yet
Some scenarios where dot fils may differ between computers:
- My .gitconfig is different on my work laptop than my desktop.
- I don't have neovim installed on my pi zero running DNS for my home network.
- My zsh functions for making animated gifs won't work if specific tools are not installed.
- An alias to open an image with the default image viewer is different between macos and linux.
- I only have rust toolchain installed on my home desktop, so I shouldn't see it in my PATH on my work laptop.
Is there any solution out there that can handle similar cases? Or are these requirements unique to me? (I don't quite believe they are.)
In any case you can manage your bashrc/profile and handle conditional logic to install packages there.
```if command -q exa alias ls="exa" alias ll="exa -lah" alias tree="exa --tree" end
if command -q eza alias ls="eza" alias ll="eza -lah" alias tree="eza --tree" end```
https://github.com/jabirali/fish-abbrfile
I’ve started modeling fish with zsh and OMZ customs
It in turn references HN, to come full circle.
[1] https://wiki.archlinux.org/title/Dotfiles#Tracking_dotfiles_...
Benefits:
1. no extra tools.
2. one off task for setting up the git repo and alias `dotfiles='/usr/bin/git --git-dir=${HOME}/.config/dotfiles --work-tree=${HOME}'`
3. all files are where they are, no symlinks, copies, etc.
Caveats:
1. $HOME/.gitignore just ignores everything because it contains a single "*" char[1]. So adding new files must be done with dotfiles add -f ~/.newfile to track.
Refs:
[0] - https://www.atlassian.com/git/tutorials/dotfiles [1] - https://github.com/nrvnrvn/dotfiles/blob/main/.gitignore
I believe one could even add stuff like `!.bashrc` to the gitignore so it can keep track of these files automatically. Hence we could have template .gitignore for most common use cases.
I love the bare repo method though. I’ve been using it for several years and haven’t had a need for another
Clone to a bare repo and make your home directory the git home. Then I can easily edit the files and push changes.
https://www.atlassian.com/git/tutorials/dotfiles
The whole symlink thing seems like a kludgey mess and pain in the ass to manage
Even GNU Stow seems like a pain
- add Rust things to the list of packages to install - add any Rust-specific configurations for Neovim and `zsh` - bring in any Rust-oriented Neovim plugins
These files all then live next to each other rather than being scatter-shot between Neovim, zsh, and some giant list of packages. Additionally, if I later decide to disable "Rust support" on a machine, the broken symlinks in `$HOME` let me clean up easily without having to actually excise things from the repository.
That said, I have my own system that I built up years ago and it's never been abstracted out for anyone else to use so of course it's going to fit my needs better than anything else.
An advantage of the git method is it doesn’t touch $HOME, and so if the git repo gets wiped out there’s no harm. Am I missing anything?
I organize dotfiles in a few modules, and then I stand in the top of the git checkout and do: "stow modulename", and it will symlink everything.
If you don't like separate dotfiles in modules/packages, you can just have one (e.g. "main").
Stow has been around since 1993 or something, so I expect to be around for a while in my distro.
I don’t remember a problem with dotfiles. I’m sure there were ones that maybe I got used to.
I also use it for ~/bin scripts. There the limitations are more noticable.
Stow plus Git is a setup that already “doesn't suck.” Whatever that means here.
If a dotfile differs by computer, differences live in their own branches and are regulary rebased on the common branch.
No comments yet
[0]: https://crespo.business/posts/version-your-dotfiles/
No comments yet
It offers a more involved approach to managing the dotfiles, but (imo) addresses the need to have differences between dotfiles on different machines.
[1]: https://github.com/SuperCuber/dotter
No comments yet
No comments yet