-
-
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
nixos: add sharedModules and extraSpecialArgs options #1793
Conversation
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 was going to open this exactly PR, thank you.
LGTM.
BTW, maybe we could add something similar to nix-darwin so we can finally close issue #1698. |
It looks like half of this PR is already done at #1757 so I can remove my extraModules option if that one gets merged. |
I copied over the changes to the nix-darwin module too along with the nixosConfig specialArg. |
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.
@rycee @berbiche Could we have this PR reviewed? It makes some use cases in HM with Flakes much easier. I am using this PR in my backported version HM with great success (well, at least the |
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.
Thanks for the contribution.
Few things to fix.
I'm not sure of the exact syntax of docbook used in description
s.
c222091
to
672b92b
Compare
@berbiche Thanks for the review! fixed and rebased.
I'm glad it works! I think the extraSpecialArgs is more useful for me too. I find the extra modules useful to prevent repeating code for multiple users. And I want it for nixflk, so we can automatically wire private modules. |
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, I missed a few thing earlier.
d2a7f11
to
ca01e72
Compare
Cool fixed that. |
Co-authored-by: Nicolas Berbiche <[email protected]>
ca01e72
to
b1c3ee8
Compare
The Edit: Otherwise it looks fine to me, thanks for the contribution! |
b1c3ee8
to
3d36a55
Compare
…munity#1793) This allows users of the nixos and nix-darwin module to set shared modules for all users and extra specialArgs to be available to home-manager modules. The latter is named extraSpecialArgs just like the argument to modules/default.nix. This could be confusing since the the two are independent in code, but they do mean the same thing so I think the name fits. Darwin can now refer to the global system configuration if used as a module through the special `darwinConfig` argument. Co-authored-by: Nicolas Berbiche <[email protected]>
…munity#1793) This allows users of the nixos and nix-darwin module to set shared modules for all users and extra specialArgs to be available to home-manager modules. The latter is named extraSpecialArgs just like the argument to modules/default.nix. This could be confusing since the the two are independent in code, but they do mean the same thing so I think the name fits. Darwin can now refer to the global system configuration if used as a module through the special `darwinConfig` argument. Co-authored-by: Nicolas Berbiche <[email protected]>
…munity#1793) This allows users of the nixos and nix-darwin module to set shared modules for all users and extra specialArgs to be available to home-manager modules. The latter is named extraSpecialArgs just like the argument to modules/default.nix. This could be confusing since the the two are independent in code, but they do mean the same thing so I think the name fits. Darwin can now refer to the global system configuration if used as a module through the special `darwinConfig` argument. Co-authored-by: Nicolas Berbiche <[email protected]>
…munity#1793) This allows users of the nixos and nix-darwin module to set shared modules for all users and extra specialArgs to be available to home-manager modules. The latter is named extraSpecialArgs just like the argument to modules/default.nix. This could be confusing since the the two are independent in code, but they do mean the same thing so I think the name fits. Darwin can now refer to the global system configuration if used as a module through the special `darwinConfig` argument. Co-authored-by: Nicolas Berbiche <[email protected]>
156: Improve Home Manager support: profiles/suites, modules, extern, flake outputs r=Pacman99 a=Pacman99 A really simple method of implementing #119. This relies on a feature that I added in home-manager master for module options of extraSpecialArgs and sharedModules, nix-community/home-manager#1793. I could try and get that backported to 20.09. But I thought I'd get some feedback on these changes first. Co-authored-by: Pacman99 <[email protected]>
…munity#1793) This allows users of the nixos and nix-darwin module to set shared modules for all users and extra specialArgs to be available to home-manager modules. The latter is named extraSpecialArgs just like the argument to modules/default.nix. This could be confusing since the the two are independent in code, but they do mean the same thing so I think the name fits. Darwin can now refer to the global system configuration if used as a module through the special `darwinConfig` argument. Co-authored-by: Nicolas Berbiche <[email protected]>
Description
closes #1698
This allows users of the nixos and nix-darwin module to set shared modules for all users and extra specialArgs to be available to home-manager modules.
The latter is named extraSpecialArgs just like the argument to modules/default.nix. This could be confusing since the the two are independent in code, but they do mean the same thing so I think the name fits.
Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
.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
Added myself as module maintainer. See example.
Added myself and the module files to
.github/CODEOWNERS
.