blob: d593b981110ad62db72cf9d71082d0346416235c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
{ lib, ... }:
{
perSystem =
{ pkgs, ... }:
let
mkTfWrapper =
{
tfPlugins,
cfg,
}:
let
pkg = pkgs.opentofu.withPlugins tfPlugins;
in
{
type = "app";
program = toString (
pkgs.writers.writeBash "tf" ''
set -xeuo pipefail
ln -snf ${cfg} config.tf.json
exec ${lib.getExe pkg} "$@"
''
);
};
in
{
apps = {
tf = mkTfWrapper {
cfg = pkgs.adminTerraformCfg;
tfPlugins = p: [
p.cloudflare
p.digitalocean
p.external
p.google
p.keycloak
p.null
p.random
p.secret
];
};
};
};
}
|