nixos/hosts/zeta/syncthing.nix

32 lines
806 B
Nix
Raw Permalink Normal View History

2024-05-10 20:34:38 +02:00
{
config,
secrets,
...
}: {
# NOTE: General syncthing configuration is in modules/base/syncthing.nix.
services.syncthing = {
enable = true;
# https://wiki.nixos.org/wiki/Syncthing#Declarative_node_IDs
cert = config.age.secrets.syncthing-zeta-cert.path;
key = config.age.secrets.syncthing-zeta-key.path;
settings = {
devices = secrets.modules.syncthing.zeta.devices;
folders = secrets.modules.syncthing.zeta.folders;
};
};
age.secrets.syncthing-zeta-cert = {
file = "${secrets}/secrets/syncthing-zeta-cert.age";
mode = "400";
owner = "caspervk";
group = "syncthing";
};
age.secrets.syncthing-zeta-key = {
file = "${secrets}/secrets/syncthing-zeta-key.age";
mode = "400";
owner = "caspervk";
group = "syncthing";
};
}