mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-04 22:14:58 +01:00
4a29b6d8d3
Signed-off-by: magic_rb <magic_rb@redalder.org>
84 lines
1.9 KiB
Nix
84 lines
1.9 KiB
Nix
{
|
|
config,
|
|
elib,
|
|
tflib,
|
|
vars,
|
|
config',
|
|
...
|
|
}: let
|
|
inherit
|
|
(elib)
|
|
nfsVolume
|
|
nomadJob
|
|
;
|
|
inherit
|
|
(tflib)
|
|
tf
|
|
;
|
|
in {
|
|
resource."nomad_volume"."hydra-db" = nfsVolume {
|
|
volume_name = "hydra-db";
|
|
access_mode = "single-node-writer";
|
|
server = "blowhole.hosts.in.redalder.org";
|
|
share = "/mnt/jimmy/infrastructure/hydra/postgresql";
|
|
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 = "/mnt/kyle/infrastructure/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/cluster/hydra" {
|
|
capabilities = ["read"]
|
|
}
|
|
'';
|
|
};
|
|
|
|
imports = [
|
|
(elib.buildNixNGSystem {
|
|
name = "hydra";
|
|
hosts = [
|
|
"blowhole.hosts.in.redalder.org"
|
|
];
|
|
})
|
|
(elib.buildNixNGSystem {
|
|
name = "hydraPostgreSQL";
|
|
hosts = [
|
|
"blowhole.hosts.in.redalder.org"
|
|
];
|
|
})
|
|
];
|
|
|
|
resource."nomad_job"."hydra" = nomadJob {
|
|
jobspec = ./job.hcl;
|
|
|
|
vars = {
|
|
flake_ref = "unused";
|
|
flake_sha = "unused";
|
|
store_path = builtins.toJSON {
|
|
hydra = tf "data.external.nixng-system-hydra.result.out";
|
|
postgresql = tf "data.external.nixng-system-hydraPostgreSQL.result.out";
|
|
};
|
|
};
|
|
|
|
depends_on = [
|
|
"terraform_data.nixng-system-hydra-copy"
|
|
"terraform_data.nixng-system-hydraPostgreSQL-copy"
|
|
];
|
|
};
|
|
}
|