Closed kai-tub closed 1 year ago
Nixie wasn't designed with system-wide use in mind. The reason you get the errors in Home Manager is due to a quirk with the way rootless Nix (and by extension Nixie) works, in that the nix
command isn't "installed" in the chroot environment.
You can add a few lines to your .profile
to zip your entire session in bwrap
with the /nix
directory at root, then install Nix the usual way, but then suid binaries won't work.
Nixie being designed to work in a per-project ecosystem, where whole-session or whole-system management isn't required, this issue is currently out of scope.
In the future, I could build upon Nixie to enable session-wide installs (such as hooking into profile generation to provide redirectors in $PATH
), after all most of the required tech is already in Nixie.
In the mean time I'm of the opinion that Nix is best enjoyed when installed across the system. Quite a few features (like multi-machine builds and result
links) don't really work when running sandboxed, not to mention system utilities installed through Nix wouldn't work.
If you are interested in implementing a session manager using Nixie, here's a couple pointers:
ls -l ~/.nix-profile/bin
will show you./nix
directory existing at system root, and therein lies the whole issue with developing Nixie in the first place. Root directories (usually) require root privileges, so the only other way is a container or sandbox. Outside the sandbox though, all profiles, result links and programs will break due to the missing path.fakedir
I'm thinking hooking into profile generation, and rewriting the links to point to the "real" Nix store (for files) or to the wrapper script (for binaries).
Hey.
This project looks quite interesting. Thank you for working on it! I played around with the project to get
nix
on a locked-down server and would like to know if it is possible to installhome-manager
. I am following the official home-manager documentation -- nix flakes withnixos-stable
as the target. When running the rebuild./nix run .#homeConfigurations.<name>.activationPackage
I get the following error message:If I understand the README correctly, the idea is to link all
nix
command calls to~/.cache/nix-static
. So I linkednix-build
tonix-static
and added it to my PATH at the top of mybashrc
. Though, I still get an error.I am not that experienced with the internals of
nix
but if you give me some pointers, I will try my best to help with this issue :)