Skip to content

Add nix-auto-follow as an allfollow alternative - #24

Merged
vic merged 2 commits into
denful:mainfrom
ginkogruen:allfollow-alternative
Jul 21, 2025
Merged

vic merged 2 commits into
denful:mainfrom
ginkogruen:allfollow-alternative

Conversation

@ginkogruen

Copy link
Copy Markdown
Contributor

This adds a module which enables nix-auto-follow to be used as an alternative to allfollow.

It is currently working but for now it's just a straight copy of the allfollow module with minimum needed adjustments to make it work.

I do get an error if I try to run write-flake a second time which I don't understand:

❯ nix run .#write-flake
warning: Git tree '/home/ginkogruen/.nixfiles' is dirty
error:
       … while evaluating an expression to select 'drvPath' on it
         at «internal»:1:552:
       … while evaluating strict
         at «internal»:1:552:
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: python3.13-types-Pygments-2.17.0.20240310 does not configure a `format`. To build with setuptools as before, set `pyproject = true` and `build-system = [ setuptools ]`.`

I also still need to update the documentation to reflect this change.

Also I'm unsure if there needs to be some kind of mechanism that prevents someone from importing multiple flake formatting modules.

Let me know if there are any other things that need to be considered before the PR can be merged.

@vic

vic commented Jul 21, 2025

Copy link
Copy Markdown
Member

Looks good, could you rebase and fix conflicts ?

Looks like it works the first time because it uses nixpkgs stable, but after it changes its own nixpkgs follow to the root nixpkgs (unstabe) it no longer works.

Can you add the error you get to this issue?
fzakaria/nix-auto-follow#29

@ginkogruen
ginkogruen force-pushed the allfollow-alternative branch from b6f1463 to 70cb11b Compare July 21, 2025 11:50
This adds nix-auto-follow as a flattening mechanism which can be
activated with a provided module.

Closes denful#19.
@ginkogruen
ginkogruen force-pushed the allfollow-alternative branch 2 times, most recently from 1d67626 to f48e5e3 Compare July 21, 2025 12:29
@ginkogruen
ginkogruen marked this pull request as ready for review July 21, 2025 12:38
Copilot AI review requested due to automatic review settings July 21, 2025 12:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for nix-auto-follow as an alternative flake lock flattening mechanism alongside the existing allfollow option. The implementation follows a similar pattern to the existing allfollow module.

Key changes:

  • Added a new nix-auto-follow module that integrates the nix-auto-follow tool
  • Exported the new module in the default module exports
  • Updated documentation to reflect both flattening options

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
modules/prune-lock/nix-auto-follow.nix New module implementing nix-auto-follow integration with flake-file's prune-lock system
modules/default.nix Exports the new nix-auto-follow module alongside existing modules
README.md Documents the new nix-auto-follow option and restructures flattening mechanism documentation

Comment thread modules/prune-lock/nix-auto-follow.nix Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
@ginkogruen

Copy link
Copy Markdown
Contributor Author

So I've rebased onto main, reworded my initial commit (which now closes the issue) and changed the relevant parts of the documentation (Where I hope I didn't miss anything).

Is there anything else which needs to be done?

@ginkogruen

Copy link
Copy Markdown
Contributor Author

Oh I just saw the copilot review errors will fix that when I'm back from work.

This also fixes broken link to the allfollow module.
@ginkogruen
ginkogruen force-pushed the allfollow-alternative branch from f48e5e3 to 763aa55 Compare July 21, 2025 16:47
@ginkogruen

Copy link
Copy Markdown
Contributor Author

Ok, I fixed the broken path issue.

@vic

vic commented Jul 21, 2025

Copy link
Copy Markdown
Member

Looks awesome! Thank you very much! I will merge it now.

@vic
vic merged commit 3f1765a into denful:main Jul 21, 2025
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.

3 participants