summaryrefslogtreecommitdiff
path: root/tf/default.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-12-13 23:12:51 -0500
committerseth <[email protected]>2023-12-13 23:19:09 -0500
commit974decdfa3449f47892532f9ac728275fb9fa2df (patch)
tree32b5491239060c74cbf3b27ca51bc620b5e62b4f /tf/default.nix
parent0be27ca642a9f30442d8c0566d00131da5e6b5d0 (diff)
tf: debrand config
Diffstat (limited to 'tf/default.nix')
-rw-r--r--tf/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/tf/default.nix b/tf/default.nix
new file mode 100644
index 0000000..0112339
--- /dev/null
+++ b/tf/default.nix
@@ -0,0 +1,33 @@
+{inputs, ...}: {
+ perSystem = {
+ lib,
+ pkgs,
+ system,
+ ...
+ }: let
+ tfConfig = inputs.terranix.lib.terranixConfiguration {
+ inherit system;
+ modules = [
+ ./cloudflare
+ ./tailscale
+ ./cloud.nix
+ ./vars.nix
+ ./versions.nix
+ ];
+ };
+ in {
+ apps.gen-tf = {
+ type = "app";
+
+ program = pkgs.writeShellApplication {
+ name = "gen-tf";
+
+ text = ''
+ config_file="config.tf.json"
+ [ -e "$config_file" ] && rm -f "$config_file"
+ cp ${tfConfig} "$config_file"
+ '';
+ };
+ };
+ };
+}