From 5db4f11be46aacec60ba4c3fd251856777316170 Mon Sep 17 00:00:00 2001 From: Marko Kaapu Date: Mon, 22 Jan 2024 15:59:43 +0200 Subject: [PATCH] Separate machine specific x86 builder configuration from the common one Changes: - adds build3 (x86 builder on Ficolo) specific configuration - adds Barna as a trusted user to build3 specific configuration - hostname of build3 machine changed from "nixos" to "build3" Notes: - Hostname change will not take place without running the hostname tool or without reboot Signed-off-by: Marko Kaapu --- hosts/default.nix | 4 +-- hosts/ficolobuild/build3.nix | 25 +++++++++++++++++++ .../{configuration.nix => builder.nix} | 6 ----- tasks.py | 4 +-- 4 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 hosts/ficolobuild/build3.nix rename hosts/ficolobuild/{configuration.nix => builder.nix} (90%) diff --git a/hosts/default.nix b/hosts/default.nix index 39cab3fa..d2519d6e 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -32,9 +32,9 @@ inherit specialArgs; modules = [./monitoring/configuration.nix]; }; - ficolobuild = lib.nixosSystem { + ficolobuild3 = lib.nixosSystem { inherit specialArgs; - modules = [./ficolobuild/configuration.nix]; + modules = [./ficolobuild/build3.nix]; }; prbuilder = lib.nixosSystem { inherit specialArgs; diff --git a/hosts/ficolobuild/build3.nix b/hosts/ficolobuild/build3.nix new file mode 100644 index 00000000..3069afb2 --- /dev/null +++ b/hosts/ficolobuild/build3.nix @@ -0,0 +1,25 @@ +# SPDX-FileCopyrightText: 2023-2024 Technology Innovation Institute (TII) +# SPDX-License-Identifier: Apache-2.0 +# +{ + self, + lib, + ... +}: { + imports = lib.flatten [ + (with self.nixosModules; [ + user-themisto + user-barna + ]) + ./builder.nix + ]; + + # build3 specific configuration + + networking.hostName = "build3"; + + # Trust Themisto Hydra user + nix.settings = { + trusted-users = ["root" "themisto" "barna"]; + }; +} diff --git a/hosts/ficolobuild/configuration.nix b/hosts/ficolobuild/builder.nix similarity index 90% rename from hosts/ficolobuild/configuration.nix rename to hosts/ficolobuild/builder.nix index dd4ec33d..637ae966 100644 --- a/hosts/ficolobuild/configuration.nix +++ b/hosts/ficolobuild/builder.nix @@ -21,7 +21,6 @@ user-hrosten user-jrautiola user-mkaapu - user-themisto user-tervis user-karim user-mika @@ -42,9 +41,4 @@ # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - - # Trust Themisto Hydra user - nix.settings = { - trusted-users = ["root" "themisto"]; - }; } diff --git a/tasks.py b/tasks.py index f2d33f30..f3a1f23a 100644 --- a/tasks.py +++ b/tasks.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) +# SPDX-FileCopyrightText: 2023-2024 Technology Innovation Institute (TII) # SPDX-FileCopyrightText: 2023 Nix community projects # # SPDX-License-Identifier: MIT @@ -86,7 +86,7 @@ class TargetHost: ), "build3-ficolo": TargetHost( hostname="172.18.20.104", - nixosconfig="ficolobuild", + nixosconfig="ficolobuild3", ), "prbuilder": TargetHost( hostname="172.18.20.106",