Added homepage, immich and uptime kuma
This commit is contained in:
parent
a8a6776b1b
commit
b6a91b7dcb
@ -42,6 +42,9 @@
|
||||
caddy.enable = true;
|
||||
kanidm.enable = true;
|
||||
forgejo.enable = true;
|
||||
immich.enable = true;
|
||||
homepage.enable = true;
|
||||
uptime-kuma.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -51,6 +51,21 @@ in {
|
||||
handle @forgejo {
|
||||
reverse_proxy forgejo:3000
|
||||
}
|
||||
|
||||
@immich host photos.tbmrs.nl
|
||||
handle @immich {
|
||||
reverse_proxy immich-server:2283
|
||||
}
|
||||
|
||||
@homepage host home.tbmrs.nl
|
||||
handle @homepage {
|
||||
reverse_proxy homepage:3000
|
||||
}
|
||||
|
||||
@uptime-kuma host uptime.tbmrs.nl
|
||||
handle @uptime-kuma {
|
||||
reverse_proxy uptime-kuma:3001
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
94
modules/home/containers/homepage.nix
Normal file
94
modules/home/containers/homepage.nix
Normal file
@ -0,0 +1,94 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.containers.homepage;
|
||||
in {
|
||||
options = {
|
||||
settings.containers.homepage.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable homepage container
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.podman.containers.homepage = {
|
||||
image = "ghcr.io/gethomepage/homepage:latest";
|
||||
network = "proxy";
|
||||
volumes = [
|
||||
"%h/containers/homepage/config:/app/config"
|
||||
"%h/containers/homepage/config/settings.yaml:/app/config/settings.yaml"
|
||||
"%h/containers/homepage/config/services.yaml:/app/config/services.yaml"
|
||||
"%h/containers/homepage/config/docker.yaml:/app/config/docker.yaml"
|
||||
"/run/user/1000/podman/podman.sock:/var/run/podman.sock:ro"
|
||||
];
|
||||
environment = {
|
||||
HOMEPAGE_ALLOWED_HOSTS = "home.tbmrs.nl";
|
||||
};
|
||||
};
|
||||
|
||||
home.file."containers/homepage/config/settings.yaml".source = (pkgs.formats.yaml { }).generate "settings" {
|
||||
title = "Timo's Server";
|
||||
description = "server from Timo";
|
||||
theme = "dark";
|
||||
color = "slate";
|
||||
};
|
||||
|
||||
home.file."containers/homepage/config/services.yaml".source = (pkgs.formats.yaml { }).generate "services" [
|
||||
{
|
||||
"Infra" = [
|
||||
{
|
||||
"Kanidm" = {
|
||||
href = "https://auth.tbmrs.nl";
|
||||
description = "Oauth2 and ldap provider";
|
||||
icon = "kanidm";
|
||||
server = "podman";
|
||||
container = "kanidm";
|
||||
};
|
||||
}
|
||||
{
|
||||
"Uptime Kuma" = {
|
||||
href = "https://uptime.tbmrs.nl";
|
||||
description = "Uptime and status";
|
||||
icon = "uptime-kuma";
|
||||
server = "podman";
|
||||
container = "uptime-kuma";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
"Services" = [
|
||||
{
|
||||
"Forgejo" = {
|
||||
href = "https://git.tbmrs.nl";
|
||||
description = "Git server";
|
||||
icon = "forgejo";
|
||||
server = "podman";
|
||||
container = "forgejo";
|
||||
};
|
||||
}
|
||||
{
|
||||
"Immich" = {
|
||||
href = "https://photos.tbmrs.nl";
|
||||
description = "Photo's and videos";
|
||||
icon = "immich";
|
||||
server = "podman";
|
||||
container = "immich-server";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
home.file."containers/homepage/config/docker.yaml".source = (pkgs.formats.yaml {}).generate "docker" {
|
||||
podman = {
|
||||
socket = "/var/run/podman.sock";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
75
modules/home/containers/immich.nix
Normal file
75
modules/home/containers/immich.nix
Normal file
@ -0,0 +1,75 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.containers.immich;
|
||||
in {
|
||||
options = {
|
||||
settings.containers.immich.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable immich container
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.podman.containers.immich-server = {
|
||||
image = "ghcr.io/immich-app/immich-server:release";
|
||||
network = "proxy";
|
||||
volumes = [
|
||||
"%h/containers/immich/upload:/usr/src/app/upload"
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
];
|
||||
extraConfig = {
|
||||
Unit = {
|
||||
After = [
|
||||
"podman-immich-redis.service"
|
||||
"podman-immich-database.service"
|
||||
];
|
||||
Requires = [
|
||||
"podman-immich-redis.service"
|
||||
"podman-immich-database.service"
|
||||
];
|
||||
};
|
||||
};
|
||||
environment = {
|
||||
DB_PASSWORD = "changeme";
|
||||
DB_USERNAME = "postgres";
|
||||
DB_DATABASE_NAME = "immich";
|
||||
DB_HOSTNAME = "immich-database";
|
||||
REDIS_HOSTNAME = "immich-redis";
|
||||
};
|
||||
};
|
||||
|
||||
services.podman.containers.immich-machine-learning = {
|
||||
image = "ghcr.io/immich-app/immich-machine-learning:release";
|
||||
network = "proxy";
|
||||
volumes = [
|
||||
"%h/containers/immich/model-cache:/cache"
|
||||
];
|
||||
};
|
||||
|
||||
services.podman.containers.immich-redis = {
|
||||
image = "docker.io/valkey/valkey:8-bookworm@sha256:42cba146593a5ea9a622002c1b7cba5da7be248650cbb64ecb9c6c33d29794b1";
|
||||
network = "proxy";
|
||||
};
|
||||
|
||||
services.podman.containers.immich-database = {
|
||||
image = "docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52";
|
||||
network = "proxy";
|
||||
volumes = [
|
||||
"%h/containers/immich/database-data:/var/lib/postgresql/data"
|
||||
];
|
||||
environment = {
|
||||
POSTGRES_PASSWORD = "changeme";
|
||||
POSTGRES_USER = "postgres";
|
||||
POSTGRES_DB = "immich";
|
||||
POSTGRES_INITDB_ARGS = "--data-checksums";
|
||||
};
|
||||
exec = ''postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on'';
|
||||
};
|
||||
};
|
||||
}
|
27
modules/home/containers/uptime-kuma.nix
Normal file
27
modules/home/containers/uptime-kuma.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.containers.uptime-kuma;
|
||||
in {
|
||||
options = {
|
||||
settings.containers.uptime-kuma.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable uptime kuma container
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.podman.containers.uptime-kuma = {
|
||||
image = "louislam/uptime-kuma:1";
|
||||
network = "proxy";
|
||||
volumes = [
|
||||
"%h/containers/uptime-kuma/data:/app/data"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -28,5 +28,8 @@
|
||||
./containers/kanidm.nix
|
||||
./containers/nginx.nix
|
||||
./containers/forgejo.nix
|
||||
./containers/immich.nix
|
||||
./containers/homepage.nix
|
||||
./containers/uptime-kuma.nix
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user