2023-06-19 00:41:49 +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";
|
|
|
|
share = "/var/nfs/gitea-db";
|
|
|
|
mount_flags = [ "nfsvers=3" "nolock" "async" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
resource."nomad_volume"."gitea-data" = nfsVolume {
|
|
|
|
volume_name = "gitea-data";
|
|
|
|
access_mode = "single-node-writer";
|
|
|
|
server = "blowhole.hosts.in.redalder.org";
|
|
|
|
share = "/var/nfs/gitea-data";
|
|
|
|
mount_flags = [ "nfsvers=3" "nolock" "async" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
resource."vault_policy"."gitea-policy" = {
|
|
|
|
name = "gitea-policy";
|
|
|
|
policy = ''
|
|
|
|
path "kv/data/gitea" {
|
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
resource."nomad_job"."gitea" = nomadJob {
|
|
|
|
jobspec = ./job.hcl;
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|