mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-27 18:46:13 +01:00
47 lines
1 KiB
Nix
47 lines
1 KiB
Nix
|
{ elib, ... }:
|
||
|
let
|
||
|
inherit (elib)
|
||
|
nfsVolume
|
||
|
nomadJob;
|
||
|
|
||
|
flake_host = "";
|
||
|
flake_rev = "";
|
||
|
flake_ref = "";
|
||
|
flake_sha = "";
|
||
|
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 = {
|
||
|
flake_ref = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||
|
flake_sha = flake_sha;
|
||
|
};
|
||
|
};
|
||
|
}
|