nixos-config/machines/chungus/media-syncthing.nix
2024-10-09 21:27:44 +09:00

91 lines
1.8 KiB
Nix

{
config,
pkgs,
lib,
...
}:
{
healthchecks.http.syncthing-gui = {
url = config.services.syncthing.guiAddress;
expectedContent = "syncthing";
};
healthchecks.closed.retiolum.ports.syncthing-gui = [ 8384 ];
services.syncthing = {
enable = true;
overrideFolders = true;
user = "media";
group = "media";
settings.folders = {
oscar_cpap = {
enable = true;
path = "/syncthing/oscar_cpap";
};
logseq = {
enable = true;
path = "/syncthing/logseq";
};
art = {
enable = true;
path = "/syncthing/art";
};
private = {
enable = true;
path = "/syncthing/private";
};
password-store = {
enable = true;
path = "/syncthing/password-store";
};
desktop = {
enable = true;
path = "/syncthing/desktop";
};
finance = {
enable = true;
path = "/syncthing/finance";
};
fotos = {
enable = true;
path = "/syncthing/fotos";
};
books = {
enable = true;
path = "/syncthing/books";
};
lost-fotos = {
enable = true;
type = "sendonly";
path = "/syncthing/lost-fotos.ct";
};
music-projects = {
enable = true;
path = "/syncthing/music-projects";
};
audiobooks = {
enable = true;
type = "sendonly";
path = "/media/audio-books";
};
lectures = {
enable = true;
type = "sendonly";
path = "/media/lectures";
};
flix = {
enable = true;
type = "sendonly";
path = "/syncthing/flix";
};
};
};
services.permown."/syncthing" = {
owner = "media";
group = "media";
directory-mode = "755";
file-mode = "755";
};
}