-
Notifications
You must be signed in to change notification settings - Fork 104
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
Using both nixosModules.default and homeManagerModules.default errors #215
Comments
supermarin
added a commit
to supermarin/dotfiles
that referenced
this issue
Oct 17, 2023
There are a few problems: 1. agenix decrypts at activation time, so /run/agenix/nixConf isn't there when nix evaluates configuration.nix and checks contents of nix.conf which references /run/agenix/nixConf. 2. agenix's homeManagerModules module collides with it's nixosModules. This makes it impossible to load both at the same time and use home-manager to put the secret in the user's nix.conf [gh issue](ryantm/agenix#215) 3. symlinking is broken ATM [gh issue](ryantm/agenix#214)
supermarin
added a commit
to supermarin/dotfiles
that referenced
this issue
Oct 17, 2023
There are a few problems: 1. agenix decrypts at activation time, so /run/agenix/nixConf isn't there when nix evaluates configuration.nix and checks contents of nix.conf which references /run/agenix/nixConf. 2. agenix's homeManagerModules module collides with it's nixosModules. This makes it impossible to load both at the same time and use home-manager to put the secret in the user's nix.conf [gh issue](ryantm/agenix#215) 3. symlinking is broken ATM [gh issue](ryantm/agenix#214)
I'm not having any issue with using both at the same time. Check out my config here (home-manager) and here (NixOS). |
More specifically, I think your issue is that your either trying to import the HM module in NixOS, or vice-versa. Each should only be imported in their respective configuration. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As a part of trying to make nixAccessToken via secret file working, I reverted to create ~/.config/nix/nix.conf via home-manager and moved the logic to home.nix. As soon as you add
agenix.homeManagerModules.default
belowagenix.nixosModules.default
in flake.nixmodules
section ofnixpkgs.lib.nixosSystem
, this error gets thrown at you:It'd be awesome to document how to properly use HM module and user secrets alongside system secrets.
The text was updated successfully, but these errors were encountered: