digga
digga copied to clipboard
nixosModules.bootstrapIso no longer usable
Expected Behavior
$ nix build '.#nixosConfigurations.myhost.config.system.build.bootstrapIso'
# Shiny new ISO!
Current Behavior
$ nix build '.#nixosConfigurations.myhost.config.system.build.bootstrapIso'
error: attribute 'mkBuild' missing
at /nix/store/1p8669f9n8rld1ymy885s2vyfaqpdafw-source/modules/bootstrap-iso.nix:69:21:
68| system.build = {
69| bootstrapIso = (config.lib.digga.mkBuild
| ^
70| (protoModule config)
Appears to be from #436.
Possible Solution
Deprecate or remove ./modules/bootstrap-iso.nix
? Or maybe convert it to a custom format for nixos-generate
? Happy to submit a PR for that if it is a good direction.
Steps to Reproduce
See "Current Behavior".
Your Environment
$ nix flake info --json | jq --raw-output '.locks.nodes | [.nixos, .digga] | .[].locked.rev'
5c9771cd1b7e320e47e6575803d4959d171fc413 # <= nixpkgs/release-21.11
e2bb8ea28c5bbc7bb46ac91df3ac846ce9a3964c
Deprecate or remove ./modules/bootstrap-iso.nix? Or maybe convert it to a custom format for nixos-generate? Happy to submit a PR for that if it is a good direction.
This was what I was thinking. I meant to remove bootstrapIso in #436 but I forgot.
I've submitted a PR to nixos-generators
that introduces a mechanism for extending the nixos-generate
format search path. Could be a handy way to expose the bootstrap-iso.nix
configuration to end users: inject the directory containing boostrap-iso.nix
into the NIXOS_GENERATORS_FORMAT_SEARCH_PATH
environment variable -- maybe as part of a devshell
configuration -- thus enabling:
nixos-generate -f bootstrap-iso --flake '.#my-host'