2023-03-20 16:06:11 +00:00
|
|
|
{ config, lib, ... }:
|
2023-02-28 13:55:57 +00:00
|
|
|
|
|
|
|
{
|
2023-03-18 23:28:41 +00:00
|
|
|
virtualisation.oci-containers.containers = {
|
|
|
|
proxitok-web = {
|
|
|
|
image = "ghcr.io/pablouser1/proxitok:master";
|
|
|
|
dependsOn = [ "proxitok-signer" ];
|
|
|
|
ports = [ "127.0.0.1:8005:80" ];
|
|
|
|
environmentFiles = [ config.age.secrets.proxitok-environment.path ];
|
|
|
|
volumes = [
|
|
|
|
"/etc/container-proxitok/cache:/cache"
|
|
|
|
];
|
|
|
|
extraOptions = [
|
|
|
|
"--label=com.centurylinklabs.watchtower.enable=true"
|
|
|
|
"--label=io.containers.autoupdate=registry"
|
|
|
|
];
|
|
|
|
};
|
2023-02-28 13:55:57 +00:00
|
|
|
|
2023-03-18 23:28:41 +00:00
|
|
|
proxitok-signer = {
|
|
|
|
image = "ghcr.io/pablouser1/signtok:master";
|
|
|
|
extraOptions = [
|
|
|
|
"--label=com.centurylinklabs.watchtower.enable=true"
|
|
|
|
"--label=io.containers.autoupdate=registry"
|
|
|
|
];
|
2023-02-28 13:55:57 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-06-23 18:08:22 +00:00
|
|
|
systemd.services.podman-proxitok-web.restartTriggers = [
|
|
|
|
"${config.age.secrets.proxitok-environment.file}"
|
|
|
|
];
|
|
|
|
|
2023-02-28 14:22:22 +00:00
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"d /etc/container-proxitok/cache 0755 33 33"
|
|
|
|
];
|
|
|
|
|
2023-06-21 12:21:40 +00:00
|
|
|
services.redis.servers.proxitok = {
|
|
|
|
enable = true;
|
|
|
|
bind = "10.88.0.1";
|
|
|
|
port = 6381;
|
|
|
|
|
|
|
|
databases = 1;
|
|
|
|
save = [ ];
|
|
|
|
appendFsync = "no";
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
protected-mode = "no";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-06-22 18:57:21 +00:00
|
|
|
systemd.services.redis-proxitok.after = [ "podman-wait-for-host-interface.service" ];
|
|
|
|
|
2023-06-21 12:21:40 +00:00
|
|
|
networking.firewall.interfaces."podman+".allowedTCPPorts = [ 6381 ];
|
|
|
|
|
2023-03-12 20:03:36 +00:00
|
|
|
services.nginx.virtualHosts."tictac.daniel.sx" = {
|
2023-06-21 12:21:40 +00:00
|
|
|
listenAddresses = [ "100.108.165.26" "[fd7a:115c:a1e0:ab12:4843:cd96:626c:a51a]" ];
|
2023-04-03 13:03:52 +00:00
|
|
|
quic = true;
|
2023-03-12 20:03:36 +00:00
|
|
|
http3 = true;
|
2023-03-06 09:21:34 +00:00
|
|
|
|
2023-03-12 20:03:36 +00:00
|
|
|
onlySSL = true;
|
|
|
|
useACMEHost = "daniel.sx";
|
2023-02-28 13:55:57 +00:00
|
|
|
|
2023-03-12 20:03:36 +00:00
|
|
|
locations."/" = {
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
proxyPass = "http://127.0.0.1:8005";
|
2023-02-28 13:55:57 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|