Add ThinkNix config
This commit is contained in:
32
ThinkNix/services/0_TEMPLATE.nix
Normal file
32
ThinkNix/services/0_TEMPLATE.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
virtualisation.oci-containers.containers.NAME = {
|
||||
image = "";
|
||||
autoStart = true;
|
||||
|
||||
dependsOn = [
|
||||
# "pihole"
|
||||
];
|
||||
|
||||
ports = [];
|
||||
|
||||
volumes = [];
|
||||
|
||||
environment = {
|
||||
PUID = "1000";
|
||||
PGID = "1000";
|
||||
TZ = "Europe/Berlin";
|
||||
# NVIDIA_VISIBLE_DEVICES = "all";
|
||||
# NVIDIA_DRIVER_CAPABILITIES = "all";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
# "--gpus=all"
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
}
|
49
ThinkNix/services/adguard.nix
Normal file
49
ThinkNix/services/adguard.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
virtualisation.oci-containers.containers.adguard = {
|
||||
image = "adguard/adguardhome";
|
||||
autoStart = true;
|
||||
|
||||
dependsOn = [];
|
||||
|
||||
ports = [
|
||||
# DNS server
|
||||
"53:53/tcp"
|
||||
"53:53/udp"
|
||||
# "853:853/tcp" # DNS over TLS
|
||||
# "853:853/udp" # DNS over QUIC
|
||||
|
||||
# DHCP server
|
||||
# "67:67/udp"
|
||||
# "68:68/tcp"
|
||||
# "68:68/udp"
|
||||
|
||||
# Admin panel + DNS over HTTPS
|
||||
# "80:80/tcp"
|
||||
# "443:443/tcp"
|
||||
# "443:443/udp"
|
||||
# "3100:3000/tcp" # Web interface
|
||||
|
||||
# DNSCrypt
|
||||
# "5443:5443/tcp"
|
||||
# "5443:5443/udp"
|
||||
|
||||
# "6060:6060/tcp" # Debugging
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"adguard_config:/opt/adguardhome/conf"
|
||||
"adguard_work:/opt/adguardhome/work"
|
||||
];
|
||||
|
||||
environment = {};
|
||||
|
||||
extraOptions = [
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
}
|
96
ThinkNix/services/kopia.nix
Normal file
96
ThinkNix/services/kopia.nix
Normal file
@ -0,0 +1,96 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
virtualisation.oci-containers.containers.kopia = {
|
||||
image = "kopia/kopia:latest";
|
||||
autoStart = true;
|
||||
|
||||
dependsOn = [];
|
||||
|
||||
ports = [
|
||||
# "51515:51515"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"kopia_config:/app/config"
|
||||
"kopia_cache:/app/cache"
|
||||
"kopia_logs:/app/logs"
|
||||
"kopia_temp:/tmp"
|
||||
|
||||
# Repository, where snapshots are stored (incrementally)
|
||||
"/media/synology-syncthing:/repository"
|
||||
|
||||
# Folders that are backed up
|
||||
"adguard_config:/data/adguard_config:ro"
|
||||
"adguard_work:/data/adguard_work:ro"
|
||||
"authelia_config:/data/authelia_config:ro"
|
||||
"bazarr_config:/data/bazarr_config:ro"
|
||||
"box-fileflows_config:/data/box-fileflows_config:ro"
|
||||
"box-hydra_config:/data/box-hydra_config:ro"
|
||||
"box-sabnzbd_config:/data/box-sabnzbd_config:ro"
|
||||
"box-stash_blobs:/data/box-stash_blobs:ro"
|
||||
"box-stash_config:/data/box-stash_config:ro"
|
||||
"box-stash_generated:/data/box-stash_generated:ro"
|
||||
"box-stash_metadata:/data/box-stash_metadata:ro"
|
||||
"fileflows_config:/data/fileflows_config:ro"
|
||||
"formula10_data:/data/formula10_data:ro"
|
||||
"gitea-db_data:/data/gitea-db_data:ro"
|
||||
"gitea-runner_config:/data/gitea-runner_config:ro"
|
||||
"gitea-runner_data:/data/gitea-runner_data:ro"
|
||||
"gitea_data:/data/gitea_data:ro"
|
||||
"heidi_config:/data/heidi_config:ro"
|
||||
"homeassistant_config:/data/homeassistant_config:ro"
|
||||
"homepage_config:/data/homepage_config:ro"
|
||||
"immich-database_data:/data/immich-database_data:ro"
|
||||
"immich_config:/data/immich_config:ro"
|
||||
"immich_data:/data/immich_data:ro"
|
||||
"immich_machine-learning:/data/immich_machine-learning:ro"
|
||||
"jellyfin_config:/data/jellyfin_config:ro"
|
||||
"jellyseerr_config:/data/jellyseerr_config:ro"
|
||||
"jellystat-db_data:/data/jellystat-db_data:ro"
|
||||
"jellystat_data:/data/jellystat_data:ro"
|
||||
"nextcloud-db_data:/data/nextcloud-db_data:ro"
|
||||
"nextcloud_data:/data/nextcloud_data:ro"
|
||||
"nginx_config:/data/nginx_config:ro"
|
||||
"nginx_letsencrypt:/data/nginx_letsencrypt:ro"
|
||||
"nginx_snippets:/data/nginx_snippets:ro"
|
||||
"paperless-postgres_data:/data/paperless-postgres_data:ro"
|
||||
"paperless_data:/data/paperless_data:ro"
|
||||
"portainer_config:/data/portainer_config:ro"
|
||||
"prowlarr_config:/data/prowlarr_config:ro"
|
||||
"radarr_config:/data/radarr_config:ro"
|
||||
"sabnzbd_config:/data/sabnzbd_config:ro"
|
||||
"sonarr_config:/data/sonarr_config:ro"
|
||||
"uptime-kuma_config:/data/uptime-kuma_config:ro"
|
||||
"wireguard_vps_config:/data/wireguard_vps_config:ro"
|
||||
];
|
||||
|
||||
environment = {
|
||||
TZ = "Europe/Berlin";
|
||||
USER = "christoph";
|
||||
KOPIA_PASSWORD = (builtins.readFile ./kopia.password);
|
||||
};
|
||||
|
||||
entrypoint = "/bin/kopia";
|
||||
|
||||
cmd = [
|
||||
"server"
|
||||
"start"
|
||||
"--disable-csrf-token-checks"
|
||||
"--insecure"
|
||||
"--address=0.0.0.0:51515"
|
||||
"--server-username=christoph"
|
||||
"--server-password=kopia"
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
"--privileged"
|
||||
"--device=/dev/fuse:/dev/fuse:rwm"
|
||||
"--cap-add=SYS_ADMIN"
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
}
|
36
ThinkNix/services/nginx-proxy-manager.nix
Normal file
36
ThinkNix/services/nginx-proxy-manager.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
virtualisation.oci-containers.containers.nginx-proxy-manager = {
|
||||
image = "jc21/nginx-proxy-manager:latest";
|
||||
autoStart = true;
|
||||
|
||||
dependsOn = [
|
||||
# "pihole"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"80:80"
|
||||
# "81:81" # Web interface
|
||||
"443:443"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"nginx_config:/data"
|
||||
"nginx_snippets:/snippets"
|
||||
"nginx_letsencrypt:/etc/letsencrypt"
|
||||
];
|
||||
|
||||
environment = {
|
||||
DISABLE_IPV6 = "true";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
# "--net=host"
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
}
|
30
ThinkNix/services/portainer.nix
Normal file
30
ThinkNix/services/portainer.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
virtualisation.oci-containers.containers.portainer = {
|
||||
image = "portainer/portainer-ce:latest";
|
||||
autoStart = true;
|
||||
|
||||
dependsOn = [];
|
||||
|
||||
ports = [
|
||||
# "8000:8000"
|
||||
# "9443:9443"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"portainer_config:/data"
|
||||
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
];
|
||||
|
||||
environment = {};
|
||||
|
||||
extraOptions = [
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user