* Provide a default hostname and deployment target equal to the
attribute name of the machine in the model. This allows networking.hostName and deployment.targetHost to be omitted for typical networks. svn path=/nixos/trunk/; revision=25125
This commit is contained in:
parent
332f0418f7
commit
37a9ffffb0
@ -70,11 +70,18 @@ let
|
||||
{ name = configurationName;
|
||||
value = (import "${nixos}/lib/eval-config.nix" {
|
||||
inherit nixpkgs;
|
||||
modules = [ configuration ];
|
||||
modules =
|
||||
[ configuration
|
||||
# Provide a default hostname and deployment target equal
|
||||
# to the attribute name of the machine in the model.
|
||||
{ key = "set-default-hostname";
|
||||
networking.hostName = pkgs.lib.mkOverride 900 configurationName;
|
||||
deployment.targetHost = pkgs.lib.mkOverride 900 configurationName;
|
||||
}
|
||||
];
|
||||
extraArgs = evaluateMachines network;
|
||||
}).config; }
|
||||
) (attrNames (network)))
|
||||
;
|
||||
) (attrNames (network)));
|
||||
|
||||
configs = evaluateMachines network;
|
||||
in
|
||||
|
@ -4,15 +4,12 @@ with pkgs.lib;
|
||||
|
||||
{
|
||||
options = {
|
||||
|
||||
deployment = {
|
||||
targetHost = mkOption {
|
||||
default = config.networking.hostName;
|
||||
description = ''
|
||||
This option specifies a hostname or IP address which can be used by nixos-deploy-network
|
||||
to execute remote deployment operations.
|
||||
'';
|
||||
};
|
||||
deployment.targetHost = mkOption {
|
||||
default = config.networking.hostName;
|
||||
description = ''
|
||||
This option specifies a hostname or IP address which can be used by nixos-deploy-network
|
||||
to execute remote deployment operations.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user