# This module contains settings and configuration that apply to all nodes in a grid. { lib, config, ...}: { options.grid = { publicKeyPath = lib.mkOption { type = lib.types.path; description = '' A path on the deployment system of a directory containing all of the public keys for the system. For example, this holds Wireguard public keys for the VPN configuration and SSH public keys to configure SSH authentication. ''; }; privateKeyPath = lib.mkOption { type = lib.types.path; description = '' A path on the deployment system of a directory containing all of the corresponding private keys for the system. ''; }; }; imports = [ ../../nixos/modules/packages.nix ]; config = { # The morph default deployment target the name of the node in the network # attrset. We don't always want to give the node its proper public address # there (because it depends on which domain is associated with the grid # being configured and using variable names complicates a lot of things). # Instead, just tell morph how to reach the node here - by using its fully # qualified domain name. deployment.targetHost = "${config.networking.hostName}.${config.networking.domain}"; }; }