7
3
Fork
You've already forked workflows
1

feat: The Great Ennixification #2

Merged
ava merged 48 commits from nix into main 2025年09月02日 14:42:11 +02:00
Member
Copy link

Whew, this is a big one. But, in line with #1, this PR makes the first steps to transition (🏳️‍⚧️) this repo to something that can be consumed through Nix. There's a few things happening in here, so hopefully I've done a good enough job describing it all in the README, and giving an example of it's usage in template.

If you want to test any of this locally, replace the URL for this repo in the setup command and the generated flake's inputs with git+https://codeberg.org/polyphony/workflows?ref=nix. Should work, it's what I've been doing to test anyway.

There's still a few things that need to be tackled:

  • Actually convert the workflows over. I'm going to hold off on that until polyphony/chorus#631 is good to go, so we can take it's common bits and bring them in here.
  • Automatic docs.md generation somehow, so we don't need to manually keep it in sync with the modules themselves.

This should be a good start, though. Feel free to hit me with any questions about this one.

Whew, this is a big one. But, in line with #1, this PR makes the first steps to transition (🏳️‍⚧️) this repo to something that can be consumed through Nix. There's a few things happening in here, so hopefully I've done a good enough job describing it all in the README, and giving an example of it's usage in `template`. If you want to test any of this locally, replace the URL for this repo in the setup command and the generated flake's inputs with `git+https://codeberg.org/polyphony/workflows?ref=nix`. Should work, it's what I've been doing to test anyway. There's still a few things that need to be tackled: - Actually convert the workflows over. I'm going to hold off on that until polyphony/chorus#631 is good to go, so we can take it's common bits and bring them in here. - Automatic `docs.md` generation somehow, so we don't need to manually keep it in sync with the modules themselves. This should be a good start, though. Feel free to hit me with any questions about this one.
Owner
Copy link

I think @alinarielle wanted to review this; I'll leave this open for ~24h (if there is no further response /nm) before I'd review it myself

I think @alinarielle wanted to review this; I'll leave this open for ~24h (if there is no further response /nm) before I'd review it myself
docs.md Outdated
@ -0,0 +1,262 @@
## perSystem\.polyphony\.rust\.package
Owner
Copy link

This file is super, super nice and helpful! I am wondering though: Couldn't this documentation also be inline with the .nix files?

This file is super, super nice and helpful! I am wondering though: Couldn't this documentation also be inline with the `.nix` files?
Author
Member
Copy link

It actually already is! That docs file is generated from the option definitions in the Nix modules - see this one for an example. The actual bit that generates the docs is here, and you can generate them by running nix build .#docs in the repo. I do need to figure out a good way to automatically do that like I mentioned in the PR message, though.

It actually already is! That docs file is generated from the option definitions in the Nix modules - see [this one](https://codeberg.org/polyphony/workflows/src/branch/nix/modules/rust.nix#L65-L80) for an example. The actual bit that generates the docs is [here](https://codeberg.org/polyphony/workflows/src/branch/nix/packages/docs.nix), and you can generate them by running `nix build .#docs` in the repo. I do need to figure out a good way to automatically do that like I mentioned in the PR message, though.
Owner
Copy link

That's so cool! Thanks!

That's so cool! Thanks!
ava marked this conversation as resolved
ava approved these changes 2025年09月01日 22:15:59 +02:00
Dismissed
ava left a comment
Owner
Copy link

I really like this PR a lot! To be fair, I do not understand the nix parts, but it is beautifully built and documented, and that's pretty amazing! Thank you so much for the effort you have put into this! 💜

I really like this PR a lot! To be fair, I do not understand the nix parts, but it is beautifully built and documented, and that's pretty amazing! Thank you so much for the effort you have put into this! 💜
Author
Member
Copy link

Snuck in one last change, and moved devshell options under perSystem, which makes a bit more sense. That way, extraPackages doesn't need to be a function and can just be a plain list, since you have a pkgs set available to you already in perSystem.

Snuck in one last change, and moved devshell options under `perSystem`, which makes a bit more sense. That way, `extraPackages` doesn't need to be a function and can just be a plain list, since you have a `pkgs` set available to you already in `perSystem`.
ava approved these changes 2025年09月02日 14:41:15 +02:00

Wow, absolutely insane job on this, looks great!

Wow, absolutely insane job on this, looks great!
Sign in to join this conversation.
No reviewers
ava
Labels
Clear labels
Compat/Breaking

Breaking change that won't be backward compatible
Difficulty
Easy

Measure of time-to-implement and cognitive complexity of the task. "Easy" tasks usually take 15-30min to complete. Likely suitable for first-time-contributors.
Difficulty
Hard

Measure of time-to-implement and cognitive complexity of the task. "Hard" tasks usually take 3h-15h to complete. Very likely not suitable for first-time-contributors.
Difficulty
Medium

Measure of time-to-implement and cognitive complexity of the task. "Medium" tasks usually take 30min-3h to complete. Likely not suitable for first-time-contributors.
Difficulty
Trivial

Measure of time-to-implement and cognitive complexity of the task. "Trivial" tasks usually take 1-15min to complete. Very likely suitable for first-time-contributors.
Difficulty
Very hard

Measure of time-to-implement and cognitive complexity of the task. "Hard" tasks usually take >15h to complete. Extremely unlikely to be suitable for first-time-contributors.
Good First Issue

This issue is a good task to take on if you are new to the project or the repository and looking to contribute.
Kind/Bug

Something is not working
Kind/Chore

Regular maintainance tasks, version bumps... things like that.
Kind/Documentation

Documentation changes
Kind/Enhancement

Improve existing functionality
Kind/Feature

New functionality
Kind
Meta

This issue is a collection of other, related issues.
Kind/Security

This is security issue
Kind/Testing

Issue or pull request related to testing
Priority
Critical

The priority is critical
Priority
High

The priority is high
Priority
Low

The priority is low
Priority
Medium

The priority is medium
Reviewed
Confirmed

Issue has been confirmed
Reviewed
Duplicate

This issue or pull request already exists
Reviewed
Invalid

Invalid issue
Reviewed
Won't Fix

This issue won't be fixed
Status
Abandoned

Somebody has started to work on this but abandoned work
Status
Blocked

Something is blocking this issue or pull request
Status
In Progress

This label is intended to be used when an outside collaborator is pursuing the completion of this issue, since they cannot be directly assigned to the task.
Status
Need More Info

Feedback is required to reproduce issue or to continue work
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
polyphony/workflows!2
Reference in a new issue
polyphony/workflows
No description provided.
Delete branch "nix"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?