clan-core/pkgs/clan-cli/tests/test_flake_with_core_and_pass/flake.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

2023-09-29 16:31:05 +00:00
{
# Use this path to our repo root e.g. for UI test
# inputs.clan-core.url = "../../../../.";
# this placeholder is replaced by the path to clan-core
2023-09-29 16:31:05 +00:00
inputs.clan-core.url = "__CLAN_CORE__";
2024-03-17 18:48:49 +00:00
outputs =
{ self, clan-core }:
2023-09-29 16:31:05 +00:00
let
clan = clan-core.lib.buildClan {
directory = self;
2023-10-23 20:31:12 +00:00
clanName = "test_flake_with_core_and_pass";
2023-09-29 16:31:05 +00:00
machines = {
2024-03-17 18:48:49 +00:00
vm1 =
{ lib, ... }:
{
clan.networking.targetHost = "__CLAN_TARGET_ADDRESS__";
system.stateVersion = lib.version;
2024-06-17 10:42:28 +00:00
clan.core.secretStore = "password-store";
clan.core.secretsUploadDirectory = lib.mkForce "__CLAN_SOPS_KEY_DIR__/secrets";
2023-09-29 16:31:05 +00:00
2024-03-17 18:48:49 +00:00
clan.networking.zerotier.controller.enable = true;
2023-09-29 16:31:05 +00:00
2024-03-17 18:48:49 +00:00
systemd.services.shutdown-after-boot = {
enable = true;
wantedBy = [ "multi-user.target" ];
after = [ "multi-user.target" ];
script = ''
#!/usr/bin/env bash
shutdown -h now
'';
};
2023-09-29 16:31:05 +00:00
};
};
};
in
{
inherit (clan) nixosConfigurations clanInternals;
};
}