Skip to content

add flake github:Zocker1999NET/disko-install-menu #910

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Zocker1999NET
Copy link

Contributing my own flake to the manual search index.
Also see https://github.com/Zocker1999NET/disko-install-menu.

@Zocker1999NET
Copy link
Author

oh, after submitting this PR, I discovered that the flake-info test command actually failed, I executed nix run github:nixos/nixos-search#flake-info -- --json flake github:Zocker1999NET/disko-install-menu and got:

[2025-04-12T23:31:40Z ERROR command_run] command 'nix eval --json --no-allow-import-from-derivation --no-write-lock-file -f '/nix/store/hgnynw681w1lqsmnybhq8zygzbzwnjl1-flake-info/assets/commands/flake_info.nix' -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz --override-flake input-flake github:Zocker1999NET/disko-install-menu --argstr flake github:Zocker1999NET/disko-install-menu all' failed: exit status: 1
    stdout:
    
    stderr:
    unpacking 'https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz' into the Git cache...
    error:
           … while evaluating a branch condition
             at /nix/store/hgnynw681w1lqsmnybhq8zygzbzwnjl1-flake-info/assets/commands/flake_info.nix:124:5:
              123|     # are multiple modules
              124|     if nixosModulesOpts != [] then nixosModulesOpts else nixosModuleOpts;
                 |     ^
              125|
    
           … while calling the 'concatLists' builtin
             at /nix/store/hgnynw681w1lqsmnybhq8zygzbzwnjl1-flake-info/assets/commands/flake_info.nix:108:24:
              107|   readFlakeOptions = let
              108|     nixosModulesOpts = builtins.concatLists (lib.mapAttrsToList (moduleName: module:
                 |                        ^
              109|       readNixOSOptions {
    
           … while evaluating the option `programs.disko-install-menu.options._module.freeformType':
    
           … while evaluating definitions from `<unknown-file>':
    
           … while evaluating the module argument `pkgs' in ":anon-1:anon-1":
    
           (stack trace truncated; use '--show-trace' to show the full, detailed trace)
    
           error: attribute 'pkgs' missing
           at /nix/store/p0clwyc7lhl1xrrxx4lfywsygz4xprzb-source/lib/modules.nix:652:66:
              651|       extraArgs = mapAttrs (
              652|         name: _: addErrorContext (context name) (args.${name} or config._module.args.${name})
                 |                                                                  ^
              653|       ) (functionArgs f);
    
Error: Getting flake info caused an error: Failed to gather information about github:Zocker1999NET/disko-install-menu

Caused by:
    command 'nix eval --json --no-allow-import-from-derivation --no-write-lock-file -f '/nix/store/hgnynw681w1lqsmnybhq8zygzbzwnjl1-flake-info/assets/commands/flake_info.nix' -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz --override-flake input-flake github:Zocker1999NET/disko-install-menu --argstr flake github:Zocker1999NET/disko-install-menu all' failed: exit status: 1

I think this errors because the option programs.disko-install-menu.options uses a freeform type based on pkgs.format.json: https://github.com/Zocker1999NET/disko-install-menu/blob/d999d6a5c3bcd1a36f7e169d297f267d4ac708bf/module.nix#L16C1-L20C35

But the actual code is working, could it be that this is a bug in flake-info or does someone find something I can fix (without changing the functional behavior of having a freeform type for a JSON config file)?

@raboof
Copy link
Member

raboof commented Apr 14, 2025

This sounds like another instance of #902? Would you like to have a go at that issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants