feat(syncthing): Device sydpc

This commit is contained in:
Madeleine Sydney
2025-04-01 06:58:34 -06:00
parent cf591c1e2d
commit 5003eba1fc
3 changed files with 18 additions and 10 deletions

View File

@@ -4,26 +4,28 @@ let cfg = config.sydnix.deertopia.syncthing;
in {
options.sydnix.deertopia.syncthing.enable =
lib.mkEnableOption "Syncthing, à la Deertopia";
config = lib.mkIf cfg.enable {
sydnix.syncthing = {
enable = true;
includeDevices = [
"guix-rebound"
"sydpc"
"nixos-testbed"
];
directories = {
"Music" = {
path = "/persist/vault/jellyfin/Music";
devices = [ "guix-rebound" ];
ignorePerms = true;
devices = [
"sydpc"
];
};
"org" = {
path = "/persist/deertopia.net/dav/org";
devices = [
"guix-rebound"
"nixos-testbed"
];
ignorePerms = true;
devices = [
"sydpc"
];
};
};
};

View File

@@ -23,6 +23,8 @@ in {
"OO6XGGQ-SORH6XW-YEMN3T3-CSW5QOO-2IRB2QE-NZOL6JE-RAV36GS-WZXXLQV";
"nixos-testbed".id =
"BO3AESA-LBKMZW7-QFE7NTT-GF62DOA-PYUACYU-HNTNYI5-EMF6PAN-TR6YHAL";
"sydpc".id =
"XROSJRC-SLAAOTG-L3HQ5TT-WAKL5PJ-QAIFJEY-FUG5AAO-5ACBTA3-MGQQFQI";
};
readOnly = true;
description = ''
@@ -50,6 +52,8 @@ in {
services.syncthing = {
enable = true;
openDefaultPorts = true;
overrideDevices = true;
overrideFolders = true;
settings = {
gui = {
# TODO: Figure out how to read credentials from a file.
@@ -57,8 +61,6 @@ in {
user = "lain";
password = "my-awesome-password";
};
overrideDevices = true;
overrideFolders = true;
devices =
lib.filterAttrs
(k: _v: builtins.elem k cfg.includeDevices)