mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-27 18:46:13 +01:00
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
|
{ config, elib, ... }:
|
||
|
let
|
||
|
inherit (elib)
|
||
|
nfsVolume
|
||
|
nomadJob;
|
||
|
|
||
|
flake_host = "";
|
||
|
flake_rev = "";
|
||
|
flake_ref = "";
|
||
|
flake_sha = "";
|
||
|
in
|
||
|
{
|
||
|
resource."nomad_volume"."hydra-db" = nfsVolume {
|
||
|
volume_name = "hydra-db";
|
||
|
access_mode = "single-node-writer";
|
||
|
server = "blowhole.hosts.in.redalder.org";
|
||
|
share = "/var/nfs/hydra-db";
|
||
|
mount_flags = [ "nfsvers=3" "hard" "async" ];
|
||
|
};
|
||
|
|
||
|
resource."nomad_volume"."hydra-data" = nfsVolume {
|
||
|
volume_name = "hydra-data";
|
||
|
access_mode = "single-node-writer";
|
||
|
server = "blowhole.hosts.in.redalder.org";
|
||
|
share = "/var/nfs/hydra-data";
|
||
|
mount_flags = [ "nfsvers=3" "hard" "async" ];
|
||
|
};
|
||
|
|
||
|
resource."nomad_volume"."hydra-nix" = nfsVolume {
|
||
|
volume_name = "hydra-nix";
|
||
|
access_mode = "single-node-writer";
|
||
|
server = "blowhole.hosts.in.redalder.org";
|
||
|
share = "/var/nfs/hydra-nix";
|
||
|
mount_flags = [ "nfsvers=3" "hard" "async" ];
|
||
|
};
|
||
|
|
||
|
resource."vault_policy"."hydra-policy" = {
|
||
|
name = "hydra-policy";
|
||
|
policy = ''
|
||
|
path "kv/data/hydra" {
|
||
|
capabilities = ["read"]
|
||
|
}
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
resource."nomad_job"."hydra" = nomadJob {
|
||
|
jobspec = ./job.hcl;
|
||
|
|
||
|
vars = {
|
||
|
flake_ref = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||
|
flake_sha = flake_sha;
|
||
|
};
|
||
|
};
|
||
|
}
|