Files
nixos/hosts/freun.dev/services.nix
Joakim Repomaa 913d3d1238 refactor
2025-02-08 21:17:11 +02:00

108 lines
2.1 KiB
Nix

{ pkgs, config, ... }:
let
immichDataDir = "/mnt/storage/immich";
syncthingDataDir = "/mnt/storage/syncthing";
smtp = {
host = "horologium.uberspace.de";
port = 587;
username = "noreply@${config.networking.domain}";
from = "noreply@${config.networking.domain}";
heloName = config.networking.domain;
};
in
{
services.postgresql.package = pkgs.postgresql_17;
modules.storageBoxMounts = {
${immichDataDir} = {
path = "/backup/immich";
user = "u407959";
};
${syncthingDataDir} = {
path = "/backup/syncthing";
user = "u407959";
uid = config.users.users.syncthing.uid;
gid = config.users.groups.syncthing.gid;
};
};
modules.services = {
vaultwarden = {
enable = true;
subdomain = "pw";
config = {
YUBICO_CLIENT_ID = 86799;
SMTP_HOST = smtp.host;
SMTP_FROM = smtp.from;
SMTP_FROM_NAME = "Vaultwarden";
SMTP_USERNAME = smtp.username;
SMTP_PORT = smtp.port;
HELO_NAME = smtp.heloName;
};
};
immich = {
enable = true;
subdomain = "img";
dataDir = immichDataDir;
storageDirs = [ syncthingDataDir ];
version = "v1.125.7";
};
syncthing = {
enable = true;
subdomain = "sync";
dataDir = syncthingDataDir;
};
gotosocial = {
enable = true;
subdomain = "social";
settings = {
smtp-host = smtp.host;
smtp-port = smtp.port;
smtp-username = smtp.username;
smtp-from = smtp.from;
};
};
bin = {
enable = true;
subdomain = "bin";
};
workout-tracker = {
enable = true;
subdomain = "fit";
};
workout-sync = {
enable = true;
subdomain = "ws";
};
invidious = {
enable = true;
subdomain = "vid";
};
grafana = {
enable = true;
subdomain = "graph";
};
gtrackmap = {
enable = true;
subdomain = "trackmap";
};
owncast = {
enable = true;
subdomain = "stream";
};
tailscale.enable = true;
};
}