Revert "treewide: migrate nixos modules to networking.hosts"
This reverts commit cd64f1bd87.
This commit is contained in:
@@ -365,12 +365,9 @@ in
|
||||
keyFile = mkDefault key;
|
||||
trustedCaFile = mkDefault caCert;
|
||||
};
|
||||
networking.hosts = mkIf (config.services.etcd.enable) {
|
||||
"127.0.0.1" = [
|
||||
"etcd.${top.addons.dns.clusterDomain}"
|
||||
"etcd.local"
|
||||
];
|
||||
};
|
||||
networking.extraHosts = mkIf (config.services.etcd.enable) ''
|
||||
127.0.0.1 etcd.${top.addons.dns.clusterDomain} etcd.local
|
||||
'';
|
||||
|
||||
services.flannel = with cfg.certs.flannelClient; {
|
||||
kubeconfig = top.lib.mkKubeConfig "flannel" {
|
||||
|
||||
@@ -70,12 +70,10 @@ in
|
||||
# Rely on GCP's firewall instead
|
||||
networking.firewall.enable = mkDefault false;
|
||||
|
||||
networking.hosts = {
|
||||
"169.254.169.254" = [
|
||||
"metadata.google.internal"
|
||||
"metadata"
|
||||
];
|
||||
};
|
||||
# Configure default metadata hostnames
|
||||
networking.extraHosts = ''
|
||||
169.254.169.254 metadata.google.internal metadata
|
||||
'';
|
||||
|
||||
networking.timeServers = [ "metadata.google.internal" ];
|
||||
|
||||
|
||||
@@ -1084,10 +1084,14 @@ in
|
||||
) config.containers;
|
||||
|
||||
# Generate /etc/hosts entries for the containers.
|
||||
networking.hosts = lib.mapAttrs' (name: cfg: {
|
||||
name = head (splitString "/" cfg.localAddress);
|
||||
value = lib.optionals (cfg.localAddress != null) [ "${name}.containers" ];
|
||||
}) config.containers;
|
||||
networking.extraHosts = concatStrings (
|
||||
mapAttrsToList (
|
||||
name: cfg:
|
||||
optionalString (cfg.localAddress != null) ''
|
||||
${head (splitString "/" cfg.localAddress)} ${name}.containers
|
||||
''
|
||||
) config.containers
|
||||
);
|
||||
|
||||
networking.dhcpcd.denyInterfaces = [
|
||||
"ve-*"
|
||||
|
||||
Reference in New Issue
Block a user