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

Q: How to correctly implement a home-manager? #212

Open
Kreyren opened this issue Feb 15, 2024 · 1 comment
Open

Q: How to correctly implement a home-manager? #212

Kreyren opened this issue Feb 15, 2024 · 1 comment

Comments

@Kreyren
Copy link

Kreyren commented Feb 15, 2024

I am struggling implementing flake-parts to work as a part of nixosSystem declaration can you help? So that on system rebuild it also deploys the home-manager configuration for the user, so far i figured out this:

image

https://github.com/Kreyren/nixos-config/pull/1/files#diff-5edef9e1a197551f68e55e21f7a097cd12ec03b7f6c4ab904b01ec1de4b72330R30-R55

Which kinda defeats the purpose of flake-parts as i want to get rid of hard-coded paths so that i can just ideally do self.homeConfigurations."kreyren@sinnenfreude" in modules and expect it to deploy the configuration while still being able to do e.g. nixos-rebuild --flake 'github:kreyren/nixos-config#homeConfigurations.\"kreyren@sinnenfreude\"" and have the home-manager deployed independently from the nixosSystem

@terlar
Copy link

terlar commented Feb 16, 2024

I don't think this has anything to do with flake-parts. It is because the self.homeConfigurations."kreyren@sinnenfreude" is using homeManagerConfiguration function which doesn't return a module anymore. One solution is to extract all that config into a module and just use that module in the NixOS and homeManagerConfiguration function.

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

No branches or pull requests

2 participants