-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Option aliases are parsed incorrectly #615
Comments
What does
where |
Interesting. After doing some repl research, it seems that For other, non-aliased values, using nix-repl> nixosConfigurations.HOSTNAME.options.home-manager.users.type.getSubOptions []
{
_module = { ... };
accounts = { ... };
assertions = { ... };
dconf = { ... };
editorconfig = { ... };
fonts = { ... };
gtk = { ... };
home = { ... };
home-files = { ... };
i18n = { ... };
# etc, more home-manager options
} But, I can do the same thing with nixos to get all of its options: nix-repl> nixosConfigurations.HOSTNAME.type.getSubOptions []
{
_module = { ... };
appstream = { ... };
assertions = { ... };
baseVars = { ... };
boot = { ... };
console = { ... };
containers = { ... };
custom = { ... };
docker-containers = { ... };
documentation = { ... };
dysnomia = { ... };
ec2 = { ... };
environment = { ... };
fileSystems = { ... };
fonts = { ... };
gtk = { ... };
hardware = { ... };
hm = { ... };
home-manager = { ... };
# etc, more nixos options HOWEVER, this same process does not provide all the options for the nix-repl> nixosConfigurations.HOSTNAME.options.hm.type.getSubOptions []
{
_module = { ... };
} This is the behavior we were seeing with the completions. It seems like |
Perhaps we can create an issue in nixpkgs and then inspect how to co-operate with it. |
Describe the bug
I'm using the lib function
mkAliasOptionModule
to provide easy access to home-manager config via an option alias. It turns this:Into this:
In case it's helpful, here's how I declare the alias:
I've set up Nixd to give me autocomplete for home-manager, and it works perfectly whenever I use the unaliased form, like this:
But when I use the alias, it only shows the first value, and doesn't provide completion for any of the others:
I would expect nixd to handle these kinds of aliases normally.
Configuration
I use Home-Manager as a module, so to get Nixd to undestand it, I set it up like this:
The text was updated successfully, but these errors were encountered: