From 440122d4709c89f853f62ce0a5d9975aa52d172f Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Thu, 1 Aug 2024 14:27:07 +0200 Subject: [PATCH] Fix wrong unit tests --- lib/build-clan/default.nix | 3 --- templates/flake-module.nix | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/build-clan/default.nix b/lib/build-clan/default.nix index 23875981e..773036424 100644 --- a/lib/build-clan/default.nix +++ b/lib/build-clan/default.nix @@ -38,8 +38,5 @@ eval { rest # implementation ./module.nix - - # Explicit output, usually defined by flake-parts - { options.nixosConfigurations = lib.mkOption { type = lib.types.raw; }; } ]; } diff --git a/templates/flake-module.nix b/templates/flake-module.nix index e48375b57..639a5db5d 100644 --- a/templates/flake-module.nix +++ b/templates/flake-module.nix @@ -17,8 +17,10 @@ initialized = inputs.nixpkgs.legacyPackages.x86_64-linux.runCommand "minimal-clan-flake" { } '' mkdir $out cp -r ${path}/* $out - mkdir -p $out/machines/foo - echo '{ "nixpkgs": { "hostPlatform": "x86_64-linux" } }' > $out/machines/foo/settings.json + rm $out/inventory.json + + # TODO: Instead create a machine by calling the API, this wont break in future tests and is much closer to what the user performs + echo '{ "machines": { "foo": { "name": "foo" } } }' > $out/inventory.json ''; evaled = (import "${initialized}/flake.nix").outputs { self = evaled // {