Compare commits
No commits in common. "4c257346f877d1bdf1ebdaf7f92408e8a0986f61" and "9b7053d259f46bb7cb00507771264b2f0e9fbf34" have entirely different histories.
4c257346f8
...
9b7053d259
2 changed files with 13 additions and 46 deletions
|
@ -4,13 +4,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = false;
|
openFirewall = false;
|
||||||
config = {
|
config = {
|
||||||
logger = {
|
|
||||||
logs = {
|
|
||||||
homeassistant.helpers.llm = "debug";
|
|
||||||
homeassistant.components.conversation.chat_log = "debug";
|
|
||||||
homeassistant.components.openai_conversation = "debug";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
http = {
|
http = {
|
||||||
server_host = "127.0.0.1";
|
server_host = "127.0.0.1";
|
||||||
use_x_forwarded_for = true;
|
use_x_forwarded_for = true;
|
||||||
|
|
|
@ -65,23 +65,13 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
sops.secrets = {
|
sops.secrets."immich/oauth_client_secret" = { };
|
||||||
"immich/oauth_client_secret" = { };
|
|
||||||
"immich/auto_stack_apikey" = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.templates."immich/config.json" = {
|
sops.templates."immich/config.json" = {
|
||||||
owner = user; # Read when running
|
owner = user; # Read when running
|
||||||
content = builtins.toJSON jsonSettings;
|
content = builtins.toJSON jsonSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.templates."immich/auto_stack.env" = {
|
|
||||||
owner = "immich_auto_stack";
|
|
||||||
content = ''
|
|
||||||
API_KEY=${config.sops.placeholder."immich/auto_stack_apikey"};
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.mounts = [
|
systemd.mounts = [
|
||||||
{
|
{
|
||||||
what = "originals";
|
what = "originals";
|
||||||
|
@ -92,15 +82,15 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.timers.immich-auto-stack = {
|
# systemd.timers.immich-auto-stack = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
wantedBy = [ "immich-server.service" ];
|
# wantedBy = [ "immich-server.service" ];
|
||||||
timerConfig = {
|
# timerConfig = {
|
||||||
Unit = "immich-auto-stack.service";
|
# Unit = "immich-auto-stack.service";
|
||||||
OnCalendar = "*-*-* 4:00:00";
|
# OnCalendar = "*-*-* 4:00:00";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
|
#
|
||||||
systemd.services.immich-auto-stack =
|
systemd.services.immich-auto-stack =
|
||||||
let
|
let
|
||||||
python = pkgs.python3.withPackages (
|
python = pkgs.python3.withPackages (
|
||||||
|
@ -108,22 +98,12 @@ in
|
||||||
requests
|
requests
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
immich_auto_stack = pkgs.fetchurl {
|
|
||||||
url = "https://gist.github.com/xinyangli/39de5979e72d81af6fe9ddb7d1805df4";
|
|
||||||
hash = "sha256-izbzP+330tZUGPTfS3SdJnGS5uSn5uf8WmXd6ep8SQg=";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment = {
|
|
||||||
SKIP_MATCH_MISS = "true";
|
|
||||||
DRY_RUN = "false";
|
|
||||||
API_URL = "http://127.0.0.1:${toString config.services.immich.port}/api";
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${lib.getExe python} ${immich_auto_stack}";
|
ExecStart = "${lib.getExe python}";
|
||||||
EnvironmentFile = config.sops.templates."immich/auto_stack.env".path;
|
# TODO:
|
||||||
User = "immich_auto_stack";
|
environmentFile = "./.";
|
||||||
Group = "immich_auto_stack";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -157,12 +137,6 @@ in
|
||||||
"render"
|
"render"
|
||||||
];
|
];
|
||||||
|
|
||||||
users.groups.immich_auto_stack = { };
|
|
||||||
users.users.immich_auto_stack = {
|
|
||||||
isSystemUser = true;
|
|
||||||
group = "immich_auto_stack";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.immich.redis.host = "/run/redis-immich/redis.sock";
|
services.immich.redis.host = "/run/redis-immich/redis.sock";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue