Skip to content

Conversation

@mightyiam
Copy link
Contributor

No description provided.

@mightyiam mightyiam marked this pull request as ready for review June 29, 2025 10:02
@roberth
Copy link
Member

roberth commented Jun 29, 2025

baseUrl isn't quite right. It ends in /blob or something. That's ok for generating URLs for the_declarations_ files and such, but not much else.

We're running into some tech debt that I haven't got around to.
The per part options should be refactored into

  • low level options that get rendered (these already exist)
    • attributePaths etc
    • repositoryURL
  • github module that declares github-specific options and sets the low level options. Most parts will imports this. Options:
    • owner
    • repo
  • no parsing of baseUrl. That was tech debt.

@mightyiam
Copy link
Contributor Author

Ah, I see. Thank you for explaining. Well, I think I can do that. But would you mind making it a bit nicer for my by merging #1486 prior please?

@mightyiam
Copy link
Contributor Author

Hrm... to make sure we're on the same page, here's a concrete request of you. Could you provide a usage example? For example, here's an existing value for perSystem.render.inputs.<name>. What should it be edited into?

          {
            attributePath = [
              "flakeModules"
              "default"
            ];
            baseUrl = "https://github.com/mightyiam/files/blob/main";
            intro = lib.readFile "${inputs.files}/README.md";
          }

@roberth
Copy link
Member

roberth commented Jul 1, 2025

          {
            imports = [ github ];
            attributePath = [
              "flakeModules"
              "default"
            ];
            owner = "mightyiam";
            repo = "files";
            branch = "main";
            intro = lib.readFile "${inputs.files}/README.md";
          }

And then the module github can construct the URL for baseUrl and a new option repositoryUrl.

@mightyiam
Copy link
Contributor Author

Ahuh. And where would this github module be obtained from? perSystemArgs.config.render.modules.github or topArgs.config.flake.modules.something.github or somewhere else?

@roberth
Copy link
Member

roberth commented Jul 2, 2025

A let binding would've been ok, but the flake seems to have users, so it should probably be a public module.
self.modules.flakePartsRenderInput.github?

@mightyiam
Copy link
Contributor Author

Here #1581

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