From 3d1fec6112df366770153261100b15d092a105c1 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 17 Jul 2024 19:39:37 +0200 Subject: [PATCH] checks/simulacrum: rename from cluster, add more stuff, WIP --- packages/checks/default.nix | 8 ++--- .../checks/{cluster.nix => simulacrum.nix} | 30 ++++++++++++++----- 2 files changed, 27 insertions(+), 11 deletions(-) rename packages/checks/{cluster.nix => simulacrum.nix} (67%) diff --git a/packages/checks/default.nix b/packages/checks/default.nix index e060327..8d77d4f 100644 --- a/packages/checks/default.nix +++ b/packages/checks/default.nix @@ -16,10 +16,6 @@ in inherit (config) cluster; }; - cluster = pkgs.callPackage ./cluster.nix { - inherit config extendModules; - }; - garage = pkgs.callPackage ./garage.nix { inherit (self'.packages) garage consul; inherit (self) nixosModules; @@ -54,6 +50,10 @@ in searxng = pkgs.callPackage ./searxng.nix { inherit (self'.packages) searxng; }; + + simulacrum = pkgs.callPackage ./simulacrum.nix { + inherit config extendModules; + }; }; }; } diff --git a/packages/checks/cluster.nix b/packages/checks/simulacrum.nix similarity index 67% rename from packages/checks/cluster.nix rename to packages/checks/simulacrum.nix index e874e0c..522d17b 100644 --- a/packages/checks/cluster.nix +++ b/packages/checks/simulacrum.nix @@ -47,22 +47,38 @@ let in testers.runNixOSTest { - name = "cluster"; + name = "simulacrum"; node = { inherit specialArgs; }; nodes = lib.genAttrs nodes (node: { imports = [ specialArgs.depot.hours.${node}.nixos ./modules/nixos/age-dummy-secrets + ./modules/nixos/external-storage.nix ] ++ depot'.config.cluster.config.out.injectNixosConfig node; - environment.etc."ssh/ssh_host_ed25519_key" = { - source = snakeoil.ssh.private; - mode = "0400"; + systemd.services = { + hyprspace.enable = false; + cachix-agent.enable = false; + }; + + environment.etc = { + "ssh/ssh_host_ed25519_key" = { + source = snakeoil.ssh.private; + mode = "0400"; + }; + "dummy-secrets/cluster-wireguard-meshPrivateKey".source = lib.mkForce snakeoil.wireguard.private.${node}; + "dummy-secrets/grafana-agent-blackbox-secret-monitoring".text = lib.mkForce '' + SECRET_MONITORING_BLACKBOX_TARGET_1_NAME=example-external-service + SECRET_MONITORING_BLACKBOX_TARGET_1_MODULE=http2xx + SECRET_MONITORING_BLACKBOX_TARGET_1_ADDRESS=http://127.0.0.1:1 + ''; + "dummy-secrets/garageRpcSecret".text = lib.mkForce "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; + }; + virtualisation = { + cores = 2; + memorySize = 4096; }; - environment.etc."dummy-secrets/cluster-wireguard-meshPrivateKey".source = lib.mkForce snakeoil.wireguard.private.${node}; - passthru.depot = depot'; - virtualisation.memorySize = 4096; }); testScript = ''