mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 16:57:55 +00:00
Gabriel Arazas
c2da083e5f
Similar to wrapper-manager subproject, we're just preparing to make this multi-output for our project's documentation.
46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
---
|
|
title: Declarative user management
|
|
---
|
|
= Declarative user management
|
|
|
|
Similarly to xref:../01-declarative-host-management/index.adoc[Declarative host management], this project also provides a way to declare home-manager users.
|
|
This is also presented as a custom flake-parts module as well, ready to be configured at `setups.home-manager` namespace of the flake-parts config.
|
|
|
|
This module is a bit simpler that it only makes configured users to be added to `homeConfigurations` and `deploy.nodes`.
|
|
|
|
Here's an example user with complete schema.
|
|
|
|
.A user with complete schema
|
|
[source, nix]
|
|
----
|
|
{
|
|
setups.home-manager.sharedModules = [
|
|
inputs.your-mom.homeModules.default
|
|
];
|
|
|
|
# Here is the meat, what you're likely going to do.
|
|
setups.home-manager.configs.foo-dogsquared = {
|
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
|
nixpkgsBranch = "nixos-stable";
|
|
homeManagerBranch = "home-manager-23.05";
|
|
homeDirectory = "/home/foo-dogsquared";
|
|
username = "foodogsquared";
|
|
modules = [
|
|
({ config, lib, ... }: {
|
|
services.foo.enable = true;
|
|
})
|
|
];
|
|
overlays = [
|
|
inputs.neovim-nightly-overlay.overlays.default
|
|
];
|
|
deploy = {
|
|
hostname = "local.foodogsquared.one";
|
|
fastConnection = true;
|
|
autoRollback = true;
|
|
magicRollback = true;
|
|
remoteBuild = true;
|
|
};
|
|
};
|
|
}
|
|
----
|