From 41e55122b110b73bcfd2b82dc78dae8bbc52ce5a Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sat, 4 May 2024 21:13:35 +0200 Subject: [PATCH] add syncthing --- modules/services/syncthing.nix | 14 +++++++++----- systems/mini-pc/configuration.nix | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/services/syncthing.nix b/modules/services/syncthing.nix index e270083..a6a272b 100644 --- a/modules/services/syncthing.nix +++ b/modules/services/syncthing.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, vars, ... }: +{ config, pkgs, lib, ... }: let basePath = "/synced"; in @@ -34,6 +34,10 @@ in id = "HZUUQEQ-JOKYHTU-AVFVC3U-7KUAXVC-QY3OJTF-HGU7RZ3-5HA5TOE-VT4FNQB"; addresses = [ "tcp://192.168.0.6" "tcp://192.168.2.1" ]; }; + server = { + id = "HZUUQEQ-JOKYHTU-AVFVC3U-7KUAXVC-QY3OJTF-HGU7RZ3-5HA5TOE-VT4FNQB"; + addresses = [ "tcp://192.168.0.10" "tcp://192.168.2.1" ]; + }; laptop = { id = "5T6Y3WO-FOQYYFQ-5MLNDSZ-7APIDUG-6KM2ZZM-RTRXMWX-MCZKLMH-BYNDJAQ"; addresses = [ "tcp://192.168.2.22" ]; @@ -42,23 +46,23 @@ in folders."${basePath}/default" = { id = "default"; - devices = [ "kop-pc" "server" "laptop" ]; + devices = [ "kop-pc" "server" "laptop" "mini-pc" ]; ignorePerms = false; }; folders."${basePath}/books" = { id = "books"; - devices = [ "kop-pc" "server" "laptop" ]; + devices = [ "kop-pc" "server" "laptop" "mini-pc" ]; }; folders."${basePath}/fh" = { id = "fh"; - devices = [ "kop-pc" "server" "laptop" ]; + devices = [ "kop-pc" "server" "laptop" "mini-pc" ]; }; folders."${basePath}/work_drive" = { id = "work_drive"; - devices = [ "kop-pc" "server" "laptop" ]; + devices = [ "kop-pc" "server" "laptop" "mini-pc" ]; }; }; }; diff --git a/systems/mini-pc/configuration.nix b/systems/mini-pc/configuration.nix index 0b04b3c..1271869 100644 --- a/systems/mini-pc/configuration.nix +++ b/systems/mini-pc/configuration.nix @@ -9,6 +9,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ../../modules/services/ssh.nix + ../../modules/services/syncthing.nix ]; mainUser.layout = "de";