diff --git a/nixos/newton/configuration.nix b/nixos/newton/configuration.nix index 85b7609..6a1f0f4 100644 --- a/nixos/newton/configuration.nix +++ b/nixos/newton/configuration.nix @@ -3,9 +3,10 @@ imports = [ ./hardware-configuration.nix ./disks.nix + ./network.nix + ./syncthing.nix #../modules/backup.nix ../modules/compression.nix - ../modules/development.nix ../modules/docker.nix ../modules/networkdecrypt.nix ../modules/service/mumble-server.nix diff --git a/nixos/newton/syncthing.nix b/nixos/newton/syncthing.nix new file mode 100644 index 0000000..d9135e4 --- /dev/null +++ b/nixos/newton/syncthing.nix @@ -0,0 +1,29 @@ +{ 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; + extraOptions = { + options = { + localAnnounceEnabled = false; + }; + }; + devices = { + "thinkman" = { + id = "KXSCPX3-JCCFZM4-S2LQZZL-3AM6WRL-IPNWVG2-IB5FEDJ-YYFUIRR-VMDO3AL"; + }; + }; + folders = { + "Music" = { + path = "music"; + devices = [ "thinkman" ]; + }; + }; + }; +}