diff --git a/.terraform/plugin_path b/.terraform/plugin_path new file mode 100644 index 0000000..8e12850 --- /dev/null +++ b/.terraform/plugin_path @@ -0,0 +1,3 @@ +[ + "/nix/store/qamki29d3xfgz3100s3hnb3kxay7bcgl-opentofu-1.9.1/libexec/terraform-providers" +] \ No newline at end of file diff --git a/modules/flake/terranix.nix b/modules/flake/terranix.nix deleted file mode 100644 index d2e6863..0000000 --- a/modules/flake/terranix.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - inputs, - ... -}: -{ - imports = [ - inputs.terranix.flakeModule - ]; - perSystem = - { pkgs, ... }: - let - package = pkgs.opentofu.withPlugins (p: [ - p.external - p.local - p.null - p.tls - p.incus - ]); - in - { - terranix = { - terranixConfigurations = { - tnix = { - terraformWrapper = { - inherit package; - }; - workdir = "terraform"; - modules = [ - # ../terranix/default.nix - ]; - }; - }; - }; - }; -} diff --git a/modules/terranix/default.nix b/modules/terranix/default.nix deleted file mode 100644 index 61875a4..0000000 --- a/modules/terranix/default.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ config, lib, ... }: -{ - - terraform = { - cloud = { - hostname = "tofu.skdevstudios.com"; - organization = "skdevs"; - workspaces.name = "dev"; - }; - required_providers.incus = { - source = "lxc/incus"; - version = "0.3.1"; - }; - }; - variable = { - incus_token.type = "string"; - }; - - provider = { - incus = { - generate_client_certificates = true; - accept_remote_certificate = true; - remote = { - default = true; - name = "tofu-prod"; - scheme = "https"; - address = "olympus.tailfc9f5.ts.net"; - token = lib.tfRef "var.incus_token"; - }; - }; - }; - resource = { - incus_profile.d = { - name = "d"; - config = { - "limits.cpu" = "2"; - "security.nesting" = "true"; - "boot.autostart" = "true"; - "security.privileged" = "false"; - "security.syscalls.intercept.mount" = "false"; - }; - device = [ - { - name = "eth0"; - type = "nic"; - properties = { - network = "incusbr0"; - }; - } - { - name = "root"; - type = "disk"; - properties = { - pool = "default"; - path = "/"; - }; - } - ]; - }; - - incus_instance.observer-tofu = { - name = "observer-tofu"; - image = "images:nixos/25.05/amd64"; - profiles = [ "\${incus_profile.d.name}" ]; - config = { - "limits.cpu" = "1"; - "limits.memory" = "1GiB"; - }; - device = [ - { - name = "http"; - type = "proxy"; - properties = { - listen = "tcp:0.0.0.0:8889"; - connect = "tcp:127.0.0.1:3001"; - }; - } - ]; - }; - - incus_instance.forgejo-runner-tofu = { - name = "forgejo-runner-tofu"; - image = "images:nixos/25.05/amd64"; - profiles = [ "\${incus_profile.d.name}" ]; - config = { - "limits.cpu" = "6"; - "limits.memory" = "8GiB"; - }; - }; - - incus_instance.base-tofu = { - name = "base-tofu"; - image = "images:nixos/25.05/amd64"; - profiles = [ "\${incus_profile.d.name}" ]; - config = { - "limits.cpu" = "1"; - "limits.memory" = "1GiB"; - }; - }; - }; -}