Furthermore, they are typically deployed as part of the NixOS configuration and as stand-alone home-manager configuration (but not standalone configs in NixOS systems).
For more information, see xref:../03-project-specific-setup/01-declarative-host-management/index.adoc[Declarative host management] and xref:../03-project-specific-setup/02-declarative-user-management/index.adoc[Declarative user management].
== Importing a home-manager config on NixOS
[chat, foodogsquared, role=full]
====
For NixOS systems, we do prefer deploying home-manager configurations as part of the whole system.
This allows us to easily configure more than one home-manager user.
====
For NixOS systems, there are multiple ways to impart a home-manager user.
The simplest way is to have it as a NixOS user and import it from there.
Here's an example of a NixOS user with a home-manager config.
It just takes the home-manager user from `users/home-manager` and a config of the user at `users.users.<name>` for the NixOS user.
== User-specific modules
home-manager users may have user-specific modules structured similarly to xref:../04-nixos-modules/04-host-specific-modules/index.adoc[Host-specific modules].
The only difference is the namespace is expected at `users.$USERNAME`.
Here's one example of how one would configure their user with this convention.
[source, nix]
----
{
users.foo-dogsquared = {
dotfiles.enable = false;
programs = {
browsers.brave.enable = true;
browsers.firefox.enable = true;
browsers.misc.enable = true;
email.enable = true;
email.thunderbird.enable = true;
git.enable = true;
keys.gpg.enable = true;
keys.ssh.enable = true;
research.enable = true;
shell.enable = true;
terminal-multiplexer.enable = true;
};
setups = {
desktop.enable = true;
fonts.enable = true;
music.enable = true;
};
};
}
----
Like host-specific modules, you could structure it in whatever arbitrary criteria you deem necessary.
This allows us to think about the specific state and purpose of the user while configuring it all the same as any other module rather than dumping it all and adapting it on a shared home-manager module.