let
env = config.myEnv.tools.peertube;
cfg = config.myServices.websites.tools.peertube;
- pcfg = config.services.peertube;
+ pcfg = config.immaeServices.peertube;
in {
options.myServices.websites.tools.peertube = {
enable = lib.mkEnableOption "enable Peertube's website";
};
config = lib.mkIf cfg.enable {
- services.peertube = {
+ myServices.dns.zones."immae.eu".subdomains.peertube =
+ with config.myServices.dns.helpers; ips servers.eldiron.ips.main;
+
+ myServices.chatonsProperties.hostings.peertube = {
+ file.datetime = "2022-08-21T20:00:00";
+ hosting = {
+ name = "Peertube";
+ description = "Free software to take back control of your videos";
+ website = "https://peertube.immae.eu/";
+ logo = "https://peertube.immae.eu/client/assets/images/icons/icon-192x192.png";
+ type = "INSTANCE";
+ status.level = "OK";
+ status.description = "OK";
+ registration.load = "OPEN";
+ install.type = "PACKAGE";
+ };
+ };
+ myServices.chatonsProperties.services.peertube = {
+ file.datetime = "2022-08-21T20:00:00";
+ service = {
+ name = "Peertube";
+ description = "Free software to take back control of your videos";
+ website = "https://peertube.immae.eu/";
+ logo = "https://peertube.immae.eu/client/assets/images/icons/icon-192x192.png";
+ status.level = "OK";
+ status.description = "OK";
+ registration."" = ["MEMBER" "CLIENT"];
+ registration.load = "OPEN";
+ install.type = "PACKAGE";
+ };
+ software = {
+ name = "Peertube";
+ website = "https://joinpeertube.org/";
+ license.url = "https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE";
+ license.name = "GNU Affero General Public License";
+ version = pcfg.package.version;
+ source.url = "https://github.com/Chocobozzz/PeerTube";
+ };
+ };
+ immaeServices.peertube = {
enable = true;
configFile = config.secrets.fullPaths."webapps/tools-peertube";
};
paths = [ pcfg.configFile ];
};
+ security.acme.certs.eldiron.extraDomainNames = [ "peertube.immae.eu" ];
services.websites.env.tools.vhostConfs.peertube = {
certName = "eldiron";
- addToCerts = true;
hosts = [ "peertube.immae.eu" ];
root = null;
extraConfig = [ ''
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
'' ];
};
+
+ myServices.monitoring.fromMasterActivatedPlugins = [ "http" ];
+ myServices.monitoring.fromMasterObjects.service = [
+ {
+ service_description = "peertube website is running on peertube.immae.eu";
+ host_name = config.hostEnv.fqdn;
+ use = "external-web-service";
+ check_command = ["check_https" "peertube.immae.eu" "/" "<title>Immae’s PeerTube"];
+
+ servicegroups = "webstatus-webapps";
+ _webstatus_name = "Peertube";
+ _webstatus_url = "https://peertube.immae.eu/";
+ }
+ ];
};
}