mirror of
https://github.com/derfenix/photocatalog.git
synced 2026-03-11 20:46:24 +03:00
Update nix flake
This commit is contained in:
10
flake.nix
10
flake.nix
@@ -77,6 +77,13 @@
|
|||||||
Do not make full sync.
|
Do not make full sync.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
mode = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "hardlink";
|
||||||
|
description = ''
|
||||||
|
Organization mode, one of [ hardlink symlink move copy ].
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
@@ -95,8 +102,7 @@
|
|||||||
mkdir -p ${sync.target}
|
mkdir -p ${sync.target}
|
||||||
photocatalog -source ${sync.source} -target ${sync.target}
|
photocatalog -source ${sync.source} -target ${sync.target}
|
||||||
'' else null;
|
'' else null;
|
||||||
script = "photocatalog";
|
script = "photocatalog -source ${sync.source} -target ${sync.target} -skip-full-sync -watch -mode ${sync.mode}";
|
||||||
scriptArgs = "-source ${sync.source} -target ${sync.target} -skip-full-sync -watch";
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type="simple";
|
Type="simple";
|
||||||
Restart="no";
|
Restart="no";
|
||||||
|
|||||||
4
main.go
4
main.go
@@ -67,6 +67,10 @@ func loadCfg() application.Config {
|
|||||||
})
|
})
|
||||||
|
|
||||||
flag.Func("mode", "Organizing mode", func(s string) error {
|
flag.Func("mode", "Organizing mode", func(s string) error {
|
||||||
|
if s == "" {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
cfg.Mode = application.Mode(s)
|
cfg.Mode = application.Mode(s)
|
||||||
|
|
||||||
if !slices.Contains(application.SupportedModes, cfg.Mode) {
|
if !slices.Contains(application.SupportedModes, cfg.Mode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user