Skip to content

Comments

nixos/headscale: Add extraSettings option#393096

Closed
oliverwiegers wants to merge 1 commit intoNixOS:masterfrom
oliverwiegers:headscale
Closed

nixos/headscale: Add extraSettings option#393096
oliverwiegers wants to merge 1 commit intoNixOS:masterfrom
oliverwiegers:headscale

Conversation

@oliverwiegers
Copy link

extraSettings adds the possibility to set headscale config options that don't have a nixos module option exposed.

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label Mar 25, 2025
@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/` 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 Mar 25, 2025
@oliverwiegers oliverwiegers force-pushed the headscale branch 2 times, most recently from ccb9220 to 9b46366 Compare March 26, 2025 14:03
@oliverwiegers
Copy link
Author

@kradalby @Misterio77 any thoughts on this change?

Copy link
Member

@kradalby kradalby left a comment

Choose a reason for hiding this comment

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

Make sense to me, but drop the format change for the rename asserts

@kradalby
Copy link
Member

Actually, I was a bit fast, I think we already support this? I think the settings can have unnamed things and they will be added.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label May 16, 2025
@oliverwiegers
Copy link
Author

oliverwiegers commented May 16, 2025

@kradalby thanks for the review.
The format change is enforced by the CI. Without it the CI fails. This check to be specific.

Adding unnamed values to the settings option might work. What does not work is adding something to an existing sub option like settings.dns that fails.
Resulting in us being unable to specify the nameservers and other dns stuff. This will be the case with other defined sub options as well.

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 17, 2025
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label May 22, 2025
@oliverwiegers
Copy link
Author

@kradalby I was mistaken. The format change was not necessary. Earlier the CI failed for another format issue. I dropped the format change

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 9, 2025
`extraSettings` adds the possibility to headscale config options that
don't have a nixos module option exposed.
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 12, 2025
@oddlama
Copy link
Member

oddlama commented Jun 12, 2025

Adding unnamed values to the settings option might work. What does not work is adding something to an existing sub option like settings.dns that fails. Resulting in us being unable to specify the nameservers and other dns stuff. This will be the case with other defined sub options as well.

Can you give a specific example of what is not working? As far as I can tell everything is properly exposed as a freeform settings option, so you should be able to add additional yaml at any level

@SuperSandro2000
Copy link
Member

Yep, setting is a freeform option. You can just add anything you like to it.

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: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants