-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add flake-parts module #5229
Add flake-parts module #5229
Conversation
@rycee sorry for the ping, but are you able to review? |
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
I don't think there's any conflicts so I won't rebase just yet. If someone is able to review I'm happy to address any feedback! 😁 |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Matt!
3ac1cde
to
d7ffe12
Compare
''; | ||
}; | ||
homeModules = mkOption { | ||
type = types.lazyAttrsOf types.unspecified; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being a bit late but should the type not have been types.lazyAttrsOf types.deferredModule
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote this a long time ago, referencing the flake.parts nixosModules module. So I would've used whatever type flake.parts was using at the time.
But yes, deferredModule
is a more appropriate type. Good spot.
Description
Add a flake-parts module, output as
flakeModules.home-manager
andflakeModules.default
.The module defines options for
flake.homeModules
andflake.homeConfigurations
, based on the respective nixos equivalents;flake.nixosModules
andflake.nixosConfigurations
.This is mostly useful for people who want to define modules or configs in multiple flake modules. Without the options, they can still be defined, but the definition must be unique.
I've added some initial documentation, although I don't know how to build/browse the docs to check it renders how I expect.
Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
ornix develop --ignore-environment .#all
using Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC