Creating users dynamically

Hi,

I want to have one configuration that I can build for different users, i.e. the user name, group etc. should be specific to that one build. I don’t want to use home-manager for custom configs, everyone will get the same system, except for their user name.

What is the optimal way of doing that?

Cheers
Toby

how about create user after installed, from desktop environtment settings or useradd command?

That would be possible, but I would love to have everything in source control and deploy through a Gitlab pipeline. So adding a user would go through our usual approval process and be documented accordingly.

Generally when you need multiple configurations that are the same except for some details, you create a common module, and then give each system its own configuration.nix that imports the common module and also sets the system-specific details

1 Like

That sounds very easy. Sometimes you can’t see the forest for the trees…