I’ve tried a lot of solutions. The best ones I could find were:
-
GitHub - DavHau/nix-portable: Nix - Static, Permissionless, Installation-free, Pre-configured, which uses our beloved bubblewrap to bind-mount
~/.nix-portableon/nixinto a userspace container when executing nix binaries. - https://containertoolbx.org/, which lets you work like in a normal Fedora whithin a container.
The worst part is https://direnv.net/ and IDE integration because none of both solutions will make binaries available in the same paths as within the containers.
To solve that, using option 2 (toolbx):
-
toolbox run sudo dnf install -y codium(after following instructions from VSCodium - Open Source Binaries of VSCode within the toolbx) - Install Flathub—An app store and build service for Linux
- Use AppEditor to create a system app that executes
toolbox run codium
There you have an IDE running inside a normal Fedora distro, where you can install nix and other packages as usual. The terminal is also within that environment, so all just works.
If you need to run podman containers but you are within the toolbx, the easiest way is:
- Outside the toolbx:
systemctl enable --user --now podman.socket - Inside the toolbx:
sudo dnf install -y podman-remote
Now you can use it inside toolbx: toolbox run podman-remote run --rm docker.io/hello-world