From 4f19d006d0ec6e4c450a2cbc76f7ba57fcec63a6 Mon Sep 17 00:00:00 2001 From: derfenix Date: Tue, 7 Jan 2025 18:32:10 +0300 Subject: [PATCH] Update nix flake --- flake.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 7beebd5..e4efeb8 100644 --- a/flake.nix +++ b/flake.nix @@ -86,15 +86,15 @@ environment.systemPackages = [ self.packages.${pkgs.system}.photocatalog ]; systemd.services = lib.mapAttrs (_: sync: { - name = "photocatalog_${sync.source}"; + name = "photocatalog_${lib.replaceChars ["/"] ["-"] sync.source}"; after = [ "local-fs.target" ]; path = [ - self.packages.${pkgs.system}.photocatalog + pkgs.photocatalog ]; - preStart = lib.mkIf (!sync.skipFullSync) """ + preStart = if !sync.skipFullSync then """ mkdir -p ${sync.target} photocatalog -source ${sync.source} -target ${sync.target} - """; + """ else null; script = """ photocatalog -source ${sync.source} -target ${sync.target} -skip-full-sync -watch """;