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

NixOS/evalModules legacy cleanup #148315

Merged

Conversation

roberth
Copy link
Member

@roberth roberth commented Dec 2, 2021

Motivation for this change

The supposedly legacy args flags was still used and was not passed along correctly. This PR fixes this at the module system level, at the NixOS level and in the documentation module. While only one of these would be sufficient to solve the issue, it is clear that we should get rid of the redundant code.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Dec 2, 2021
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Dec 2, 2021
@FlorianFranzen
Copy link
Contributor

FlorianFranzen commented Dec 4, 2021

This seems to fix #148343 for me.

It then started to fail with FileNotFoundError: [Errno 2] No such file or directory: '/nix/store/<hash>-source/kernel', so I also needed to apply #132688 to fix systemd-boot with specializations again.

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup! I can confirm that this fixes specialisations

@nh2
Copy link
Contributor

nh2 commented Sep 19, 2023

@roberth @infinisil There is one location remaining in nixpkgs that sets these deprecated args and check:

nixpkgs/lib/modules.nix

Lines 1073 to 1074 in 0ed4113

/* Compatibility. */
fixMergeModules = modules: args: evalModules { inherit modules args; check = false; };

Could/should this be rewritten?

@infinisil
Copy link
Member

@nh2 fixMergeModules should really be fully deprecated, could you try that? It looks like Nixops still uses it even though it should've been removed some time ago, so a Nixops PR to remove that would be good. Nixpkgs would have to wait a bit with deprecation then though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants