hover-rs uses Linux's user namespaces to mount a volatile overlayfs over your $HOME. Any write or delete operation is redirected to the upper layer, while your $HOME is left intact. Read more in my blogpost: https://ayats.org/blog/hover.
$ hover # Enter hover by just running the command
You are now hovering~
A layer is covering your /home/ayats
You can find your top layer in: /home/ayats/.cache/hover-rs/layer-2024-06-11-0635-evCxznv
$ touch foo # File "foo" is created under the hover
$ exit # Hover is just a subprocess
Leaving hover
You can find your top layer in: /home/ayats/.cache/hover-rs/layer-2024-06-11-0635-evCxznv
$ file foo # File "foo" is gone
foo: cannot open `foo' (No such file or directory)
Your kernel must have user namespaces and overlayfs enabled:
$ zcat /proc/config.gz | grep -e NAMESPACES= -e USER_NS= -e OVERLAY_FS=
CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
CONFIG_OVERLAY_FS=m
CI builds statically-linked binaries (with musl). You can use download and use them directly:
$ curl -OL https://github.com/viperML/hover-rs/releases/download/latest/hover-static-x86_64-linux
$ chmod +x hover-static-x86_64-linux
$ ./hover-static-x86_64-linux
With nix:
nix build github:viperML/hover-rs
With guix:
guix build -L .
If you bring your own cargo+rustc, just cargo build
.
Inspired by https://github.com/max-privatevoid/hover, which uses fuse-overlayfs.