Skip to content

Conversation

@eyJhb
Copy link

@eyJhb eyJhb commented Jan 4, 2026

Allows freeform typing, e.g. right now the module options is not updated for the v0.6.2-beta.3, which means it's kind of hard to use. It should have no negative effect, and could potentially lower the maintenance burden. Ie. maybe some options could be removed, and just let the user type them in as they see fit?

@eyJhb eyJhb requested a review from tale as a code owner January 4, 2026 15:55
@tale
Copy link
Owner

tale commented Jan 11, 2026

@igor-ramazanov @StealthBadger747 pls review when you get some time thank you

@igor-ramazanov
Copy link
Contributor

Looks good to me. Still allows adding types for new options.

FYI, we want to upstream the nix code to nixpkgs and delete this one: NixOS/nixpkgs#398667

@igor-ramazanov
Copy link
Contributor

The reason of having everything typed was that it was asked by the Nixpkgs maintainers and we reused the same code from this repo.

NixOS/nixpkgs#398667 (comment)

@tale
Copy link
Owner

tale commented Jan 12, 2026

Yep, I'm also tracking that PR directly now, can't wait to get the maintenance burden off of me 😜

@eyJhb
Copy link
Author

eyJhb commented Jan 12, 2026

I think there are some options, that can be removed in the future. But it would be ideal to keep the secret path configs, but everything else could be fairly optional. I just don't have the spoons right now to do it. It's a bigger overhaul :)

But then again, looking at e.g. at the Headscale NixOS module, it has the freefrom field + the options typed out. https://github.com/NixOS/nixpkgs/blob/nixos-25.11/nixos/modules/services/networking/headscale.nix

@tale
Copy link
Owner

tale commented Jan 12, 2026

Any reason the build failed? I'll merge once that's figured out

@igor-ramazanov
Copy link
Contributor

@tale Something related to documentation generation, checking

@igor-ramazanov
Copy link
Contributor

@eyJhb Could you please apply this patch to your PR?

diff --git a/nix/docs.nix b/nix/docs.nix
index a33b04fc..9866cbac 100644
--- a/nix/docs.nix
+++ b/nix/docs.nix
@@ -3,10 +3,12 @@
   nixosOptionsDoc,
   runCommand,
   nodejs,
+  pkgs,
   ...
 }: let
   eval = lib.evalModules {
     modules = [./options.nix];
+    specialArgs = {inherit pkgs;};
   };
   transformOptions = opt:
     if (lib.hasPrefix "_" opt.name)

This will fix failing documentation generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants