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:
-
Create a flake-parts module to hold the config schema. For example,
config-module.nix
-
Define your configuration in your config file. For example,
config.nix
. -
Use your configuration from any of NixOS/ nix-darwin/ home-manager modules through
flake
specialArgs, specificallyflake.config
. For example, see here.