mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-21 23:54:22 +01:00
Unhardcode empty flake_ref and friends
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
637dc2877f
commit
ef62e6cc67
|
@ -1,13 +1,8 @@
|
|||
{ elib, ... }:
|
||||
{ elib, vars, ... }:
|
||||
let
|
||||
inherit (elib)
|
||||
nfsVolume
|
||||
nomadJob;
|
||||
|
||||
flake_host = "";
|
||||
flake_rev = "";
|
||||
flake_ref = "";
|
||||
flake_sha = "";
|
||||
in
|
||||
{
|
||||
resource."vault_policy"."dovecot-policy" = nfsVolume {
|
||||
|
@ -47,8 +42,8 @@ in
|
|||
resource."nomad_job"."email" = {
|
||||
jobspec = ./job.hcl;
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
||||
flake_sha = vars.flake_sha;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{ elib, ... }:
|
||||
{ elib, vars, ... }:
|
||||
let
|
||||
inherit (elib)
|
||||
nfsVolume
|
||||
nomadJob;
|
||||
|
||||
flake_host = "";
|
||||
flake_rev = "";
|
||||
flake_ref = "";
|
||||
flake_sha = "";
|
||||
in
|
||||
{
|
||||
resource."nomad_volume"."gitea-db" = nfsVolume {
|
||||
|
@ -39,8 +34,8 @@ in
|
|||
jobspec = ./job.hcl;
|
||||
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
||||
flake_sha = vars.flake_sha;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{ elib, ... }:
|
||||
{ elib, vars, ... }:
|
||||
let
|
||||
inherit (elib)
|
||||
nfsVolume
|
||||
nomadJob;
|
||||
|
||||
flake_host = "";
|
||||
flake_rev = "";
|
||||
flake_ref = "";
|
||||
flake_sha = "";
|
||||
in
|
||||
{
|
||||
resource."nomad_volume"."home-assistant_hass" = nfsVolume {
|
||||
|
@ -77,8 +72,8 @@ in
|
|||
jobspec = ./job.hcl;
|
||||
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
||||
flake_sha = vars.flake_sha;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{ config, elib, ... }:
|
||||
{ config, elib, vars, ... }:
|
||||
let
|
||||
inherit (elib)
|
||||
nfsVolume
|
||||
nomadJob;
|
||||
|
||||
flake_host = "";
|
||||
flake_rev = "";
|
||||
flake_ref = "";
|
||||
flake_sha = "";
|
||||
in
|
||||
{
|
||||
resource."nomad_volume"."hydra-db" = nfsVolume {
|
||||
|
@ -47,8 +42,8 @@ in
|
|||
jobspec = ./job.hcl;
|
||||
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
||||
flake_sha = vars.flake_sha;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
{ elib, ... }:
|
||||
{ elib, vars, ... }:
|
||||
let
|
||||
inherit (elib)
|
||||
nomadJob;
|
||||
|
||||
flake_host = "";
|
||||
flake_rev = "";
|
||||
flake_ref = "";
|
||||
flake_sha = "";
|
||||
in
|
||||
{
|
||||
resource."nomad_job"."ingress" = nomadJob {
|
||||
jobspec = ./job.hcl;
|
||||
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
||||
flake_sha = vars.flake_sha;
|
||||
upstreams = "\${file(\"${./upstreams.conf}\")}";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{ elib, secret, ... }:
|
||||
{ elib, secret, vars, ... }:
|
||||
let
|
||||
inherit (elib)
|
||||
nfsVolume
|
||||
nomadJob;
|
||||
|
||||
flake_host = "";
|
||||
flake_rev = "";
|
||||
flake_ref = "";
|
||||
flake_sha = "";
|
||||
in
|
||||
{
|
||||
resource."nomad_volume"."ingress-letsencrypt" = nfsVolume {
|
||||
|
@ -21,8 +16,8 @@ in
|
|||
resource."nomad_job"."ingress" = nomadJob {
|
||||
jobspec = ./job.hcl;
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
||||
flake_sha = vars.flake_sha;
|
||||
upstreams = "\${file(\"${./upstreams.conf}\")}";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{ config, elib, ... }:
|
||||
{ config, elib, vars, ... }:
|
||||
let
|
||||
inherit (elib)
|
||||
nfsVolume
|
||||
nomadJob;
|
||||
|
||||
flake_host = "";
|
||||
flake_sha = "";
|
||||
flake_ref = "";
|
||||
flake_rev= "";
|
||||
in
|
||||
{
|
||||
resource."nomad_volume"."matrix-synapse" = nfsVolume {
|
||||
|
@ -143,32 +138,32 @@ in
|
|||
resource."nomad_job"."matrix-synapse" = nomadJob {
|
||||
jobspec = ./matrix-synapse.hcl;
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?ref=${flake_ref}&rev=${flake_rev}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}";
|
||||
flake_sha = vars.flake_sha;
|
||||
};
|
||||
};
|
||||
|
||||
resource."nomad_job"."matrix-mautrix-discord" = nomadJob {
|
||||
jobspec = ./matrix-mautrix-discord.hcl;
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?ref=${flake_ref}&rev=${flake_rev}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}";
|
||||
flake_sha = vars.flake_sha;
|
||||
};
|
||||
};
|
||||
|
||||
resource."nomad_job"."matrix-mautrix-facebook" = nomadJob {
|
||||
jobspec = ./matrix-mautrix-facebook.hcl;
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?ref=${flake_ref}&rev=${flake_rev}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}";
|
||||
flake_sha = vars.flake_sha;
|
||||
};
|
||||
};
|
||||
|
||||
resource."nomad_job"."matrix-mautrix-signal" = nomadJob {
|
||||
jobspec = ./matrix-mautrix-signal.hcl;
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?ref=${flake_ref}&rev=${flake_rev}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}";
|
||||
flake_sha = vars.flake_sha;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -176,8 +171,8 @@ in
|
|||
jobspec = ./matrix-heisenbridge.hcl;
|
||||
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?ref=${flake_ref}&rev=${flake_rev}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?ref=${vars.flake_ref}&rev=${vars.flake_rev}";
|
||||
flake_sha = vars.flake_sha;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
{ pkgs, elib, ... }:
|
||||
{ pkgs, elib, vars, ... }:
|
||||
let
|
||||
inherit (elib)
|
||||
nfsVolume
|
||||
nomadJob;
|
||||
|
||||
sharePrefix = "/mnt/kyle/infrastructure/syncthing";
|
||||
|
||||
flake_host = "";
|
||||
flake_rev = "";
|
||||
flake_ref = "";
|
||||
flake_sha = "";
|
||||
in
|
||||
{
|
||||
resource."nomad_volume"."syncthing-data" = nfsVolume {
|
||||
|
@ -39,8 +34,8 @@ in
|
|||
resource."nomad_job"."syncthing" = nomadJob {
|
||||
jobspec = ./job.hcl;
|
||||
vars = {
|
||||
flake_ref = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||||
flake_sha = flake_sha;
|
||||
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
||||
flake_sha = vars.flake_sha;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue