HOWTO

Creating shared configuration

You may want to share certain configuration (such as username or email) across multiple modules. Here is how you can do it:

  1. Create a flake-parts module to hold the config schema. For example, config-module.nix
  2. Define your configuration in your config file. For example, config.nix.
  3. Use your configuration from any of NixOS/ nix-darwin/ home-manager modules through flake specialArgs, specifically flake.config. For example, see here.