diff --git a/nki-personal-do/configuration.nix b/nki-personal-do/configuration.nix index 79601ee..25eb642 100644 --- a/nki-personal-do/configuration.nix +++ b/nki-personal-do/configuration.nix @@ -20,6 +20,7 @@ ./phanpy.nix ./invidious.nix ./owncast.nix + ./peertube.nix ]; common.linux.enable = false; # Don't enable the "common linux" module, this is a special machine. diff --git a/nki-personal-do/peertube.nix b/nki-personal-do/peertube.nix new file mode 100644 index 0000000..71ed984 --- /dev/null +++ b/nki-personal-do/peertube.nix @@ -0,0 +1,30 @@ +{ cfg, lib, pkgs, ... }: +let + secrets = config.sops.secrets; + + host = "peertube.dtth.ch"; + port = 19878; +in +{ + # database + cloud.postgresql.databases = [ "peertube" ]; + # traefik + cloud.traefik.hosts.peertube = { + inherit port host; + }; + + services.peertube = { + enable = true; + enableWebHttps = true; + listenWeb = "443"; + listenHttp = port; + localDomain = host; + + # Databases + redis.createLocally = true; + database = { + host = "/run/postgresql"; + }; + }; +} +