This commit is contained in:
2025-08-13 20:50:46 +02:00
parent 7b5bcdb8b3
commit 69f6374d6d
5 changed files with 811 additions and 22 deletions

View File

@@ -1,20 +1,39 @@
{user, ...}: {
{
user,
pkgs,
...
}: {
services.syncthing = {
enable = true;
openDefaultPorts = true;
dataDir = "/home/${user}/.local/share/syncthing";
configDir = "/home/${user}/.config/syncthing";
openDefaultPorts = pkgs.stdenv.isLinux;
dataDir =
if pkgs.stdenv.isDarwin
then "/Users/${user}/.local/share/syncthing"
else "/home/${user}/.local/share/syncthing";
configDir =
if pkgs.stdenv.isDarwin
then "/Users/${user}/.config/syncthing"
else "/home/${user}/.config/syncthing";
user = "${user}";
group = "users";
group =
if pkgs.stdenv.isDarwin
then "staff"
else "users";
guiAddress = "0.0.0.0:8384";
overrideFolders = true;
overrideDevices = true;
settings = {
devices = {};
devices = {
"jason" = {id = "42II2VO-QYPJG26-ZS3MB2I-AOPVZ67-JJNSE76-U54CO5Y-634A5OG-ECU4YQA";};
"tahani" = {id = "6B7OZZF-TEAMUGO-FBOELXP-Z4OY7EU-5ZHLB5T-V6Z3UDB-Q2DYR43-QBYW6QM";};
};
folders = {
"Projects" = {
path = "/home/${user}/Projects";
path =
if pkgs.stdenv.isDarwin
then "/Users/${user}/Projects"
else "/home/${user}/Projects";
devices = [];
};
};