Home Manager for teams

Home Manager is designed for individual use. Can anyone recommend a similarly good home configuration management solution that is designed for a workplace, where Nix is used for developer environments, and a single devex team can maintain the base configuration for all developers using their platform?

It should be trivial to roll out a change like, “now git version X.Y.Z is in everyone’s /run/current-system/sw/bin”, and also, “everyone now has a git config that includes these improved settings”.

(Git is just one example. The general case is: there is a small set of developer tools that should be installed globally for all developers, the version of each global tool should be the same for all users, and the tool’s default configuration is insufficient such that each user needs accompanying global configuration that is centrally managed.)

When the centralized configuration changes, users should ideally be able to control when they pick up the changes (possibly by simply restarting or launching a new developer machine). Users should be able to customize their global environments on top of the centrally-managed base config. And ideally the devex team could maintain multiple base configs corresponding to different types of user (C++ developer, web developer, data scientist, etc.).

But anything that provides even rudimentary support for centralized management of developer environments out-of-the-box would be worth considering.

Sounds like home-manager would be a good fit, you’d just publish this “base” config as a third party module. Developers can then tweak it with the normal module system as they see fit.

Some small amount of scripting to update a channel/flake input+switch on reboot and you’re good to go.

1 Like

Not sure how it fits outside of NixOS, but in my team we share modules using this very simple flake:

{
  outputs = { self }: {
    nixosModules.ourCompany = import ./nixos.nix;
    homeManagerModules.ourCompany = import ./home-manager.nix;
  };
}

Using mkOption we have stuff that can be personalized or enabled by people, Nix is awesome <3

2 Likes