NixOS / nixos-search

Search NixOS packages and options
https://search.nixos.org
MIT License
384 stars 98 forks source link

flakes: drop problematic sources #785

Closed wegank closed 1 month ago

wegank commented 1 month ago

These public flakes are not indexed on https://search.nixos.org/flakes due to various errors, and can therefore be safely dropped.

astro commented 1 month ago

Where can I learn more about the errors so that they can be fixed?

wegank commented 1 month ago

I suppose you could create a flakes/manual.toml with a single source, and run

nix run --accept-flake-config .#flake-info -- --json group flakes/manual.toml manual --report
astro commented 1 month ago

My modules access config.networking.hostName which is missing. Are the Flakes' nixosModules no longer evaluated together with the NixOS modules? Advice appreciated.

wegank commented 1 month ago

I have no doubt that the module will work with a normal NixOS configuration, but I'm not sure if config.networking.hostName has something defined by looking at flake-info/assets/commands/flake_info.nix.

I guess the simplest option is to replace inherit (config.networking) hostName; by hostName = config.networking.hostName or "$HOSTNAME";, as was done once in the repo, and try to make the descriptions independent of config or pkgs if there are other similar errors.