NixOPS supports a few special attributes which are special attributes on the level of the whole network. One of them is the attribute defaults. It allows to define a NixOS module which is then applied to all machines inside of the network. This can be used to set defaults which are then applied to all machines inside of this network.

The following example is from the NixOPS manual:

{
  network = {
    description = "staging environment";
    enableRollback = true;
  };

  defaults = {
    imports = [ ./common.nix ];
  };

  machine = { ... }: {};
}

Comments

comments powered by Disqus