startScript
This commit is contained in:
parent
75a7281dce
commit
bc527c096d
@ -9,25 +9,24 @@
|
|||||||
let
|
let
|
||||||
cfg = config.mj.services.immich;
|
cfg = config.mj.services.immich;
|
||||||
immich-package = pkgs.pkgs-unstable.immich;
|
immich-package = pkgs.pkgs-unstable.immich;
|
||||||
startScript = pkgs.writeShellApplication {
|
|
||||||
name = "immich-mj";
|
|
||||||
runtimeInputs = with pkgs; [
|
|
||||||
sudo
|
|
||||||
bindfs
|
|
||||||
util-linux
|
|
||||||
];
|
|
||||||
text = ''
|
|
||||||
${lib.concatLines (
|
|
||||||
lib.mapAttrsToList (name: srcpath: ''
|
|
||||||
#mkdir /data/${name}
|
|
||||||
#bindfs -u ${cfg.bindAsUser} ${srcpath} /data/${name}
|
|
||||||
'') cfg.bindPaths
|
|
||||||
)}
|
|
||||||
#exec sudo -u ${config.services.immich.user} -- ${lib.getExe immich-package}
|
|
||||||
exec ${lib.getExe immich-package}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
|
#startScript = pkgs.writeShellApplication {
|
||||||
|
# name = "immich-mj";
|
||||||
|
# runtimeInputs = with pkgs; [
|
||||||
|
# sudo
|
||||||
|
# bindfs
|
||||||
|
# util-linux
|
||||||
|
# ];
|
||||||
|
# text = ''
|
||||||
|
# ${lib.concatLines (
|
||||||
|
# lib.mapAttrsToList (name: srcpath: ''
|
||||||
|
# mkdir /data/${name}
|
||||||
|
# bindfs -u ${cfg.bindAsUser} ${srcpath} /data/${name}
|
||||||
|
# '') cfg.bindPaths
|
||||||
|
# )}
|
||||||
|
# exec sudo -u ${config.services.immich.user} -- ${lib.getExe immich-package}
|
||||||
|
# '';
|
||||||
|
#};
|
||||||
{
|
{
|
||||||
options.mj.services.immich = with lib.types; {
|
options.mj.services.immich = with lib.types; {
|
||||||
enable = lib.mkEnableOption "enable immich";
|
enable = lib.mkEnableOption "enable immich";
|
||||||
@ -59,7 +58,7 @@ in
|
|||||||
# testing
|
# testing
|
||||||
PrivateMounts = lib.mkForce false;
|
PrivateMounts = lib.mkForce false;
|
||||||
|
|
||||||
ExecStart = lib.mkForce ("!" + (lib.getExe startScript));
|
#ExecStart = lib.mkForce ("!" + (lib.getExe startScript));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user