Nix Flake for TabFS Browser Extension
Original source code at https://github.com/osnr/TabFS. This flake makes no modification or copy of @osnr's code.
git clone https://github.com/chasevasic/tabfs-nix
cd tabfs-nix
nix build .
nix build github:chasevasic/tabfs-nix
result/bin/tabfs-install-native-messaging-host firefox
See: https://omar.website/tabfs/#1-install-the-browser-extension
Note: without signing the addon it can only be installed temporarily. These instructions are for a temporary installation that lasts only one session.
Open your file browser and navigate to /run/user/1000/tabfs (replace 1000 with your uid)
Read official instructions at: https://omar.website/tabfs/
- Due to limitations involving extension signing and installation on Nix, it is not recommended that this is included in a NixOS system flake (or configuration.nix). There is nothing stopping you from doing so, but the point is somewhat defeated by the necessary manual steps of installing the extension and native messaging host. Theoretically, home-manager can probably overcome the issues, but I do not and will not use home-manager. This flake is, however, a starting point for a completely declarative flake or derivation
- The mount path can only be changed by editing
flake.nix
. This is a limitation in the original tabfs browser extension code. Technicallytabfs.c
reads the mount path from$TABFS_MOUNT_DIR
but this is not passed from the native messaging host plugin, meaning it is not configurable. Without the environment variable, it defaults tomnt
in the working directory of the launching application. On Nix, this is most likely a read-only directory. My solution was to wraptabfs
withTABFS_MOUNT_DIR
set to/run/user/$(id -u)/tabfs
in the Nix derivation.