mirror of
https://github.com/thegeneralist01/config.git
synced 2026-10-09 21:03:30 +02:00
nixos: migrate server services to thegeneralist
Move hosted services and secrets from the retired central hosts, persist USB storage and ownership, harden RTL8822BU Wi-Fi, repair DNS behavior, and order CoreDNS after Tailscale.
This commit is contained in:
parent
7f5ecd917b
commit
bd887883f7
41 changed files with 183 additions and 511 deletions
34
hosts/thegeneralist/archive/archivebox.nix
Normal file
34
hosts/thegeneralist/archive/archivebox.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# virtualisation.docker.enable = true;
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
virtualisation.oci-containers.containers = {
|
||||
archivebox = {
|
||||
image = "ghcr.io/archivebox/archivebox:main";
|
||||
ports = [ "127.0.0.1:8000:8000" ];
|
||||
volumes = [
|
||||
"/mnt/usb/services/archivebox/data:/data"
|
||||
];
|
||||
environment = {
|
||||
ALLOWLIST_HOSTS = "localhost";
|
||||
CSRF_TRUSTED_ORIGINS = "https://archive.thegeneralist01.com,127.0.0.1:8000";
|
||||
REVERSE_PROXY_USER_HEADER = "X-Remote-User";
|
||||
REVERSE_PROXY_WHITELIST = "127.0.0.1/32,100.108.125.63/32";
|
||||
};
|
||||
};
|
||||
|
||||
# pywb = {
|
||||
# image = "docker.io/webrecorder/pywb";
|
||||
# ports = [ "127.0.0.1:8001:8001" ];
|
||||
# volumes = [
|
||||
# "/mnt/usb/services/browsertrix/webrecorder/:/"
|
||||
# "/mnt/usb/services/browsertrix/webrecorder/webarchive:/webarchive"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.docker ];
|
||||
}
|
||||
43
hosts/thegeneralist/archive/default.nix
Normal file
43
hosts/thegeneralist/archive/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
let
|
||||
acmeDomain = "thegeneralist01.com";
|
||||
domain = "archive.${acmeDomain}";
|
||||
|
||||
ssl = {
|
||||
forceSSL = true;
|
||||
quic = true;
|
||||
useACMEHost = acmeDomain;
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ./archivebox.nix ];
|
||||
|
||||
services.nginx.virtualHosts.${domain} = ssl // {
|
||||
listen = [
|
||||
{
|
||||
addr = "100.108.125.63";
|
||||
port = 443;
|
||||
ssl = true;
|
||||
}
|
||||
{
|
||||
addr = "100.108.125.63";
|
||||
port = 80;
|
||||
}
|
||||
];
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8000";
|
||||
recommendedProxySettings = true;
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
|
||||
# tell nginx not to buffer the response. send it as it comes.
|
||||
proxy_buffering off;
|
||||
|
||||
# give jellyfin plenty of time to transcode
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue