diff --git a/hosts/servers/alexandria/default.nix b/hosts/servers/alexandria/default.nix index 9e8b823..0ef2ec6 100644 --- a/hosts/servers/alexandria/default.nix +++ b/hosts/servers/alexandria/default.nix @@ -17,6 +17,7 @@ ./security.nix ./services.nix ./pairdrop.nix + ./podsync.nix ./shiori.nix ./users.nix ./variables.nix diff --git a/hosts/servers/alexandria/podsync.nix b/hosts/servers/alexandria/podsync.nix new file mode 100644 index 0000000..4066d0a --- /dev/null +++ b/hosts/servers/alexandria/podsync.nix @@ -0,0 +1,20 @@ +{ inputs, config, pkgs, lib, ... }: + +{ + virtualisation.oci-containers.containers."podsync" = { + image = "docker.io/mxpv/podsync:latest"; + environment = { TZ = "America/Bahia"; }; + ports = [ "${config.ports.podsync}:80" ]; + volumes = [ "${config.age.secrets.podsync.path}:/app/config.toml" ]; + extraOptions = [ "--label=io.containers.autoupdate=registry" ]; + }; + + services.nginx.virtualHosts."podsync.baduhai.me" = { + useACMEHost = "baduhai.me"; + forceSSL = true; + kTLS = true; + locations."/".proxyPass = "http://127.0.0.1:${config.ports.podsync}"; + }; + + age.secrets.podsync.file = ../../../secrets/podsync.toml.age; +} diff --git a/hosts/servers/alexandria/variables.nix b/hosts/servers/alexandria/variables.nix index 0841a3e..c5193b5 100644 --- a/hosts/servers/alexandria/variables.nix +++ b/hosts/servers/alexandria/variables.nix @@ -23,6 +23,7 @@ in { qbittorrent = mkStringOption "8008"; actual = mkStringOption "8009"; pairdrop = mkStringOption "8010"; + podsync = mkStringOption "8011"; jellyfin = mkStringOption "8096"; sonarr = mkStringOption "8989"; jackett = mkStringOption "9117"; diff --git a/secrets/podsync.toml.age b/secrets/podsync.toml.age new file mode 100644 index 0000000..919d89b Binary files /dev/null and b/secrets/podsync.toml.age differ diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 5faa985..ee8be97 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -23,4 +23,5 @@ in { "nextcloud-adminpass.age".publicKeys = all-hosts; "cloudflare.age".publicKeys = all-hosts; "paperless.age".publicKeys = all-hosts; + "podsync.toml.age".publicKeys = all-hosts; }