Files
nixos-haus/hosts/puter/syncthing.nix

53 lines
1.7 KiB
Nix

{
config,
pkgs,
...
}: {
services.syncthing = {
enable = true;
openDefaultPorts = true;
dataDir = "/home/user/Documents/syncthing/";
configDir = "/home/user/.config/syncthing";
user = "user";
# Optional: GUI credentials (can be set in the browser instead if you don't want plaintext credentials in your configuration.nix file)
# or the password hash can be generated with "syncthing generate --config <path> --gui-password=<password>"
settings.gui = {
user = "user";
password = "user";
};
settings = {
devices = {
"phone" = {
id = "XZUDBP7-BF6GYMX-WWWLMLG-WUXSSXL-Y7CX7NO-56HEIIO-RZGBXJ5-4YWW2AF";
};
"bigbox" = {
id = "RFFXZJI-HJTEDCU-M7MU3SW-M7DJK4U-MESRKYA-OGHYOSG-KNZO7JB-6LQ5VAE";
};
"cloudhaus" = {
id = "B3WJKAE-KJFKO7G-CKOOLCO-EDC2AFV-EP5DB52-HWPLOMQ-6M5VJON-JBQEXAJ";
};
};
folders = {
"brain_zero" = {
# Name of folder in Syncthing, also the folder ID
path = "/home/user/brain_zero/"; # Which folder to add to Syncthing
devices = ["phone" "cloudhaus"]; # Which devices to share the folder with
ignores = [".obsidian/workspace-mobile.json" ".obsidian/workspace.json"];
};
"brain_zero_readonly" = {
# Name of folder in Syncthing, also the folder ID
path = "/home/user/brain_zero/"; # Which folder to add to Syncthing
type = "sendonly";
devices = ["bigbox"]; # Which devices to share the folder with
};
#"puter_home" = {
# path = "/home/user/";
# type = "sendonly";
# devices = ["bigbox"];
# ignores = [".*" "!.ssh/"];
#};
};
};
};
}