fix immich and syncthing
This commit is contained in:
@@ -74,8 +74,8 @@
|
||||
};
|
||||
|
||||
holocron = {
|
||||
# syncthing.enable = false;
|
||||
# copyparty.enable = false;
|
||||
syncthing.enable = false;
|
||||
ensure_perms.enable = false;
|
||||
zfs.enable = true;
|
||||
smb.enable = true;
|
||||
|
||||
@@ -10,12 +10,11 @@
|
||||
./nfs
|
||||
./smb
|
||||
./zfs
|
||||
# ./syncthing
|
||||
# ./copyparty
|
||||
./syncthing
|
||||
# ./copyparty
|
||||
./perms
|
||||
];
|
||||
|
||||
# define the groups used for backups and archives
|
||||
users.groups.archives = {gid = 727;};
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
service = "syncthing";
|
||||
cfg = config.holocron.${service};
|
||||
sec = config.sops.secrets;
|
||||
url = "syncthing.${config.netowrking.}.lan";
|
||||
url = "syncthing.${config.networking.hostName}.blakedheld.xyz";
|
||||
homelab = config.homelab;
|
||||
in {
|
||||
options.holocron.${service} = {
|
||||
|
||||
@@ -34,7 +34,7 @@ in {
|
||||
autodetect = true;
|
||||
defaults.monitored = "-a -o on -s (S/../.././05|L/../01/./05)";
|
||||
notifications = {
|
||||
test = false;
|
||||
test = true;
|
||||
mail = {
|
||||
enable = true;
|
||||
recipient = "blake";
|
||||
|
||||
@@ -81,29 +81,30 @@ in {
|
||||
#settings.server.externalDomain = "https://photos.blakedheld.xyz";
|
||||
};
|
||||
|
||||
systemd.services.immich_library_sync = {
|
||||
description = "twice daily sync immich library to holocron";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
|
||||
script = ''
|
||||
${pkgs.rsync}/bin/rsync -avh --info=progress2 --delete \
|
||||
--chown=blake:blake \
|
||||
/var/lib/immich/library/blake/ \
|
||||
/holocron/users/blake/pictures/library/
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.timers.immich_library_sync = {
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnBootSec = "5m";
|
||||
OnUnitActiveSec = "12h";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
# too lazy to add an option, this is on the storage pool now anyway
|
||||
# systemd.services.immich_library_sync = {
|
||||
# description = "twice daily sync immich library to holocron";
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# User = "root";
|
||||
# };
|
||||
#
|
||||
# script = ''
|
||||
# ${pkgs.rsync}/bin/rsync -avh --info=progress2 --delete \
|
||||
# --chown=blake:blake \
|
||||
# /var/lib/immich/library/blake/ \
|
||||
# /holocron/users/blake/pictures/library/
|
||||
# '';
|
||||
# };
|
||||
#
|
||||
# systemd.timers.immich_library_sync = {
|
||||
# wantedBy = ["timers.target"];
|
||||
# timerConfig = {
|
||||
# OnBootSec = "5m";
|
||||
# OnUnitActiveSec = "12h";
|
||||
# Persistent = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
# override umask to make permissions work out
|
||||
# systemd.services."${toString service}-server".serviceConfig = {
|
||||
|
||||
Reference in New Issue
Block a user