-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
home-manager #66
Comments
This worked for me. |
Nix newbie here too. @AmeerTaweel would you mind expanding on your answer? I have managed to install home-manager inside the nix-portable activated environment, however it won't allow me to do stuff like Supposing there is 0 prior knowledge and that a new non-root user has been given to you in a new machine where you don't have anything but your home.nix file, how would you end up with a home.nix that you switch to? Thanks a lot for your pointers! |
I had a similar situation to @zngguvnf where I use a machine and I don't have root access. I tried to get Nix working there for a while. But I gave up eventually but I don't remember exactly what was wrong. This repo received a bunch of updates since then, maybe it will work if I try it now, but I don't use that machine anymore. However, I can try to help you with your issue. Do you mind sharing |
Hm, guess once I find some time I should do a home-manager nix-portable guide |
I'd appreciate that for sure |
I managed to activate my Home Manager config and create a working environment on Debian 12 as described below. I downloaded NP_RUNTIME=bwrap ~/local/.bin/nix-portable nix shell nixpkgs#{bashInteractive,nix}
nix run github:nix-community/home-manager -- switch -b old --flake <my-hm-flake-uri> To easily enter the new HM environment, I created a script #!/usr/bin/env bash
NP_RUNTIME=bwrap $HOME/.local/bin/nix-portable nix run nixpkgs#bashInteractive --offline This way, I can SSH directly into the HM env as ssh -t <address> .local/bin/hm-env Further remarks:
home.sessionVariables.PATH = "$HOME/.nix-profile/bin:$PATH"; to access all the commands from HM-installed packages. Note that
I assume |
Thank you so much @ccornix So if I understand the solution, it relies on a double user-namespace. First we use nix-portable with bwrap to atain the mapping from I might be a purist here, but I was expecting to take advantage of nix's Given that we are speaking about nix here and this should be easily reproducible, I will start working with @ccornix 's solution, and hope for whenever @DavHau has time to make the command that avoid the double wrap (if possible). |
You might want to subscribe to #98 then ^^ |
Just in case, if anyone comes and tries to have a starter pack, with all the things we discussed in a single script that I found works pretty good, find it below. There are a few things to take into account:
|
Hi,
nix newbie here!
I often work on a centOS7 system on which I am not root. A few days ago I came across nix-portable and since then I can finally use modern software on the system. Thank you very much for this!
Currently I'm using a
shell.nix
file where I specify all my programms to install and use seperate dotfiles for configuration.However the this really got me started, and I've now started setting up nixos in a VM with home-manager based on this minimal example config.
I wonder if there is any way to use the home-manager config also with nix-protable?
The text was updated successfully, but these errors were encountered: