X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=systems%2Feldiron%2Fwebsites%2Fpeertube%2Fdefault.nix;fp=modules%2Fprivate%2Fwebsites%2Ftools%2Fpeertube%2Fdefault.nix;h=0ebe4e79b41e655459288e24b3ca6ba128c3beb2;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hp=68c992f64ff7fe65b1566845d98ab0e9b426108c;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/tools/peertube/default.nix b/systems/eldiron/websites/peertube/default.nix similarity index 57% rename from modules/private/websites/tools/peertube/default.nix rename to systems/eldiron/websites/peertube/default.nix index 68c992f..0ebe4e7 100644 --- a/modules/private/websites/tools/peertube/default.nix +++ b/systems/eldiron/websites/peertube/default.nix @@ -2,14 +2,53 @@ 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"; }; @@ -68,9 +107,9 @@ in { 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 = [ '' @@ -90,5 +129,19 @@ in { 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" "/" "Immae’s PeerTube"]; + + servicegroups = "webstatus-webapps"; + _webstatus_name = "Peertube"; + _webstatus_url = "https://peertube.immae.eu/"; + } + ]; }; }