diff --git a/docs/ports.md b/docs/ports.md new file mode 100644 index 0000000..c663ef0 --- /dev/null +++ b/docs/ports.md @@ -0,0 +1,19 @@ +# Ports + +The idea is to always use consecutive ports, but never go back and try to recycle older no longer user ports (for the sake of keeping things clean). + +| Port | Description | +| ---- | --------------------------------------------------------------------------- | +| 8401 | [whoogle](../hosts/nixos/lapetus/services/whoogle.nix) | +| 8402 | [intray api](../hosts/nixos/lapetus/services/intray.nix) | +| 8403 | [intray](../hosts/nixos/lapetus/services/intray.nix) | +| 8404 | [smos](../hosts/nixos/lapetus/services/smos.nix) | +| 8405 | [smos docs](../hosts/nixos/lapetus/services/smos.nix) | +| 8406 | [smos api](../hosts/nixos/lapetus/services/smos.nix) | +| 8407 | [whoogle](../hosts/nixos/lapetus/services/whoogle.nix) | +| 8408 | [vaultwarden](../hosts/nixos/lapetus/services/vaultwarden.nix) | +| 8409 | [grafana](../hosts/nixos/lapetus/services/grafana.nix) | +| 8410 | [prometheus](../hosts/nixos/lapetus/services/prometheus.nix) | +| 8411 | [prometheus node exporter](../hosts/nixos/lapetus/services/prometheus.nix) | +| 8412 | [prometheus nginx exporter](../hosts/nixos/lapetus/services/prometheus.nix) | +| 8413 | [commarss](../hosts/nixos/lapetus/services/commarss.nix) | diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index e445c03..14728d1 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -15,6 +15,7 @@ ./services/zfs.nix ./services/prometheus.nix ./services/grafana.nix + ./services/commarss.nix ./filesystems ./hardware ]; diff --git a/hosts/nixos/lapetus/services/actual.nix b/hosts/nixos/lapetus/services/actual.nix index e316d65..05a6246 100644 --- a/hosts/nixos/lapetus/services/actual.nix +++ b/hosts/nixos/lapetus/services/actual.nix @@ -8,19 +8,13 @@ in imports = [ ../../common/optional/services/nginx.nix ]; services.nginx.virtualHosts.${host} = config.satellite.proxy port { }; - - # Ensure persistent directory exists systemd.tmpfiles.rules = [ "d ${dataDir}" ]; - # {{{ General config virtualisation.oci-containers.containers.actual = { image = "actualbudget/actual-server:latest"; autoStart = true; ports = [ "${toString port}:5006" ]; # server:docker volumes = [ "${dataDir}:/data" ]; # server:docker - - environment = { }; }; - # }}} } diff --git a/hosts/nixos/lapetus/services/commarss.nix b/hosts/nixos/lapetus/services/commarss.nix new file mode 100644 index 0000000..2fcfd3f --- /dev/null +++ b/hosts/nixos/lapetus/services/commarss.nix @@ -0,0 +1,26 @@ +{ config, ... }: +let + port = 8413; + host = "rss.moonythm.dev"; + dataDir = "/persist/state/var/lib/commarss"; +in +{ + imports = [ ../../common/optional/services/nginx.nix ]; + + systemd.tmpfiles.rules = [ "d ${dataDir}" ]; + services.nginx.virtualHosts.${host} = config.satellite.proxy port + { proxyWebsockets = true; }; + + virtualisation.oci-containers.containers.commarss = { + image = "athou/commafeed:latest"; + autoStart = true; + + ports = [ "${toString port}:8082" ]; # server:docker + volumes = [ "${dataDir}:/commafeed/data" ]; # server:docker + + # https://github.com/Athou/commafeed/blob/master/commafeed-server/config.yml.example + environment = { + CF_APP_PUBLICURL = "https://${host}"; + }; + }; +} diff --git a/hosts/nixos/lapetus/services/prometheus.nix b/hosts/nixos/lapetus/services/prometheus.nix index b4b775a..593d044 100644 --- a/hosts/nixos/lapetus/services/prometheus.nix +++ b/hosts/nixos/lapetus/services/prometheus.nix @@ -39,7 +39,8 @@ in # }}} # {{{ Networking & storage services.nginx.virtualHosts.${host} = - config.satellite.proxy config.services.prometheus.port { }; + config.satellite.proxy config.services.prometheus.port + { proxyWebsockets = true; }; environment.persistence."/persist/state".directories = [{ directory = "/var/lib/prometheus2";