Skip to content
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

Remove flake-inputs; refactor and split out package #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jurraca
Copy link
Contributor

@jurraca jurraca commented Nov 22, 2024

Besides removing a dependency for the project, this refactors the flake to be a bit cleaner.

Using flake-utils makes expressing "for each system" type expression simple, but it also gets in the way of items that don't need this type of expression, such as the module.nix. Thus we had to define an improper module expression, which makes using the module in another expression more complicated as well.

So instead we create forAllSystems and nixpkgsFor functions explicitly. This means a little more involved package expressions, but that hide less from the user. The module can now be import'ed and it can be used as a module in other machine configurations without extra treatment. I stole this idea from this.

I also took the opportunity to split out the main package expression into its own file, for clarity.

@jurraca
Copy link
Contributor Author

jurraca commented Nov 22, 2024

@virtu would you be willing to take a look? this changes the original module work you did.

@jurraca jurraca force-pushed the remove-flake-utils branch 2 times, most recently from cf824d2 to 4310247 Compare December 9, 2024 17:27
@jurraca jurraca force-pushed the remove-flake-utils branch from 4310247 to d520ef2 Compare January 31, 2025 15:40
it's getting a little full of Nix stuff at top level imo
had system and "default" swapped around
@jurraca
Copy link
Contributor Author

jurraca commented Jan 31, 2025

rebased. Made a nix folder for tidiness, and fixed a few things.
This change isn't too risky imo, and I've tested it for Linux.
For other arch's, it would be good to test:

  • run nix develop then python check.py and make sure all deps have the green checkmark.
  • run nix build then ./result/bin/kartograf and make sure it prints the help message

I have to think if it's worth it to add testing for the module, but for now I've tested it myself (the module issues was the reason for this change).

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.

1 participant