Revert "Create a way to deploy rest of terranix without containers"

This reverts commit 0d4698ab78.
This commit is contained in:
Magic_RB 2023-06-29 18:59:38 +02:00
parent 158ffab7c5
commit 64f95150e1
15 changed files with 20 additions and 79 deletions

View file

@ -1058,11 +1058,11 @@
"terranix": "terranix" "terranix": "terranix"
}, },
"locked": { "locked": {
"lastModified": 1687982768, "lastModified": 1687130036,
"narHash": "sha256-GofM1CCW5l4hQtgea7lqUMQs4kRc/unx9As/vGG92hg=", "narHash": "sha256-U7q2iwNNdB0A7GHyLjNYLWluOVJO+K0LtiOV0Y3/vuY=",
"owner": "~magic_rb", "owner": "~magic_rb",
"repo": "uterranix", "repo": "uterranix",
"rev": "9ee50d0b284d76cd5b2abde709c927066d2c319b", "rev": "30dd60117a71c3f6bb152af03ef6f7fd686abf1c",
"type": "sourcehut" "type": "sourcehut"
}, },
"original": { "original": {

View file

@ -110,15 +110,6 @@
nixos = mapAttrs (_: v: v.config.system.build.toplevel) config.flake.nixosConfigurations; 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 = [ uterranix.config = [
./terranix/default.nix ./terranix/default.nix
{ {

View file

@ -1,15 +1,7 @@
{ pkgs, ... }: { ... }:
{ {
services.pantalaimon = { services.pantalaimon = {
enable = true; enable = true;
package = pkgs.pantalaimon.overrideAttrs (old: {
src = pkgs.fetchFromGitHub {
owner = "matrix-org";
repo = "pantalaimon";
rev = "3968c69aa846889970df1372ba9aa54c1c5e4290";
hash = "sha256-JdoJB68QtxPhFeZCHd+0ZOlUDbQV3HeBsxW0KbhnDSs=";
};
});
settings = settings =
{ {
Default = Default =

View file

@ -1,17 +1,10 @@
{ elib, tflib, vars, ... }: { elib, vars, ... }:
let let
inherit (elib) inherit (elib)
nfsVolume nfsVolume
nomadJob; nomadJob;
inherit (tflib)
tf;
in in
{ {
variable."dont_deploy_containers" = {
type = "boolean";
description = "Whether the data to deploy containers properly is available.";
};
resource."vault_policy"."dovecot-policy" = nfsVolume { resource."vault_policy"."dovecot-policy" = nfsVolume {
name = "dovecot-policy"; name = "dovecot-policy";
policy = '' policy = ''
@ -47,7 +40,6 @@ in
}; };
resource."nomad_job"."email" = { resource."nomad_job"."email" = {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./job.hcl; jobspec = ./job.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";

View file

@ -1,13 +1,10 @@
{ tflib, elib, ... }: { elib, ... }:
let let
inherit (elib) inherit (elib)
nomadJob; nomadJob;
inherit (tflib)
tf;
in in
{ {
resource."nomad_job"."mesh" = nomadJob { resource."nomad_job"."mesh" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./job.hcl; jobspec = ./job.hcl;
vars = { vars = {
"datacenters" = builtins.toJSON [ "datacenters" = builtins.toJSON [

View file

@ -1,10 +1,8 @@
{ tflib, elib, vars, ... }: { elib, vars, ... }:
let let
inherit (elib) inherit (elib)
nfsVolume nfsVolume
nomadJob; nomadJob;
inherit (tflib)
tf;
in in
{ {
resource."nomad_volume"."gitea-db" = nfsVolume { resource."nomad_volume"."gitea-db" = nfsVolume {
@ -33,8 +31,8 @@ in
}; };
resource."nomad_job"."gitea" = nomadJob { resource."nomad_job"."gitea" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./job.hcl; jobspec = ./job.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
flake_sha = vars.flake_sha; flake_sha = vars.flake_sha;

View file

@ -1,10 +1,8 @@
{ tflib, elib, vars, ... }: { elib, vars, ... }:
let let
inherit (elib) inherit (elib)
nfsVolume nfsVolume
nomadJob; nomadJob;
inherit (tflib)
tf;
in in
{ {
resource."nomad_volume"."home-assistant_hass" = nfsVolume { resource."nomad_volume"."home-assistant_hass" = nfsVolume {
@ -71,8 +69,8 @@ in
}; };
resource."nomad_job"."home-assistant" = nomadJob { resource."nomad_job"."home-assistant" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./job.hcl; jobspec = ./job.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
flake_sha = vars.flake_sha; flake_sha = vars.flake_sha;

View file

@ -1,10 +1,8 @@
{ config, tflib, elib, vars, ... }: { config, elib, vars, ... }:
let let
inherit (elib) inherit (elib)
nfsVolume nfsVolume
nomadJob; nomadJob;
inherit (tflib)
tf;
in in
{ {
resource."nomad_volume"."hydra-db" = nfsVolume { resource."nomad_volume"."hydra-db" = nfsVolume {
@ -41,8 +39,8 @@ in
}; };
resource."nomad_job"."hydra" = nomadJob { resource."nomad_job"."hydra" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./job.hcl; jobspec = ./job.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
flake_sha = vars.flake_sha; flake_sha = vars.flake_sha;

View file

@ -1,14 +1,12 @@
{ tflib, elib, vars, ... }: { elib, vars, ... }:
let let
inherit (elib) inherit (elib)
nomadJob; nomadJob;
inherit (tflib)
tf;
in in
{ {
resource."nomad_job"."ingress" = nomadJob { resource."nomad_job"."ingress" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./job.hcl; jobspec = ./job.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
flake_sha = vars.flake_sha; flake_sha = vars.flake_sha;

View file

@ -1,10 +1,8 @@
{ tflib, elib, secret, vars, ... }: { elib, secret, vars, ... }:
let let
inherit (elib) inherit (elib)
nfsVolume nfsVolume
nomadJob; nomadJob;
inherit (tflib)
tf;
in in
{ {
resource."nomad_volume"."ingress-letsencrypt" = nfsVolume { resource."nomad_volume"."ingress-letsencrypt" = nfsVolume {
@ -16,7 +14,6 @@ in
}; };
resource."nomad_job"."ingress" = nomadJob { resource."nomad_job"."ingress" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./job.hcl; jobspec = ./job.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";

View file

@ -1,10 +1,8 @@
{ tflib, elib, ... }: { elib, ... }:
let let
inherit (elib) inherit (elib)
nfsVolume nfsVolume
nomadJob; nomadJob;
inherit (tflib)
tf;
in in
{ {
resource."nomad_volume"."jellyfin-cache" = nfsVolume { resource."nomad_volume"."jellyfin-cache" = nfsVolume {
@ -32,7 +30,6 @@ in
}; };
resource."nomad_job"."jellyfin" = nomadJob { resource."nomad_job"."jellyfin" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./job.hcl; jobspec = ./job.hcl;
}; };
} }

View file

@ -1,10 +1,8 @@
{ config, tflib, elib, vars, ... }: { config, elib, vars, ... }:
let let
inherit (elib) inherit (elib)
nfsVolume nfsVolume
nomadJob; nomadJob;
inherit (tflib)
tf;
in in
{ {
resource."nomad_volume"."matrix-synapse" = nfsVolume { resource."nomad_volume"."matrix-synapse" = nfsVolume {
@ -138,7 +136,6 @@ in
}; };
resource."nomad_job"."matrix-synapse" = nomadJob { resource."nomad_job"."matrix-synapse" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./matrix-synapse.hcl; jobspec = ./matrix-synapse.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}"; 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 { resource."nomad_job"."matrix-mautrix-discord" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./matrix-mautrix-discord.hcl; jobspec = ./matrix-mautrix-discord.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}"; 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 { resource."nomad_job"."matrix-mautrix-facebook" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./matrix-mautrix-facebook.hcl; jobspec = ./matrix-mautrix-facebook.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}"; 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 { resource."nomad_job"."matrix-mautrix-signal" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./matrix-mautrix-signal.hcl; jobspec = ./matrix-mautrix-signal.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}"; flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}";
@ -174,8 +168,8 @@ in
}; };
resource."nomad_job"."matrix-heisenbridge" = nomadJob { resource."nomad_job"."matrix-heisenbridge" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./matrix-heisenbridge.hcl; jobspec = ./matrix-heisenbridge.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}"; flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}";
flake_sha = vars.flake_sha; flake_sha = vars.flake_sha;

View file

@ -1,10 +1,8 @@
{ pkgs, tflib, elib, vars, ... }: { pkgs, elib, vars, ... }:
let let
inherit (elib) inherit (elib)
nfsVolume nfsVolume
nomadJob; nomadJob;
inherit (tflib)
tf;
sharePrefix = "/mnt/kyle/infrastructure/syncthing"; sharePrefix = "/mnt/kyle/infrastructure/syncthing";
in in
@ -34,7 +32,6 @@ in
}; };
resource."nomad_job"."syncthing" = nomadJob { resource."nomad_job"."syncthing" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./job.hcl; jobspec = ./job.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";

View file

@ -1,14 +1,11 @@
{ pkgs, tflib, elib, vars, ... }: { pkgs, elib, vars, ... }:
let let
inherit (elib) inherit (elib)
nfsVolume nfsVolume
nomadJob; nomadJob;
inherit (tflib)
tf;
in in
{ {
resource."nomad_job"."website" = nomadJob { resource."nomad_job"."website" = nomadJob {
count = tf "var.dont_deploy_containers ? 0 : 1";
jobspec = ./job.hcl; jobspec = ./job.hcl;
vars = { vars = {
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";

View file

@ -42,11 +42,6 @@ in
sensitive = true; sensitive = true;
}; };
variable."dont_deploy_containers" = {
type = "boolean";
description = "Whether the data to deploy containers properly is available.";
};
provider."hcloud" = { provider."hcloud" = {
token = tf "var.hcloud_token"; token = tf "var.hcloud_token";
}; };