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>
64 lines
1.5 KiB
Nix
64 lines
1.5 KiB
Nix
{
|
|
config',
|
|
pkgs,
|
|
elib,
|
|
vars,
|
|
tflib,
|
|
...
|
|
}: let
|
|
inherit
|
|
(elib)
|
|
nfsVolume
|
|
nomadJob
|
|
;
|
|
inherit
|
|
(tflib)
|
|
tf
|
|
;
|
|
|
|
sharePrefix = "/mnt/kyle/infrastructure/syncthing";
|
|
in {
|
|
resource."nomad_volume"."syncthing-data" = nfsVolume {
|
|
access_mode = "single-node-writer";
|
|
volume_name = "syncthing-data";
|
|
server = "blowhole.hosts.in.redalder.org";
|
|
share = sharePrefix + "/data";
|
|
mount_flags = ["hard" "vers=4.2" "rsize=131072" "wsize=131072" "async"];
|
|
};
|
|
|
|
resource."nomad_volume"."syncthing-storage" = nfsVolume {
|
|
access_mode = "single-node-writer";
|
|
volume_name = "syncthing-storage";
|
|
server = "blowhole.hosts.in.redalder.org";
|
|
share = sharePrefix + "/storage";
|
|
mount_flags = ["hard" "vers=4.2" "rsize=131072" "wsize=131072" "async"];
|
|
};
|
|
|
|
resource."nomad_volume"."syncthing-config" = nfsVolume {
|
|
access_mode = "single-node-writer";
|
|
volume_name = "syncthing-config";
|
|
server = "blowhole.hosts.in.redalder.org";
|
|
share = sharePrefix + "/config";
|
|
mount_flags = ["hard" "vers=4.2" "rsize=131072" "wsize=131072" "async"];
|
|
};
|
|
|
|
imports = [
|
|
(elib.buildNixNGSystem {
|
|
name = "syncthing";
|
|
hosts = [
|
|
"blowhole.hosts.in.redalder.org"
|
|
];
|
|
})
|
|
];
|
|
resource."nomad_job"."syncthing" = nomadJob {
|
|
jobspec = ./job.hcl;
|
|
vars = {
|
|
flake_ref = "unused";
|
|
flake_sha = "unused";
|
|
store_path = tf "data.external.nixng-system-syncthing.result.out";
|
|
};
|
|
depends_on = [
|
|
"terraform_data.nixng-system-syncthing-copy"
|
|
];
|
|
};
|
|
}
|