Skip to content

nixos/README.md: relax the requirement of providing option defaults#334509

Merged
Aleksanaa merged 1 commit intoNixOS:masterfrom
pbsds:doc-relax-option-default-requirement-1723599851
Jan 15, 2025
Merged

nixos/README.md: relax the requirement of providing option defaults#334509
Aleksanaa merged 1 commit intoNixOS:masterfrom
pbsds:doc-relax-option-default-requirement-1723599851

Conversation

@pbsds
Copy link
Copy Markdown
Member

@pbsds pbsds commented Aug 14, 2024

If we enforce the requirement of option defaults to the extreme, then we end up with silly sentinel values, a bunch of nullable types, and assertions checking for sentinel values.

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 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
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@pbsds pbsds marked this pull request as ready for review August 14, 2024 01:51
@pbsds pbsds requested a review from infinisil as a code owner August 14, 2024 01:51
@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Aug 14, 2024
@pbsds
Copy link
Copy Markdown
Member Author

pbsds commented Aug 14, 2024

@pbsds pbsds force-pushed the doc-relax-option-default-requirement-1723599851 branch from 37e9098 to e840f5b Compare August 14, 2024 02:40
@pbsds pbsds changed the title nixos/README.md relax the requirement of providing option defaults nixos/README.md: relax the requirement of providing option defaults Aug 14, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Aug 14, 2024
@pbsds pbsds added the 6.topic: best practices Documentation and discussion around best practices for Nixpkgs development label Aug 18, 2024
nixos/README.md Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- Defaults may only be omitted if: (1) the user configuring them is required and (2) they are not used/block evaluation when the the module is not enabled.
- Defaults may only be omitted if:
1. the user configuring them is required
2. they are not used/block evaluation when the the module is not enabled

Style suggestion

@pbsds pbsds force-pushed the doc-relax-option-default-requirement-1723599851 branch from e840f5b to 8813c61 Compare January 8, 2025 19:01
@github-actions github-actions bot added the 6.topic: policy discussion Discuss policies to work in and around Nixpkgs label Jan 8, 2025
If we enforce the requirement of option defaults to the extreme, then we end up with silly sentinel values, a bunch of nullable types, and assertions checking for sentinel values.
@pbsds pbsds force-pushed the doc-relax-option-default-requirement-1723599851 branch from 8813c61 to 959155e Compare January 8, 2025 19:04
@Aleksanaa Aleksanaa merged commit 0bd024d into NixOS:master Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: best practices Documentation and discussion around best practices for Nixpkgs development 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants