mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
better services
This commit is contained in:
parent
29b35ab058
commit
518ab13797
10 changed files with 189 additions and 123 deletions
|
|
@ -1,25 +1,33 @@
|
|||
{ config, ... }:
|
||||
{ config }:
|
||||
let
|
||||
cfg = config.services.immich;
|
||||
link = config.local.links.immich;
|
||||
in
|
||||
{
|
||||
sops.secrets.immich.owner = cfg.user;
|
||||
|
||||
local.links.immich = { };
|
||||
systemd.tmpfiles.rules = [ "d ${cfg.mediaLocation} - ${cfg.user} ${cfg.group} - -" ];
|
||||
|
||||
users.users.${cfg.user}.extraGroups = [ "postgres" ];
|
||||
services.immich = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
database = {
|
||||
enable = true;
|
||||
createDB = true;
|
||||
};
|
||||
#secretsFile = config.sops.secrets.immich.path;
|
||||
database =
|
||||
let
|
||||
dbLink = config.local.links.postgresql;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
createDB = true;
|
||||
inherit (dbLink) port;
|
||||
#host = dbLink.hostname;
|
||||
};
|
||||
mediaLocation = "/persist/services/immich";
|
||||
machine-learning.enable = true;
|
||||
settings = null;
|
||||
inherit (link) port;
|
||||
host = link.ipv4;
|
||||
host = link.hostname;
|
||||
};
|
||||
|
||||
local.nginx.proxyVhosts."photos.gerg-l.com" = link.url;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue