From 5c88d557d5cb4a0f7bc0ab37f0a52a95fad01464 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 9 Nov 2022 22:19:39 +0100 Subject: [PATCH] serverle-syncthing: deprecate docker and switch to nixosModule --- nixos/serverle/syncthing.nix | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 nixos/serverle/syncthing.nix diff --git a/nixos/serverle/syncthing.nix b/nixos/serverle/syncthing.nix new file mode 100644 index 0000000..2f32e99 --- /dev/null +++ b/nixos/serverle/syncthing.nix @@ -0,0 +1,68 @@ +{ config, ... }: +{ + sops.secrets."syncthing/key" = { }; + sops.secrets."syncthing/cert" = { }; + + services.syncthing = { + enable = true; + openDefaultPorts = true; + dataDir = "/srv/data"; + key = config.sops.secrets."syncthing/key".path; + cert = config.sops.secrets."syncthing/cert".path; + devices = { + "thinkman" = { + id = "KXSCPX3-JCCFZM4-S2LQZZL-3AM6WRL-IPNWVG2-IB5FEDJ-YYFUIRR-VMDO3AL"; + }; + "birdman" = { + id = "34Z4J7W-MJIODUD-J6LDJY6-QILQLLB-CJ4GR7K-7TJM2K3-R7SIPRV-XQO5TAI"; + }; + "newton" = { + id = "5RISLVO-U5A5A7N-5BRYF2X-FTPNAI6-LOQDIMP-MVSM663-6W6VYBL-L7626A6"; + }; + }; + folders = { + "Computer" = { + id = "djdxo-1akub"; + path = "/srv/data/computer"; + devices = [ + "thinkman" + "birdman" + "newton" + ]; + }; + "Phone" = { + id = "4hds7-gpypp"; + path = "/srv/data/phone"; + devices = [ + "thinkman" + "birdman" + "newton" + ]; + }; + "Music" = { + id = "mphdq-n6q7y"; + path = "/srv/data/music"; + devices = [ + "thinkman" + "birdman" + "newton" + ]; + }; + "Pictures" = { + id = "cujyo-yiabu"; + path = "/srv/data/photos"; + devices = [ + "thinkman" + "newton" + ]; + }; + "Aria2" = { + id = "jjnzq-pgzua"; + path = "/srv/data/tmp/aria2"; + devices = [ + "thinkman" + ]; + }; + }; + }; +}