aboutsummaryrefslogtreecommitdiff
path: root/flake
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-11-15 11:54:13 -0800
committerFranck Cuny <franck@fcuny.net>2025-11-15 11:54:13 -0800
commit547e9b6bc13ea71431b8c84ae1689abad4cb6788 (patch)
treefee18c3947fdcbaca7b838edb24acfd0192ffe08 /flake
parentclean up documentations (diff)
downloadinfra-547e9b6bc13ea71431b8c84ae1689abad4cb6788.tar.gz
drop terraform/terranix
Diffstat (limited to 'flake')
-rw-r--r--flake/devshells.nix1
-rw-r--r--flake/overlays.nix23
-rw-r--r--flake/scripts/common.nix25
-rw-r--r--flake/terraform.nix42
4 files changed, 1 insertions, 90 deletions
diff --git a/flake/devshells.nix b/flake/devshells.nix
index 3b4209f..a2d6a9d 100644
--- a/flake/devshells.nix
+++ b/flake/devshells.nix
@@ -8,7 +8,6 @@
programs = {
nixfmt.enable = true;
deadnix.enable = true;
- terraform.enable = true;
};
};
diff --git a/flake/overlays.nix b/flake/overlays.nix
index 2f9100d..1eecfcf 100644
--- a/flake/overlays.nix
+++ b/flake/overlays.nix
@@ -1,9 +1,4 @@
-{
- inputs,
- self,
- config,
- ...
-}:
+{ inputs, self, ... }:
{
flake.overlays.default = _final: prev: {
@@ -13,17 +8,6 @@
perSystem =
{ system, ... }:
- let
- mkTerraformCfg =
- modules:
- inputs.terranix.lib.terranixConfiguration {
- inherit system;
- extraArgs = {
- inherit (config.flake) nixosConfigurations;
- };
- inherit modules;
- };
- in
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
@@ -34,11 +18,6 @@
inputs.nur.overlays.default
inputs.my-go-tools.overlays.default
self.overlays.default
- (_self: _super: {
- adminTerraformCfg = mkTerraformCfg [
- "${self}/terraform/admin"
- ];
- })
];
};
};
diff --git a/flake/scripts/common.nix b/flake/scripts/common.nix
index b8ab82e..931480c 100644
--- a/flake/scripts/common.nix
+++ b/flake/scripts/common.nix
@@ -1,29 +1,4 @@
{ pkgs }:
[
(pkgs.writeScriptBin "update-deps" "nix flake update --commit-lock-file")
-
- (pkgs.writeShellScriptBin "gcloud-auth" ''
- set -xeuo pipefail
- ${pkgs.google-cloud-sdk}/bin/gcloud auth print-identity-token > /dev/null 2>&1 || \
- ${pkgs.google-cloud-sdk}/bin/gcloud auth login --quiet
- ${pkgs.google-cloud-sdk}/bin/gcloud auth application-default print-access-token > /dev/null 2>&1 || \
- ${pkgs.google-cloud-sdk}/bin/gcloud auth application-default login --quiet
- '')
-
- (pkgs.writeShellScriptBin "tf-state-setup" ''
- set -xeuo pipefail
- ${pkgs.google-cloud-sdk}/bin/gcloud storage buckets describe \
- gs://fcuny-infra-tofu-state \
- --project=fcuny-infra \
- --quiet || \
-
- ${pkgs.google-cloud-sdk}/bin/gcloud storage buckets create \
- gs://fcuny-infra-tofu-state \
- --project=fcuny-infra \
- --uniform-bucket-level-access \
- --public-access-prevention \
- --location=us-west1 \
- --default-storage-class=STANDARD \
- --quiet
- '')
]
diff --git a/flake/terraform.nix b/flake/terraform.nix
deleted file mode 100644
index d593b98..0000000
--- a/flake/terraform.nix
+++ /dev/null
@@ -1,42 +0,0 @@
-{ 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
- ];
- };
- };
- };
-}