-
Notifications
You must be signed in to change notification settings - Fork 107
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
iso: avoid systemd service startup #202
Changes from all commits
db716d1
15cf15b
4358478
0074476
49b1ad8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ let mkProfileAttrs = | |
f = n: _: | ||
lib.optionalAttrs | ||
(lib.pathExists "${dir}/${n}/default.nix") | ||
{ default = "${dir}/${n}"; } | ||
{ default = /. + "${dir}/${n}"; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the motivation here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for the expression in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But also.most importantly for |
||
// mkProfileAttrs "${dir}/${n}"; | ||
in | ||
lib.mapAttrs f imports; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would really love to see the bonus goal of your PR implemented. Is it possible that we could create an
isoConfig'
that is everything that the currentisoConfig
defines withstoreContents
abstracted out into a separate variable, while the newisoConfig
would just be something like:I'm trying to think of a way to do this without triggering infinite recursion, although perhaps I haven't thought this through enough and the above does cause and infinite loop. I'll have more time to test tomorrow and see if I can work it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within the
devshell
of a live iso, it is ultimately upstream nixos-install at this line that is hindering us, specifically:nix flake metadata
evaluates very greedily. Couldn't we obtain that.url
— which seemed to be a store path — more cheaply?On the other hand, the build itself is already fully cached (
auto?trusted=1
) courtesy of thefullHostConfig
'stoplevel
. That extends to the system profile, which is loaded locally from the build's outputAfter that there is no potential network call left. So the culprit must be indeed
nix flake metadata
...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is only nixos-install that's blocking us (and it has other problems with flakes), perhaps we could just do what's mentioned in that comment, or something similar to work around it. I personally had to do a legacy
nix-build
via compat dir to install onto my laptop. Something about my configuration triggered the error mentioned in that thread.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just moved to a new appartment and, for a varying operational reasons, I probably will be unavailable to follow trough on this bonus item any time soon. (No inet, no setup, obly cell-phone, life getting in the way, ...)
Can we carve this out into an issue while moving on with this PR in its current state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I'd like to have a crack at it first though, if you don't mind, as I think it would be pretty straight-forward. If I get it working, I'll pushing a PR to your branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect the
--offline
option would get us quite some mileage (combined with a small patch tonixos-install
/ flakes-first reconception of it), unfortunately I havn't been able to test this in time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems I don't have as much time as I'd hoped. I'll go ahead and merge this and we will try to work it out later.
bors r+