scripts: fix create-host flake.nix insertion point
Some checks failed
Run nix flake check / flake-check (pull_request) Successful in 2m12s
Run nix flake check / flake-check (push) Failing after 8m24s

Fix bug where new hosts were added outside of nixosConfigurations block
instead of inside it.

Issues fixed:
1. Pattern was looking for "packages =" but actual text is "packages = forAllSystems"
2. Replacement was putting new entry AFTER closing brace instead of BEFORE
3. testvm01 was at top-level flake output instead of in nixosConfigurations

Changes:
- Update pattern to match "packages = forAllSystems"
- Put new entry BEFORE the closing brace of nixosConfigurations
- Move testvm01 to correct location inside nixosConfigurations block

Result: nix flake show now correctly shows testvm01 as NixOS configuration

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-01 17:08:05 +01:00
parent cec496dda7
commit 9908286062
3 changed files with 8 additions and 9 deletions

View File

@@ -334,7 +334,6 @@
sops-nix.nixosModules.sops
];
};
};
testvm01 = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
@@ -351,6 +350,7 @@
sops-nix.nixosModules.sops
];
};
};
packages = forAllSystems (
{ pkgs }:
{