* 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;
|
{ name = configurationName;
|
||||||
value = (import "${nixos}/lib/eval-config.nix" {
|
value = (import "${nixos}/lib/eval-config.nix" {
|
||||||
inherit nixpkgs;
|
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;
|
extraArgs = evaluateMachines network;
|
||||||
}).config; }
|
}).config; }
|
||||||
) (attrNames (network)))
|
) (attrNames (network)));
|
||||||
;
|
|
||||||
|
|
||||||
configs = evaluateMachines network;
|
configs = evaluateMachines network;
|
||||||
in
|
in
|
||||||
|
@ -4,15 +4,12 @@ with pkgs.lib;
|
|||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
deployment.targetHost = mkOption {
|
||||||
deployment = {
|
default = config.networking.hostName;
|
||||||
targetHost = mkOption {
|
description = ''
|
||||||
default = config.networking.hostName;
|
This option specifies a hostname or IP address which can be used by nixos-deploy-network
|
||||||
description = ''
|
to execute remote deployment operations.
|
||||||
This option specifies a hostname or IP address which can be used by nixos-deploy-network
|
'';
|
||||||
to execute remote deployment operations.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user