Update nix flake

This commit is contained in:
2025-01-07 18:32:10 +03:00
parent 08feb65d86
commit 4f19d006d0

View File

@@ -86,15 +86,15 @@
environment.systemPackages = [ self.packages.${pkgs.system}.photocatalog ]; environment.systemPackages = [ self.packages.${pkgs.system}.photocatalog ];
systemd.services = lib.mapAttrs (_: sync: systemd.services = lib.mapAttrs (_: sync:
{ {
name = "photocatalog_${sync.source}"; name = "photocatalog_${lib.replaceChars ["/"] ["-"] sync.source}";
after = [ "local-fs.target" ]; after = [ "local-fs.target" ];
path = [ path = [
self.packages.${pkgs.system}.photocatalog pkgs.photocatalog
]; ];
preStart = lib.mkIf (!sync.skipFullSync) """ preStart = if !sync.skipFullSync then """
mkdir -p ${sync.target} mkdir -p ${sync.target}
photocatalog -source ${sync.source} -target ${sync.target} photocatalog -source ${sync.source} -target ${sync.target}
"""; """ else null;
script = """ script = """
photocatalog -source ${sync.source} -target ${sync.target} -skip-full-sync -watch photocatalog -source ${sync.source} -target ${sync.target} -skip-full-sync -watch
"""; """;