migrate infra to terranix
This commit is contained in:
parent
32c4eeb2f8
commit
de32fe0db0
16 changed files with 295 additions and 289 deletions
24
infra/base.nix
Normal file
24
infra/base.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
terraform.required_providers.hcloud.source = "hetznercloud/hcloud";
|
||||
|
||||
data.external.hcloud-token = {
|
||||
program = [
|
||||
(lib.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "get-clan-secret";
|
||||
text = ''
|
||||
jq -n --arg secret "$(clan secrets get hcloud-token)" '{"secret":$secret}'
|
||||
'';
|
||||
}
|
||||
))
|
||||
];
|
||||
};
|
||||
|
||||
provider.hcloud.token = config.data.external.hcloud-token "result.secret";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue