-
-
Notifications
You must be signed in to change notification settings - Fork 129
feat: nix options allow freeform typing #420
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
base: main
Are you sure you want to change the base?
Conversation
|
@igor-ramazanov @StealthBadger747 pls review when you get some time thank you |
|
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 |
|
The reason of having everything typed was that it was asked by the Nixpkgs maintainers and we reused the same code from this repo. |
|
Yep, I'm also tracking that PR directly now, can't wait to get the maintenance burden off of me 😜 |
|
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 |
|
Any reason the build failed? I'll merge once that's figured out |
|
@tale Something related to documentation generation, checking |
|
@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. |
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?