nixos/hosts/omega/syncthing.nix

32 lines
814 B
Nix
Raw 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-omega-cert.path;
key = config.age.secrets.syncthing-omega-key.path;
settings = {
devices = secrets.modules.syncthing.omega.devices;
folders = secrets.modules.syncthing.omega.folders;
};
};
age.secrets.syncthing-omega-cert = {
file = "${secrets}/secrets/syncthing-omega-cert.age";
mode = "400";
owner = "caspervk";
group = "syncthing";
};
age.secrets.syncthing-omega-key = {
file = "${secrets}/secrets/syncthing-omega-key.age";
mode = "400";
owner = "caspervk";
group = "syncthing";
};
}