mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-27 18:46:13 +01:00
47 lines
1.3 KiB
Nix
47 lines
1.3 KiB
Nix
|
{ pkgs, elib, ... }:
|
||
|
let
|
||
|
inherit (elib)
|
||
|
nfsVolume
|
||
|
nomadJob;
|
||
|
|
||
|
sharePrefix = "/mnt/kyle/infrastructure/syncthing";
|
||
|
|
||
|
flake_host = "";
|
||
|
flake_rev = "";
|
||
|
flake_ref = "";
|
||
|
flake_sha = "";
|
||
|
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 + "/data";
|
||
|
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 + "/data";
|
||
|
mount_flags = [ "hard" "vers=4.2" "rsize=131072" "wsize=131072" "async" ];
|
||
|
};
|
||
|
|
||
|
resource."nomad_job"."syncthing" = nomadJob {
|
||
|
jobspec = ./job.hcl;
|
||
|
vars = {
|
||
|
flake_ref = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||
|
flake_sha = flake_sha;
|
||
|
};
|
||
|
};
|
||
|
}
|