-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
nixos-rebuild
ready image
#86
Comments
I would assume that the generated image contains what's needed at runtime, but |
@tv42 I've came to the same conclusion and will investigate it further but I think I can close this issue now. Thanks. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
Btw. I figured it out long time ago and created this module: ({ config, ... }: { sdImage.storePaths = [ nixpkgs config.system.build.toplevel.drvPath ]; }) Simple, isn't it? :D |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
@WizardUli can you explain where you put that module? EDIT: My problem right now is that ANY
After a reboot, the configuration works fine. I'm assuming that something that it's pulling in is breaking the system. When I try to pass it in with
I'm lacking the understanding of nix to know where it's supposed to go :( |
I had not been using nixos-generators anymore (confusing wrapper for an already needlesly complicated image builders from nixpkgs) when I wrote that but I used that as a standard module for nixpkgs. I understand that it may be confusing for a newcomer. E.g. it took me some weeks to understand that those modules everybody was talking about are a concept from nixpkgs framework and are processed by nixpkgs and are are not defined by Nix or Nix-language in any way and can be functions as well as sets...etc.. I'll refresh my code, get it more presentable and link it here sometime next week. |
Sorry for very late answer. You should rather use an already made option for this: https://search.nixos.org/options?channel=23.11&show=system.includeBuildDependencies&from=0&size=50&sort=relevance&type=packages&query=includeBuildDependencies |
Hello. I'm trying to create an image (currently for Raspberry Pi 3) where its configuration is copied to it and one can use
nixos-rebuild
out of the box.Here is my setup https://gitlab.com/grawp/nixos-raspberry-experiment
Image-building-only related configuration should be inside
sd-aarch64-custom.nix
while general configuration (which may also be used during image building) should be innixos/configuration.nix
. But I failed somewhere because when I boot a freshly built image on a Raspberry and then runnixos-rebuild switch
without any configuration changes, it still tries to download and rebuild derivations galore (and it works OK but that's not the point).Here I explicitly disconnected internet from the raspberry before executing the
nixos-rebuild switch
to better visualize what it tried downloading: https://gist.github.com/Grawp/daeb4106a3d9086a70e3c5608c83c782I want to get to a state where a nixos-generators built system is the same system as the one after running
nixos-rebuild switch
. In other word I want a system where running firstnixos-rebuild switch
without changing configuration produce 0 changes.Any ideas what can be the problem in my setup?
The text was updated successfully, but these errors were encountered: