Can't incorporate "aarch64-sd-aarch64" image for existing system
Nobody has claimed this yet.
- Dominant language
- Nix
- Stars
- 628
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
Hey, today I tried to add a SD card image (nixos-generators) for an existing system (Raspberry Pi 3B+) to my snowfall-lib flake.
After creating the subfolders (systems/aarch64-sd-aarch64/system-name) I noticed that the normal nixosConfiguration for this system vanished, somehow, and so I couldn't use nixos-rebuild as usual (to remote x-compiling on x86_46 for aarch64 and deploy). But at the same state I could build the sd-aarch64Configurations (for this system).
FYI: I redacted some parts with […] (and changed the system name to system-name).
Before
[builder@x86_64:~]$ ls --tree -D systems/
systems
├── aarch64-linux
│ └── system-name
└── x86_64-linux
└── […]
[builder@x86_64:~]$ nixos-rebuild build -v --option eval-cache false --use-remote-sudo --flake .#system-name --target-host system-name --use-substitutes
building the system configuration...
Building in flake mode.
$ nix --extra-experimental-features nix-command flakes build .#nixosConfigurations."system-name".config.system.build.toplevel -v --option eval-cache false --out-link /tmp/nixos-rebuild.IZmHN4/result
these 10 derivations will be built:
[…]
[builder@x86_64:~]$ nix flake show --all-systems --impure .
path:[…]
├───darwinModules: unknown
├───homeModules: unknown
├───lib: unknown
├───nixosConfigurations
│ ├───system-name: NixOS configuration
│ └───[…]
├───nixosModules
│ └───[…]
├───overlays
│ └───default: Nixpkgs overlay
├───pkgs: unknown
├───sd-aarch64Configurations: unknown
├───snowfall: unknown
└───templates
[builder@x86_64:~]$ nix -v build .#sd-aarch64Configurations.system-name
error: flake 'path:[…]' does not provide attribute 'packages.x86_64-linux.sd-aarch64Configurations.system-name', 'legacyPackages.x86_64-linux.sd-aarch64Configurations.system-name' or 'sd-aarch64Configurations.system-name'
Here everything is fine (and the last error is okay, because there still is no SD card image, it's just for illustration).
After
[builder@x86_64:~]$ ls --tree -D systems/
systems
├── aarch64-linux
│ └── system-name
├── aarch64-sd-aarch64
│ └── system-name
└── x86_64-linux
└── […]
$ nix -v build .#sd-aarch64Configurations.system-name
these 6 derivations will be built:
[…]
[builder@x86_64:~]$ nix flake show --all-systems --impure .
path:[…]
├───darwinModules: unknown
├───homeModules: unknown
├───lib: unknown
├───nixosConfigurations
│ └───[…]
├───nixosModules
│ └───[…]
├───overlays
│ └───default: Nixpkgs overlay
├───pkgs: unknown
├───sd-aarch64Configurations: unknown
├───snowfall: unknown
└───templates
[builder@x86_64:~]$ nixos-rebuild build -v --option eval-cache false --use-remote-sudo --flake .#system-name --target-host system-name --use-substitutes
building the system configuration...
Building in flake mode.
$ nix --extra-experimental-features nix-command flakes build .#nixosConfigurations."system-name".config.system.build.toplevel -v --option eval-cache false --out-link /tmp/nixos-rebuild.7dFwHL/result
error: flake 'path:[…]' does not provide attribute 'packages.x86_64-linux.nixosConfigurations."system-name".config.system.build.toplevel', 'legacyPackages.x86_64-linux.nixosConfigurations."system-name".config.system.build.toplevel' or 'nixosConfigurations."system-name".config.system.build.toplevel'
As you can see here, the new SD image is building, but at nix flake show the nixosConfigurations > system-name is missing (and I get the error at nixos-rebuild).
May someone have a look? (I don't know if my relative simple flake is the problem, or if it's a problem with snowflake.)
Thanks a lot in advance and KR
BTW/FYI: At the end I currently have the goal to switch my running RPi3 system to disko. ATM it runs fine and I can nixos-rebuild, but I don't know how to deploy. So a SD image seemed a possible step, also if I wanna have this functionality in any case/later on …
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with systems/aarch64-linux/system-name and systems/aarch64-sd-aarch64/system-name, then inspect the generated flake outputs with nix flake show --all-systems --impure. Compare the nixosConfigurations and sd-aarch64Configurations entries and verify both the nixos-rebuild and SD-image build commands work for the same system.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100