diff --git a/flake.lock b/flake.lock index 030f9af..204832c 100644 --- a/flake.lock +++ b/flake.lock @@ -1058,11 +1058,11 @@ "terranix": "terranix" }, "locked": { - "lastModified": 1687982768, - "narHash": "sha256-GofM1CCW5l4hQtgea7lqUMQs4kRc/unx9As/vGG92hg=", + "lastModified": 1687130036, + "narHash": "sha256-U7q2iwNNdB0A7GHyLjNYLWluOVJO+K0LtiOV0Y3/vuY=", "owner": "~magic_rb", "repo": "uterranix", - "rev": "9ee50d0b284d76cd5b2abde709c927066d2c319b", + "rev": "30dd60117a71c3f6bb152af03ef6f7fd686abf1c", "type": "sourcehut" }, "original": { diff --git a/flake.nix b/flake.nix index 9bf677e..32cac6a 100644 --- a/flake.nix +++ b/flake.nix @@ -110,15 +110,6 @@ nixos = mapAttrs (_: v: v.config.system.build.toplevel) config.flake.nixosConfigurations; }; - uterranix.preCommands = '' - TF_VAR_dont_deploy_containers=false - if [ "${self.rev or ""}" == "" ] || [ "${self.narHask or ""}" == "" ] - then - TF_VAR_dont_deploy_containers=true - fi - export TF_VAR_dont_deploy_containers - ''; - uterranix.config = [ ./terranix/default.nix { diff --git a/home-manager/modules/pantalaimon.nix b/home-manager/modules/pantalaimon.nix index 3a0dfef..13ee3d2 100644 --- a/home-manager/modules/pantalaimon.nix +++ b/home-manager/modules/pantalaimon.nix @@ -1,15 +1,7 @@ -{ pkgs, ... }: +{ ... }: { services.pantalaimon = { enable = true; - package = pkgs.pantalaimon.overrideAttrs (old: { - src = pkgs.fetchFromGitHub { - owner = "matrix-org"; - repo = "pantalaimon"; - rev = "3968c69aa846889970df1372ba9aa54c1c5e4290"; - hash = "sha256-JdoJB68QtxPhFeZCHd+0ZOlUDbQV3HeBsxW0KbhnDSs="; - }; - }); settings = { Default = diff --git a/terranix/containers/email/default.nix b/terranix/containers/email/default.nix index 92065d8..de30427 100644 --- a/terranix/containers/email/default.nix +++ b/terranix/containers/email/default.nix @@ -1,17 +1,10 @@ -{ elib, tflib, vars, ... }: +{ elib, vars, ... }: let inherit (elib) nfsVolume nomadJob; - inherit (tflib) - tf; in { - variable."dont_deploy_containers" = { - type = "boolean"; - description = "Whether the data to deploy containers properly is available."; - }; - resource."vault_policy"."dovecot-policy" = nfsVolume { name = "dovecot-policy"; policy = '' @@ -47,7 +40,6 @@ in }; resource."nomad_job"."email" = { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./job.hcl; vars = { flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; diff --git a/terranix/containers/gateway-mesh/default.nix b/terranix/containers/gateway-mesh/default.nix index 3ac2063..e4fa385 100644 --- a/terranix/containers/gateway-mesh/default.nix +++ b/terranix/containers/gateway-mesh/default.nix @@ -1,13 +1,10 @@ -{ tflib, elib, ... }: +{ elib, ... }: let inherit (elib) nomadJob; - inherit (tflib) - tf; in { resource."nomad_job"."mesh" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./job.hcl; vars = { "datacenters" = builtins.toJSON [ diff --git a/terranix/containers/gitea/default.nix b/terranix/containers/gitea/default.nix index dd0b337..1a81a75 100644 --- a/terranix/containers/gitea/default.nix +++ b/terranix/containers/gitea/default.nix @@ -1,10 +1,8 @@ -{ tflib, elib, vars, ... }: +{ elib, vars, ... }: let inherit (elib) nfsVolume nomadJob; - inherit (tflib) - tf; in { resource."nomad_volume"."gitea-db" = nfsVolume { @@ -33,8 +31,8 @@ in }; resource."nomad_job"."gitea" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./job.hcl; + vars = { flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_sha = vars.flake_sha; diff --git a/terranix/containers/home-assistant/default.nix b/terranix/containers/home-assistant/default.nix index 09dc2c0..68c394d 100644 --- a/terranix/containers/home-assistant/default.nix +++ b/terranix/containers/home-assistant/default.nix @@ -1,10 +1,8 @@ -{ tflib, elib, vars, ... }: +{ elib, vars, ... }: let inherit (elib) nfsVolume nomadJob; - inherit (tflib) - tf; in { resource."nomad_volume"."home-assistant_hass" = nfsVolume { @@ -71,8 +69,8 @@ in }; resource."nomad_job"."home-assistant" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./job.hcl; + vars = { flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_sha = vars.flake_sha; diff --git a/terranix/containers/hydra/default.nix b/terranix/containers/hydra/default.nix index 2307269..0deda2c 100644 --- a/terranix/containers/hydra/default.nix +++ b/terranix/containers/hydra/default.nix @@ -1,10 +1,8 @@ -{ config, tflib, elib, vars, ... }: +{ config, elib, vars, ... }: let inherit (elib) nfsVolume nomadJob; - inherit (tflib) - tf; in { resource."nomad_volume"."hydra-db" = nfsVolume { @@ -41,8 +39,8 @@ in }; resource."nomad_job"."hydra" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./job.hcl; + vars = { flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_sha = vars.flake_sha; diff --git a/terranix/containers/ingress-blowhole/default.nix b/terranix/containers/ingress-blowhole/default.nix index b416fc5..c004baf 100644 --- a/terranix/containers/ingress-blowhole/default.nix +++ b/terranix/containers/ingress-blowhole/default.nix @@ -1,14 +1,12 @@ -{ tflib, elib, vars, ... }: +{ elib, vars, ... }: let inherit (elib) nomadJob; - inherit (tflib) - tf; in { resource."nomad_job"."ingress" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./job.hcl; + vars = { flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_sha = vars.flake_sha; diff --git a/terranix/containers/ingress-toothpick/default.nix b/terranix/containers/ingress-toothpick/default.nix index 3d726e5..fe6e17f 100644 --- a/terranix/containers/ingress-toothpick/default.nix +++ b/terranix/containers/ingress-toothpick/default.nix @@ -1,10 +1,8 @@ -{ tflib, elib, secret, vars, ... }: +{ elib, secret, vars, ... }: let inherit (elib) nfsVolume nomadJob; - inherit (tflib) - tf; in { resource."nomad_volume"."ingress-letsencrypt" = nfsVolume { @@ -16,7 +14,6 @@ in }; resource."nomad_job"."ingress" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./job.hcl; vars = { flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; diff --git a/terranix/containers/jellyfin/default.nix b/terranix/containers/jellyfin/default.nix index e913bdb..b1a73e2 100644 --- a/terranix/containers/jellyfin/default.nix +++ b/terranix/containers/jellyfin/default.nix @@ -1,10 +1,8 @@ -{ tflib, elib, ... }: +{ elib, ... }: let inherit (elib) nfsVolume nomadJob; - inherit (tflib) - tf; in { resource."nomad_volume"."jellyfin-cache" = nfsVolume { @@ -32,7 +30,6 @@ in }; resource."nomad_job"."jellyfin" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./job.hcl; }; } diff --git a/terranix/containers/matrix/default.nix b/terranix/containers/matrix/default.nix index 607fcd1..fd4654c 100644 --- a/terranix/containers/matrix/default.nix +++ b/terranix/containers/matrix/default.nix @@ -1,10 +1,8 @@ -{ config, tflib, elib, vars, ... }: +{ config, elib, vars, ... }: let inherit (elib) nfsVolume nomadJob; - inherit (tflib) - tf; in { resource."nomad_volume"."matrix-synapse" = nfsVolume { @@ -138,7 +136,6 @@ in }; resource."nomad_job"."matrix-synapse" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./matrix-synapse.hcl; vars = { flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}"; @@ -147,7 +144,6 @@ in }; resource."nomad_job"."matrix-mautrix-discord" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./matrix-mautrix-discord.hcl; vars = { flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}"; @@ -156,7 +152,6 @@ in }; resource."nomad_job"."matrix-mautrix-facebook" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./matrix-mautrix-facebook.hcl; vars = { flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}"; @@ -165,7 +160,6 @@ in }; resource."nomad_job"."matrix-mautrix-signal" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./matrix-mautrix-signal.hcl; vars = { flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}"; @@ -174,8 +168,8 @@ in }; resource."nomad_job"."matrix-heisenbridge" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./matrix-heisenbridge.hcl; + vars = { flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}"; flake_sha = vars.flake_sha; diff --git a/terranix/containers/syncthing/default.nix b/terranix/containers/syncthing/default.nix index d653d05..465ce7f 100644 --- a/terranix/containers/syncthing/default.nix +++ b/terranix/containers/syncthing/default.nix @@ -1,10 +1,8 @@ -{ pkgs, tflib, elib, vars, ... }: +{ pkgs, elib, vars, ... }: let inherit (elib) nfsVolume nomadJob; - inherit (tflib) - tf; sharePrefix = "/mnt/kyle/infrastructure/syncthing"; in @@ -34,7 +32,6 @@ in }; resource."nomad_job"."syncthing" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./job.hcl; vars = { flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; diff --git a/terranix/containers/website/default.nix b/terranix/containers/website/default.nix index a46febd..2909566 100644 --- a/terranix/containers/website/default.nix +++ b/terranix/containers/website/default.nix @@ -1,14 +1,11 @@ -{ pkgs, tflib, elib, vars, ... }: +{ pkgs, elib, vars, ... }: let inherit (elib) nfsVolume nomadJob; - inherit (tflib) - tf; in { resource."nomad_job"."website" = nomadJob { - count = tf "var.dont_deploy_containers ? 0 : 1"; jobspec = ./job.hcl; vars = { flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; diff --git a/terranix/default.nix b/terranix/default.nix index 206df7c..36c2925 100644 --- a/terranix/default.nix +++ b/terranix/default.nix @@ -42,11 +42,6 @@ in sensitive = true; }; - variable."dont_deploy_containers" = { - type = "boolean"; - description = "Whether the data to deploy containers properly is available."; - }; - provider."hcloud" = { token = tf "var.hcloud_token"; };