Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

nixosModules.bootstrapIso no longer usable #450

Closed
tomeon opened this issue Apr 9, 2022 · 2 comments · May be fixed by #455
Closed

nixosModules.bootstrapIso no longer usable #450

tomeon opened this issue Apr 9, 2022 · 2 comments · May be fixed by #455
Labels
bug Something isn't working

Comments

@tomeon
Copy link
Contributor

tomeon commented Apr 9, 2022

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 tomeon added the bug Something isn't working label Apr 9, 2022
@Pacman99
Copy link
Member

Pacman99 commented Apr 9, 2022

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.

@tomeon
Copy link
Contributor Author

tomeon commented Apr 15, 2022

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 added a commit to tomeon/digga that referenced this issue Apr 15, 2022
that injects our custom formats (at present, limited to `bootstrap-iso`)
into the nixos-generators format search path.

Additionally, introduce the `bootstrap-iso` command that wraps
`nixos-generate --format bootstrap-iso`.

fix: divnix#450
hurricanehrndz added a commit to hurricanehrndz/nixos-config that referenced this issue Jun 4, 2022
divnix/digga has deprecated the bud command and the bootstrapIso module.
This patch should implements workarounds for both issues.

see:
divnix/digga#450
https://github.com/divnix/digga/pull/455/files
@montchr montchr added this to the Release v0.12.0 milestone Jul 9, 2022
@tomeon tomeon closed this as completed Dec 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants