Skip to content

Commit

Permalink
Setup Immich
Browse files Browse the repository at this point in the history
  • Loading branch information
peterablehmann committed Jan 15, 2025
1 parent 8aa2355 commit 4cddb9b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
35 changes: 35 additions & 0 deletions modules/immich.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ config
, ...
}:
let
domain = "immich.xnee.net";
in
{
security.acme.certs."${domain}" = { };
networking.domains.subDomains.${domain} = { };

services.nginx.virtualHosts."${domain}" = {
useACMEHost = domain;
kTLS = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://${config.services.immich.host}:${builtins.toString config.services.immich.port}";
};
};

services.immich = {
enable = true;
mediaLocation = "/var/lib/immich";
host = "::1";
port = 2283;
redis.enable = true;
database = {
enable = true;
createDB = true;
};
settings.server.externalDomain = "https://${domain}";
machine-learning.enable = true;
};

backup.paths = [ config.services.immich.mediaLocation ];
}
18 changes: 18 additions & 0 deletions nodes/heptifili/disko.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,24 @@
};
};
};
syncthing = {
device = "/dev/vdd";
type = "disk";
content = {
type = "gpt";
partitions = {
data = {
label = "IMMICH";
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = config.services.syncthing.dataDir;
};
};
};
};
};
};
};
}

0 comments on commit 4cddb9b

Please sign in to comment.