-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
rebuilding while offline #430
Comments
Thanks for the report. Yeah, for this case I would suggest cloning the Home Manager repository and changing programs.home-manager.path = "$HOME/devel/home-manager"; Then update Home Manager using The lack of control over remote imports is up to the Nix tools and cannot be controlled by Home Manager. |
As a compromise it'd be nice to manage the home-manager sources via nix-channels as well. Updating the local git repo is an additional effort, but I update the nix-channels anyways. |
In principle it should straight forward to distribute Home Manager through a channel. But it would require setting up build infrastructure and hosting for the channel directory. Perhaps nixos.org would be willing to lend their hydra and CDN for the purpose? In any case, I'm unlikely to start looking into this anytime soon due to work and other priorities but would be willing to assist anybody wanting to look into it. |
On Tue, 23 Oct 2018 13:40:52 -0700, Robert Helgesson ***@***.***> wrote:
In principle it should straight forward to distribute Home Manager through a channel. But it would require setting up build infrastructure and hosting for the channel directory. Perhaps nixos.org would be willing to lend their hydra and CDN for the purpose?
In any case, I'm unlikely to start looking into this anytime soon due to work and other priorities but would be willing to assist anybody wanting to look into it.
I think one of us needs to teach 'nix-channel' how to use a git repo
directly, it's a very common use case and AFAIK is the form in which
virtually all channels are created from anyway.
Or maybe just a bit of tooling to bridge the gap, dunno.
I know you can point it at the tarballs but that's a smidge inefficient
(full dl for every commit, also gz vs xz, etc.) but I want to say that it
also breaks something but I don't remember what-- only that I thought
it was great until I ran into this problem and now just have a bunch
of local git clones instead since apparently that's "better" :(.
Oh-- I'm not sure this is the only limitation, but one problem
is that nixpkgs acquired this way won't know what revision it is
which is annoying if not problematic.
…
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#430 (comment) part: text/html
|
You could do the following to use the nix-channel command: $ nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager
$ nix-channel --update
$ ls -la .nix-defexpr/channels/home-manager
At the moment home-manager is only @rycee do you think this should go to the documentation? |
@Mic92 That's nice! My understanding of the channel format was that it needed some special setup with a |
No the binary cache is orthogonal to the channel, which is literally just a tarball with a default.nix. |
@Mic92 Created #475 to switch the installation instructions to recommend nix-channel instead. No need to set I've actually intended to support nix-channel for a long time but never got around to it because I assumed it would need some work on the CI side to create a correctly formatted directory: https://nixos.org/nix/manual/#channel-format |
I merged #475 so I'll close this ticket. From now on the recommended way to set up Home Manager is using nix-channel and this will allow the Home Manager expression to be reliably available even while offline. |
When using the default configuration where
programs.home-manager.path
points to a remote URL it is not possible to rebuild one's home configuration withhome-manager switch
when not connected to the internet.I deliberately configured my system config to be rebuildable even when offline, so I ask for either an option to disable updating remote paths or for an autodetection of being offline/ unable to pull in the paths. (GitHub could be down, too)
This is especially important because even adding a line to one's vimrc using home-manager requires a rebuild and should not depend on internet connectivity.
The text was updated successfully, but these errors were encountered: