Skip to content
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

"error: attribute 'lib' missing" when rebuilding system #20

Closed
feathecutie opened this issue Jan 16, 2023 · 2 comments
Closed

"error: attribute 'lib' missing" when rebuilding system #20

feathecutie opened this issue Jan 16, 2023 · 2 comments
Labels
bug Something isn't working properly

Comments

@feathecutie
Copy link
Contributor

When trying to use stylix in my system configuration (by simply importing stylix.nixosModules.stylix and setting stylix.image and also having home-manager already imported), I always receive the following error when trying to rebuild my system:

error: attribute 'lib' missing

       at /nix/store/9jaxhhsd44pl35x4ai7silsyncs73vj7-source/modules/vim.nix:38:5:

           37|   options.stylix.targets.vim.enable =
           38|     config.lib.stylix.mkEnableTarget "Vim and/or Neovim" true;
             |     ^
           39|

The commit that introduced this seems to be a1c4e81, as this seems to be the commit that introduced the usage of config.lib(.stylix) in the codebase and every commit right before this works perfectly fine.

My best guess as to why this might occur is that the corresponding option (options.lib(.stylix)) is never declared in any module and as far as I know, only config definitions that have a corresponding option declaration are considered valid by the module system, but it might be something else entirely.

@danth
Copy link
Owner

danth commented Jan 19, 2023

I can't seem to reproduce this.

config.lib is a special option which allows anything to be created inside it, without being specifically declared. I wonder if another part of your configuration is overriding what Stylix has added there.

@feathecutie
Copy link
Contributor Author

No idea what has changed in my config since my last attempt, but now I can't reproduce this either and everything works just fine.

Still quite curious what might have caused this but since it definitely does not seem to be an issue with stylix itself, I'll close this.

Thanks for this amazing project!

@danth danth added the bug Something isn't working properly label Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly
Projects
None yet
Development

No branches or pull requests

2 participants