-
Notifications
You must be signed in to change notification settings - Fork 75
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
[WIP] nix.nix: split, align and reuse macros from NixOS #329
Draft
ShamrockLee
wants to merge
7
commits into
nix-community:master
Choose a base branch
from
ShamrockLee:nix-reuse-upstream
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In NixOS 23.11, `option.nix.extraConfig` was already renamed into `option.nix.extraOption`, and no alias was left. We no longer need the alias `option.nix.extraConfig` anymore.
t184256
reviewed
Feb 17, 2024
t184256
reviewed
Feb 17, 2024
Align this behavior with Nixpkgs/NixOS.
Add `option.nix.enable` to ease integration with NixOS macros. Hard-code `{ config.nix.enable = true; }`.
Decouple the modules, enable ones to import/disable them separately, and to align with the upstream Nixpkgs/NixOS module system.
ShamrockLee
force-pushed
the
nix-reuse-upstream
branch
2 times, most recently
from
February 17, 2024 17:33
dca29b6
to
8be0c07
Compare
ShamrockLee
force-pushed
the
nix-reuse-upstream
branch
2 times, most recently
from
February 19, 2024 05:02
c11b06d
to
1781d93
Compare
ShamrockLee
force-pushed
the
nix-reuse-upstream
branch
from
February 19, 2024 05:11
1781d93
to
357af61
Compare
The check failure might indicate the need to update the test interface (to supply with the @t184256 Could you give me some hint where the test cases resides and which file is likely to be responsible for injecting the arguments? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR demonstrates the possibility to reuse/inherit NixOS macros.
The original Nix-related options and config in the NixOS modules are mostly inside
nixos/modules/services/system/nix-daemon.nix
, making it hard to reuse without also getting those privilege-required part of implementation. The good news is that the configuration-related part has been split out and becomenixos/modules/config/nix.nix
,nixos/modules/config/nix-flakes.nix
,nixos/modules/config/nix-channel.nix
andnixos/modules/config/nix-remote-build.nix
, making it much easier to reuse.This PR first align the behavior of
nix.nix
with the NixOS upstream, and then split outnix-flakes.nix
andnix-channel.nix
. Finally, it imports the upstreamnix.nix
andnix-flakes.nix
to replace the local interface and implementation.