like make, but for symlinks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Hazel Levine 7f66b0ff11 rm nix store symlink 11 months ago
nix nix build 11 months ago
src add delink functionality 11 months ago
.envrc nix build 11 months ago
.gitignore rm nix store symlink 11 months ago
Cargo.toml add delink functionality 11 months ago
LICENSE init linkfile parser w/ glob 1 year ago add delink functionality 11 months ago
default.nix nix build 11 months ago
shell.nix nix build 11 months ago



Like GNU stow, and also like make for dotfiles. In short, another symlink manager, because I'm not satisfied with any of the other ones.


In your main folder, have subdirectories:

 λ ~ ls etc
bin  bspwm  doom  Linkfile  zsh

Under each subdirectory:

 λ ~ ls etc/doom/  init.el  nice.png

The Linkfile (or Lakefile) defines where you put your stuff. It follows the following (tentative) syntax, with the file on the left and the target directory on the right, and defaults to $HOME:

doom/ => .config/doom/

You can specify what filename you'd like to use, if they aren't the same:

zsh/zshrc => .zshrc

If you aren't using $HOME, you can specify a path:

udev/95-monitor-hotplug.rules => /etc/udev/rules.d/

You can also use glob syntax to grab all files:

bin/* => bin/

You can add empty lines anywhere, and comments with #.

To run the program, you can just run lake. To remove the links, you can run lake -r. Furthermore, the location of the Linkfile can depend on how you want to structure your dots. Just want to run lake? Put it in the root. Want to keep stuff program-specific? Put a Linkfile in each directory.


If you're using the Nix package manager, just nix-build. Otherwise, cargo build --release.

Fair note that issues may arise when building with Nix, because the Nix build uses nightly rust due to a limitation in Naersk, a Rust build system for Nix. This'll be fixed soon enough.


Again, with Nix:

nix-env -i -f

You can also use to get prebuilt binaries for Linux.

Otherwise, just put the binary generated by cargo somewhere.


TODO Support alternative stow locations via CLI

TODO More verbose parse errors

This one's hard on the merit that anyhow::Error ensures that the resultant error has static lifetime, but due to the nature of nom::IResult, this would make the input static, which is decidedly undesired behavior.