fixed syncthing paths with server check

This commit is contained in:
Danilo Reyes 2025-07-22 11:29:06 -06:00
parent 98deb3846c
commit a8bb053d8b

View File

@ -1,4 +1,4 @@
{ config, ... }:
{ config, lib, ... }:
let
inherit (config.networking) hostName;
in
@ -42,23 +42,24 @@ in
galaxy.id = "UAZ5YDV-YUFBXOY-QMS6S6R-WPIIKZI-4OPPW5L-G4OVUPO-YW5KFYY-YASRAAV";
phone.id = "OSOX2VZ-AO2SA3C-BFB6NKF-K6CR6WX-64TDBKW-RRKEKJ4-FKZE5CV-J2RGJAJ";
};
folders = {
cache = {
path = "~/Downloads/cache/";
ignorePerms = false;
devices = [
"galaxy"
"phone"
];
};
commissions = {
path = "~/Pictures/Art/4me/";
folders =
let
isMainHost = hostName == "workstation";
mkMobile =
path:
lib.mkIf isMainHost {
inherit path;
ignorePerms = false;
devices = [
"galaxy"
"phone"
];
};
in
{
cache = mkMobile "~/Downloads/cache/";
friends = mkMobile "~/Pictures/Art/Friends/";
forme = mkMobile "~/Pictures/Art/4me/";
gdl = {
path = "~/.config/jawz/";
ignorePerms = false;
@ -72,7 +73,7 @@ in
path = "~/.librewolf/";
ignorePerms = false;
copyOwnershipFromParent = true;
type = if config.networking.hostName == "workstation" then "sendonly" else "receiveonly";
type = if isMainHost then "sendonly" else "receiveonly";
devices = [
"server"
"miniserver"
@ -80,11 +81,13 @@ in
];
};
notes = {
path = "~/Documents/";
path = "~/Documents/Notes";
ignorePerms = false;
devices = [
"galaxy"
"phone"
"server"
"miniserver"
];
};
};