diff --git a/modules/misc/deployment.nix b/modules/misc/deployment.nix index 373a1a0fbd80..b9be81ebf578 100644 --- a/modules/misc/deployment.nix +++ b/modules/misc/deployment.nix @@ -146,6 +146,28 @@ let cfg = config.deployment; in ''; }; + # Computed options useful for referring to other machines in + # network specifications. + + networking.privateIPv4 = mkOption { + example = "10.1.2.3"; + type = types.uniq types.string; + description = '' + IPv4 address of this machine within in the logical network. + This address can be used by other machines in the logical + network to reach this machine. However, it need not be + visible to the outside (i.e., publicly routable). + ''; + }; + + networking.publicIPv4 = mkOption { + example = "198.51.100.123"; + type = types.uniq types.string; + description = '' + Publicly routable IPv4 address of this machine. + ''; + }; + }; @@ -163,7 +185,6 @@ let cfg = config.deployment; in # throw "I don't know an AMI for zone ‘${cfg.ec2.zone}’ and platform type ‘${config.nixpkgs.system}’" ""); - }; };