From 8135d3e1b8e4f71a628569daa595397695cbf177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Fri, 9 May 2025 09:12:39 +0200 Subject: [PATCH] nixos System --- deployment/check/basic/nixosTest.nix | 55 ++++++---------------------- 1 file changed, 11 insertions(+), 44 deletions(-) diff --git a/deployment/check/basic/nixosTest.nix b/deployment/check/basic/nixosTest.nix index 3d6bf9f7..01ee8364 100644 --- a/deployment/check/basic/nixosTest.nix +++ b/deployment/check/basic/nixosTest.nix @@ -20,6 +20,16 @@ testers.runNixOSTest ( name = "basic.tfvars"; path = ./basic.tfvars; }; + + fakeMachine = pkgs.nixos [ + ../basic/minimalTarget.nix + ../../../launch/shared.nix + ../../../launch/garage.nix + ../../../launch/mastodon.nix + ../../../launch/pixelfed.nix + ../../../launch/peertube.nix + ]; + extraDependenciesFromMachine = machine: [ @@ -101,7 +111,7 @@ testers.runNixOSTest ( pkgs.postgresql_15 ] ++ lib.concatLists ( - map (tm: extraDependenciesFromMachine nodes.${tm}) (targetMachines ++ [ "fake" ]) + map extraDependenciesFromMachine (map (tm: nodes.${tm}) targetMachines ++ [ fakeMachine.config ]) ); environment.systemPackages = [ tf @@ -109,49 +119,6 @@ testers.runNixOSTest ( ]; }; - fake = { - imports = [ - ../basic/minimalTarget.nix - - ## NOTE: Cannot use ../../../launch/shared.nix because it involves - ## and . - ( - { pkgs, ... }: - let - hostname = "dummy"; - domain = "dummy"; - initialUser = { - username = "dummy"; - email = "dummy"; - displayName = "dummy"; - }; - in - { - imports = [ - # - # - ../../../services/fediversity - ../../../launch/resource.nix - ]; - fediversityVm.name = hostname; - fediversity = { - inherit domain; - temp.initialUser = { - inherit (initialUser) username email displayName; - # FIXME: disgusting, but nvm, this is going to be replaced by - # proper central authentication at some point - passwordFile = pkgs.writeText "password" initialUser.password; - }; - }; - } - ) - - ../../../launch/garage.nix - ../../../launch/mastodon.nix - ../../../launch/pixelfed.nix - ../../../launch/peertube.nix - ]; - }; } // lib.genAttrs targetMachines (_: { imports = [ ../basic/minimalTarget.nix ];