Skip to content

nixos-option: Support flake#315654

Closed
azuwis wants to merge 2 commits intoNixOS:masterfrom
azuwis:nixos-option
Closed

nixos-option: Support flake#315654
azuwis wants to merge 2 commits intoNixOS:masterfrom
azuwis:nixos-option

Conversation

@azuwis
Copy link
Copy Markdown
Contributor

@azuwis azuwis commented May 29, 2024

Description of changes

Need #313497, tested with:

$ nixos-option
$ nixos-option --flake /etc/nixos
$ nixos-option --flake /etc/nixos#machine1
$ nixos-option --flake github:user/repo#machine2

Fixes #97855

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.

FireyFly and others added 2 commits May 29, 2024 13:34
This ports the functionality of the C++ nixos-option to a nix script (with a
tiny shellscript for argument processing and invoking the nix script).
Benefits compared to the native binary include no longer being tied to a
specific nix version, generally improved maintainability and improved
stability.

The main tradeoff is that the C++ version would have better access to
introspecting and reporting errors nicely, but that doesn't seem to have been
the case in practice anyway.  The other tradeoff is that we generate all the
output at the end instead of streaming it as we traverse the option tree.
@ofborg ofborg bot added the 8.has: clean-up This PR removes packages or removes other cruft label May 29, 2024
@ofborg ofborg bot requested a review from FireyFly May 29, 2024 15:27
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 29, 2024
@deifactor
Copy link
Copy Markdown
Contributor

Drive-by thought: I definitely agree that using nix-instantiate or similar as opposed to using nix as a library is the right move here.

@Aleksanaa
Copy link
Copy Markdown
Member

I've amended your commit to the original PR https://github.com/NixOS/nixpkgs/pull/313497/commits. Thanks!

@Aleksanaa Aleksanaa closed this Jul 29, 2024
@Aleksanaa
Copy link
Copy Markdown
Member

Also would you mind becoming the maintainer of nixos-option?

@azuwis
Copy link
Copy Markdown
Contributor Author

azuwis commented Jul 29, 2024

Also would you mind becoming the maintainer of nixos-option?

I'd like to become the maintainer of nixos-option, thanks for the offering.

@Aleksanaa
Copy link
Copy Markdown
Member

Added!

@azuwis azuwis deleted the nixos-option branch October 22, 2024 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 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.

nixos-option does not support flakes

4 participants