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