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 '')
-rw-r--r--flake.lock59
-rw-r--r--flake.nix6
-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
6 files changed, 1 insertions, 155 deletions
diff --git a/flake.lock b/flake.lock
index c48b7e7..9bb4cd6 100644
--- a/flake.lock
+++ b/flake.lock
@@ -196,27 +196,6 @@
"type": "github"
}
},
- "flake-parts_3": {
- "inputs": {
- "nixpkgs-lib": [
- "terranix",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1736143030,
- "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
- "owner": "hercules-ci",
- "repo": "flake-parts",
- "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
- "type": "github"
- },
- "original": {
- "owner": "hercules-ci",
- "repo": "flake-parts",
- "type": "github"
- }
- },
"flake-utils": {
"inputs": {
"systems": "systems_2"
@@ -606,7 +585,6 @@
"nixpkgs": "nixpkgs_5",
"nur": "nur",
"pre-commit-hooks": "pre-commit-hooks_3",
- "terranix": "terranix",
"treefmt-nix": "treefmt-nix_3"
}
},
@@ -655,43 +633,6 @@
"type": "github"
}
},
- "systems_4": {
- "locked": {
- "lastModified": 1681028828,
- "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
- "owner": "nix-systems",
- "repo": "default",
- "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
- "type": "github"
- },
- "original": {
- "owner": "nix-systems",
- "repo": "default",
- "type": "github"
- }
- },
- "terranix": {
- "inputs": {
- "flake-parts": "flake-parts_3",
- "nixpkgs": [
- "nixpkgs"
- ],
- "systems": "systems_4"
- },
- "locked": {
- "lastModified": 1757278723,
- "narHash": "sha256-hTMi6oGU+6VRnW9SZZ+muFcbfMEf2ajjOp7Z2KM5MMY=",
- "owner": "terranix",
- "repo": "terranix",
- "rev": "924573fa6587ac57b0d15037fbd2d3f0fcdf17fb",
- "type": "github"
- },
- "original": {
- "owner": "terranix",
- "repo": "terranix",
- "type": "github"
- }
- },
"treefmt-nix": {
"inputs": {
"nixpkgs": [
diff --git a/flake.nix b/flake.nix
index 94e444e..77b9ce4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -28,11 +28,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};
- terranix = {
- url = "github:terranix/terranix";
- inputs.nixpkgs.follows = "nixpkgs";
- };
-
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
@@ -76,7 +71,6 @@
./flake/formatter.nix
./flake/hosts.nix
./flake/overlays.nix
- ./flake/terraform.nix
];
};
}
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
- ];
- };
- };
- };
-}