digga icon indicating copy to clipboard operation
digga copied to clipboard

nixosModules.bootstrapIso no longer usable

Open tomeon opened this issue 2 years ago • 2 comments

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

tomeon avatar Apr 09 '22 19:04 tomeon

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.

Pacman99 avatar Apr 09 '22 20:04 Pacman99

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'

tomeon avatar Apr 15 '22 14:04 tomeon