From b9b1e37309b6ebda136bad9ee9cd16f437196c18 Mon Sep 17 00:00:00 2001 From: Tero Tervala Date: Thu, 18 Jan 2024 11:59:43 +0200 Subject: [PATCH] Use ci-server as DNS instead of /etc/hosts entries Also updated copyrights of the relevant files and added ficolo DNS setup also to prbuilder. Signed-off-by: Tero Tervala --- hosts/binarycache/configuration.nix | 7 +++---- hosts/default.nix | 6 +++--- hosts/ficolo-common.nix | 7 +++++++ hosts/ficolo-hosts.nix | 9 --------- hosts/ficolobuild/configuration.nix | 6 +++--- hosts/monitoring/configuration.nix | 7 +++---- hosts/prbuilder/configuration.nix | 6 +++--- 7 files changed, 22 insertions(+), 26 deletions(-) create mode 100644 hosts/ficolo-common.nix delete mode 100644 hosts/ficolo-hosts.nix diff --git a/hosts/binarycache/configuration.nix b/hosts/binarycache/configuration.nix index 2269acbe..7e66a000 100644 --- a/hosts/binarycache/configuration.nix +++ b/hosts/binarycache/configuration.nix @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) -# +# SPDX-FileCopyrightText: 2023-2024 Technology Innovation Institute (TII) # SPDX-License-Identifier: Apache-2.0 +# { self, inputs, @@ -20,7 +20,7 @@ (with self.nixosModules; [ common qemu-common - ficolo-hosts + ficolo-common service-openssh service-binary-cache service-nginx @@ -46,7 +46,6 @@ networking = { hostName = "binarycache"; - nameservers = ["1.1.1.1" "8.8.8.8"]; }; security.acme = { diff --git a/hosts/default.nix b/hosts/default.nix index fc66ed49..39cab3fa 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) -# +# SPDX-FileCopyrightText: 2023-2024 Technology Innovation Institute (TII) # SPDX-License-Identifier: Apache-2.0 +# { self, inputs, @@ -11,7 +11,7 @@ # shared modules azure-common = import ./azure-common.nix; qemu-common = import ./qemu-common.nix; - ficolo-hosts = import ./ficolo-hosts.nix; + ficolo-common = import ./ficolo-common.nix; common = import ./common.nix; generic-disk-config = import ./generic-disk-config.nix; }; diff --git a/hosts/ficolo-common.nix b/hosts/ficolo-common.nix new file mode 100644 index 00000000..aec7c7e9 --- /dev/null +++ b/hosts/ficolo-common.nix @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Technology Innovation Institute (TII) +# SPDX-License-Identifier: Apache-2.0 +# +{ + # Use ci-server as primary DNS and pfsense as secondary + networking.nameservers = ["172.18.20.100" "172.18.20.1"]; +} diff --git a/hosts/ficolo-hosts.nix b/hosts/ficolo-hosts.nix deleted file mode 100644 index 3bee6854..00000000 --- a/hosts/ficolo-hosts.nix +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) -# -# SPDX-License-Identifier: Apache-2.0 -{ - networking.extraHosts = '' - 172.18.20.102 vedenemo.dev - 172.18.20.109 cache.vedenemo.dev - ''; -} diff --git a/hosts/ficolobuild/configuration.nix b/hosts/ficolobuild/configuration.nix index b9b78cbc..8a97e3ad 100644 --- a/hosts/ficolobuild/configuration.nix +++ b/hosts/ficolobuild/configuration.nix @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) -# +# SPDX-FileCopyrightText: 2023-2024 Technology Innovation Institute (TII) # SPDX-License-Identifier: Apache-2.0 +# { self, config, @@ -14,9 +14,9 @@ inputs.disko.nixosModules.disko (with self.nixosModules; [ common + ficolo-common service-openssh service-node-exporter - ficolo-hosts user-cazfi user-hrosten user-jrautiola diff --git a/hosts/monitoring/configuration.nix b/hosts/monitoring/configuration.nix index ece8bfe2..3d5dd742 100644 --- a/hosts/monitoring/configuration.nix +++ b/hosts/monitoring/configuration.nix @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) -# +# SPDX-FileCopyrightText: 2023-2024 Technology Innovation Institute (TII) # SPDX-License-Identifier: Apache-2.0 +# { pkgs, self, @@ -25,7 +25,7 @@ in { (with self.nixosModules; [ common qemu-common - ficolo-hosts + ficolo-common service-openssh service-nginx service-node-exporter @@ -39,7 +39,6 @@ in { networking = { hostName = "monitoring"; - nameservers = ["1.1.1.1" "8.8.8.8"]; firewall = { allowedTCPPorts = [config.services.prometheus.port config.services.grafana.settings.server.http_port]; allowedUDPPorts = [config.services.prometheus.port config.services.grafana.settings.server.http_port]; diff --git a/hosts/prbuilder/configuration.nix b/hosts/prbuilder/configuration.nix index 1656eb68..e677c5bb 100644 --- a/hosts/prbuilder/configuration.nix +++ b/hosts/prbuilder/configuration.nix @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) -# +# SPDX-FileCopyrightText: 2023-2024 Technology Innovation Institute (TII) # SPDX-License-Identifier: Apache-2.0 +# { self, inputs, @@ -16,6 +16,7 @@ (with self.nixosModules; [ common qemu-common + ficolo-common service-openssh service-node-exporter user-jrautiola @@ -46,6 +47,5 @@ networking = { hostName = "prbuilder"; - nameservers = ["1.1.1.1" "8.8.8.8"]; }; }