From 2ee4958bdbe4af9823fed9da0ca13cdb53a8d61b Mon Sep 17 00:00:00 2001 From: magic_rb Date: Thu, 18 Jan 2024 21:27:57 +0100 Subject: [PATCH] Getting stuff right the first (few) time(s) is hard Signed-off-by: magic_rb --- terranix/containers/gitea/default.nix | 3 ++- terranix/containers/gitea/job.hcl | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/terranix/containers/gitea/default.nix b/terranix/containers/gitea/default.nix index 3b6b875..385c4c8 100644 --- a/terranix/containers/gitea/default.nix +++ b/terranix/containers/gitea/default.nix @@ -1,4 +1,4 @@ -{ elib, vars, ... }: +{ elib, config', vars, ... }: let inherit (elib) nfsVolume @@ -36,6 +36,7 @@ in vars = { flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}"; flake_sha = vars.flake_sha; + store_path = builtins.unsafeDiscardStringContext config'.flake.nixngConfigurations.gitea.config.system.build.toplevel; }; }; } diff --git a/terranix/containers/gitea/job.hcl b/terranix/containers/gitea/job.hcl index 9bcf600..e72ec3b 100644 --- a/terranix/containers/gitea/job.hcl +++ b/terranix/containers/gitea/job.hcl @@ -6,6 +6,10 @@ variable "flake_sha" { type = string } +variable "store_path" { + type =string +} + job "gitea" { datacenters = [ "homelab-1" ] type = "service" @@ -80,7 +84,8 @@ job "gitea" { config { nix_flake_ref = "${var.flake_ref}#nixngConfigurations.gitea.config.system.build.toplevel" - nix_flake_sha = var.flake_sha + nix_flake_sha = var.flake_sha + nix_flake_store_path = var.store_path entrypoint = [ "init" ] # mounts = [