2023-06-29 18:59:38 +02:00
|
|
|
{ elib, vars, ... }:
|
2023-06-15 23:09:40 +02:00
|
|
|
let
|
|
|
|
inherit (elib)
|
|
|
|
nfsVolume
|
|
|
|
nomadJob;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
resource."nomad_volume"."gitea-db" = nfsVolume {
|
|
|
|
volume_name = "gitea-db";
|
|
|
|
access_mode = "single-node-writer";
|
|
|
|
server = "blowhole.hosts.in.redalder.org";
|
2024-01-18 21:10:13 +01:00
|
|
|
share = "/mnt/kyle/infrastructure/gitea/database";
|
|
|
|
mount_flags = [ "hard" "vers=4.2" "rsize=16384" "wsize=16384" "async" ];
|
2023-06-15 23:09:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
resource."nomad_volume"."gitea-data" = nfsVolume {
|
|
|
|
volume_name = "gitea-data";
|
|
|
|
access_mode = "single-node-writer";
|
|
|
|
server = "blowhole.hosts.in.redalder.org";
|
2024-01-18 21:10:13 +01:00
|
|
|
share = "/mnt/kyle/infrastructure/gitea/data";
|
|
|
|
mount_flags = [ "hard" "vers=4.2" "rsize=16384" "wsize=16384" "async" ];
|
2023-06-15 23:09:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
resource."vault_policy"."gitea-policy" = {
|
|
|
|
name = "gitea-policy";
|
|
|
|
policy = ''
|
2024-01-18 21:23:18 +01:00
|
|
|
path "kv/data/cluster/gitea/gitea" {
|
2023-06-15 23:09:40 +02:00
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
resource."nomad_job"."gitea" = nomadJob {
|
|
|
|
jobspec = ./job.hcl;
|
2023-06-29 18:59:38 +02:00
|
|
|
|
2023-06-15 23:09:40 +02:00
|
|
|
vars = {
|
2023-06-19 00:41:49 +02:00
|
|
|
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
|
|
|
flake_sha = vars.flake_sha;
|
2023-06-15 23:09:40 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|