tsuki: update immich service
This commit is contained in:
parent
9001f4b643
commit
25c4539a53
1 changed files with 6 additions and 5 deletions
|
@ -7,23 +7,24 @@
|
||||||
services.immich-backup = let
|
services.immich-backup = let
|
||||||
homeDir = "/home/notoh";
|
homeDir = "/home/notoh";
|
||||||
in {
|
in {
|
||||||
enable = true;
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
description = "immich backup service";
|
|
||||||
script = ''
|
script = ''
|
||||||
${lib.getExe pkgs.immich-cli} upload --album-name "screenshots" --recursive ${homeDir}/Pictures/screenshots
|
${lib.getExe pkgs.immich-cli} upload --album-name "desktop screenshots" --recursive ${homeDir}/Pictures/screenshots
|
||||||
'';
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "notoh";
|
||||||
|
};
|
||||||
environment = {
|
environment = {
|
||||||
IMMICH_CONFIG_DIR = "${homeDir}/.config/immich";
|
IMMICH_CONFIG_DIR = "${homeDir}/.config/immich";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
timers.immich-backup = {
|
timers.immich-backup = {
|
||||||
enable = true;
|
|
||||||
wantedBy = ["timers.target"];
|
wantedBy = ["timers.target"];
|
||||||
description = "immich backup timer";
|
description = "immich backup timer";
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "*-*-* 00:00:00";
|
OnCalendar = "*-*-* 00:00:00";
|
||||||
Persistent = true;
|
Persistent = true;
|
||||||
|
Unit = "immich-backup.service";
|
||||||
};
|
};
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
Description = "immich backup timer";
|
Description = "immich backup timer";
|
||||||
|
|
Loading…
Add table
Reference in a new issue