From 120bcf4d3927f4a0d07513bc54ea5b5fb9b7d809 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 22 Aug 2022 09:58:06 +0200 Subject: [PATCH] Add chatons infos --- flakes/diaspora/default.nix | 1 + flakes/etherpad-lite/default.nix | 10 +- flakes/mastodon/default.nix | 1 + flakes/mediagoblin/default.nix | 8 +- flakes/paste/paste/paste.py | 29 +++- lib/private/default.nix | 2 +- modules/private/buildbot/default.nix | 23 +++ modules/private/chatons.nix | 156 +++++++++++++++++ modules/private/coturn.nix | 22 ++- .../private/databases/mariadb_replication.nix | 20 +++ .../databases/postgresql_replication.nix | 20 +++ modules/private/default.nix | 1 + modules/private/dns.nix | 20 +++ modules/private/ftp.nix | 68 ++++++++ modules/private/gemini/default.nix | 24 +++ modules/private/gitolite/default.nix | 23 +++ modules/private/irc.nix | 24 +++ modules/private/mail/dovecot.nix | 23 +++ modules/private/mail/postfix.nix | 21 +++ modules/private/mail/sympa.nix | 22 +++ modules/private/monitoring/default.nix | 22 +++ modules/private/pub/default.nix | 22 +++ modules/private/system/backup-2.nix | 21 +++ modules/private/system/eldiron.nix | 2 +- modules/private/system/monitoring-1.nix | 2 +- modules/private/tasks/default.nix | 22 +++ modules/private/vpn/default.nix | 21 +++ modules/private/websites/default.nix | 21 +++ .../immae/chatons/immae-eu.properties | 46 ----- .../immae/chatons/service-etherpad.properties | 164 ------------------ modules/private/websites/immae/production.nix | 8 +- .../private/websites/tools/cloud/default.nix | 38 ++++ .../websites/tools/commento/default.nix | 22 +++ .../websites/tools/cryptpad/default.nix | 36 ++++ .../private/websites/tools/dav/default.nix | 69 ++++++++ .../websites/tools/diaspora/default.nix | 22 +++ .../private/websites/tools/ether/default.nix | 23 +++ .../tools/games/codenames/default.nix | 22 +++ .../tools/games/terraforming-mars/default.nix | 22 +++ .../private/websites/tools/git/default.nix | 24 +++ modules/private/websites/tools/im/default.nix | 67 +++++++ .../private/websites/tools/kanboard/farm.nix | 36 ++++ .../private/websites/tools/mail/default.nix | 45 +++++ .../websites/tools/mastodon/default.nix | 22 +++ .../websites/tools/mgoblin/default.nix | 23 +++ .../websites/tools/peertube/default.nix | 36 ++++ .../private/websites/tools/tools/default.nix | 33 ++++ .../private/websites/tools/tools/dokuwiki.nix | 37 ++++ .../private/websites/tools/tools/phpbb.nix | 14 ++ .../private/websites/tools/tools/shaarli.nix | 23 +++ .../private/websites/tools/tools/ttrss.nix | 23 +++ .../private/websites/tools/tools/wallabag.nix | 23 +++ .../private/websites/tools/tools/yourls.nix | 23 +++ .../private/websites/tools/visio/default.nix | 21 +++ pkgs/webapps/mantisbt_2/default.nix | 1 + .../plugins/source-integration/default.nix | 1 + 56 files changed, 1345 insertions(+), 230 deletions(-) create mode 100644 modules/private/chatons.nix delete mode 100644 modules/private/websites/immae/chatons/immae-eu.properties delete mode 100644 modules/private/websites/immae/chatons/service-etherpad.properties diff --git a/flakes/diaspora/default.nix b/flakes/diaspora/default.nix index 619c550..f4038ad 100644 --- a/flakes/diaspora/default.nix +++ b/flakes/diaspora/default.nix @@ -45,6 +45,7 @@ let ''; diaspora = stdenv.mkDerivation { name = "diaspora"; + version = src.version; inherit diaspora_src; builder = writeText "build_diaspora" '' source $stdenv/setup diff --git a/flakes/etherpad-lite/default.nix b/flakes/etherpad-lite/default.nix index 21bce28..d1af7f7 100644 --- a/flakes/etherpad-lite/default.nix +++ b/flakes/etherpad-lite/default.nix @@ -15,8 +15,8 @@ let # nix files are built using node2nix -i node-packages.json allModules = lib.attrsets.genAttrs moduleNames (name: (callPackage (./modules + "/${name}/node-packages.nix") { inherit nodeEnv; }).${name}); - toPassthru = pkg: { - inherit varDir allModules nodejs; + toPassthru = pkg: moduleNames: { + inherit varDir allModules nodejs moduleNames; withModules = withModules pkg; }; withModules = pkg: toModules: @@ -29,9 +29,10 @@ let ln -s ${varDir}/ep_initialized/${n.packageName} $out/node_modules/${n.packageName}/.ep_initialized fi ''; + modulesNames = map (n: n.packageName) modules; newEtherpad = pkg.overrideAttrs(old: { installPhase = old.installPhase + "\n" + builtins.concatStringsSep "\n" (map toInstallModule modules); - passthru = toPassthru newEtherpad; + passthru = toPassthru newEtherpad moduleNames; }); in newEtherpad; # built using node2nix -l package-lock.json @@ -54,6 +55,7 @@ let package = stdenv.mkDerivation rec { name = "etherpad-lite-${src.version}"; src = node-environment; + version = src.version; installPhase = '' mkdir -p $out mkdir $out/node_modules @@ -61,6 +63,6 @@ let chmod u+w $out/src/static/js/ ln -s ../src $out/node_modules/ep_etherpad-lite ''; - passthru = toPassthru package; + passthru = toPassthru package []; }; in package diff --git a/flakes/mastodon/default.nix b/flakes/mastodon/default.nix index 80bae39..5d32c23 100644 --- a/flakes/mastodon/default.nix +++ b/flakes/mastodon/default.nix @@ -72,6 +72,7 @@ let in stdenv.mkDerivation { name = "mastodon"; + version = src.version; inherit mastodon_with_yarn; builder = writeText "build_mastodon" '' source $stdenv/setup diff --git a/flakes/mediagoblin/default.nix b/flakes/mediagoblin/default.nix index f50d1c3..47cc628 100644 --- a/flakes/mediagoblin/default.nix +++ b/flakes/mediagoblin/default.nix @@ -143,8 +143,8 @@ let pluginNames = [ "basicsearch" ]; allPlugins = lib.attrsets.genAttrs pluginNames (name: callPackage (./plugins + "/${name}") {}); - toPassthru = pkg: { - inherit allPlugins; + toPassthru = pkg: plugins: { + inherit allPlugins plugins; withPlugins = withPlugins pkg; }; withPlugins = pkg: toPlugins: @@ -153,7 +153,7 @@ let toBuildPlugin = n: "ln -s ${n} mediagoblin/plugins/${n.pluginName}"; newMediagoblin = pkg.overrideAttrs(old: { postBuild = old.postBuild + "\n" + builtins.concatStringsSep "\n" (map toBuildPlugin plugins); - passthru = toPassthru newMediagoblin; + passthru = toPassthru newMediagoblin plugins; }); in newMediagoblin; package = stdenv.mkDerivation rec { @@ -208,6 +208,6 @@ let ''; buildInputs = [ makeWrapper automake autoconf which nodePackages.bower nodejs python ]; propagatedBuildInputs = with gst_all_1; [ python gst-libav gst-plugins-good gst-plugins-bad gst-plugins-ugly gstreamer ]; - passthru = toPassthru package; + passthru = toPassthru package []; }; in package diff --git a/flakes/paste/paste/paste.py b/flakes/paste/paste/paste.py index 86666b8..3172de5 100644 --- a/flakes/paste/paste/paste.py +++ b/flakes/paste/paste/paste.py @@ -10,9 +10,32 @@ import mimetypes magic = magic.Magic(mime=True) +mit_license = """ +Copyright (c) 2022 Immae + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + config = { "directory": os.environ["PASTE_DIRECTORY"], "self_paste_id": "abcd123", + "license_paste_id": "license", "max_content_length": 16 * 1000 * 1000 } @@ -33,6 +56,8 @@ def read_paste(paste_id): if mime.startswith("text/x-script."): mime="text/plain" return (content, mime) + elif paste_id == config["license_paste_id"]: + return (mit_license, "text/plain") else: abort(404) @@ -69,9 +94,11 @@ $ curl -X POST --data-binary @{self} {host} -> GET {paste}/download force download of file -Get the source +Get the source
+Software licensed under the terms of the MIT license '''.format(host=url_for('post_paste', _external=True, _scheme="https"), paste=url_for('get_paste', _external=True, _scheme="https", paste_id=config["self_paste_id"]), + license=url_for('get_paste', _external=True, _scheme="https", paste_id=config["license_paste_id"]), self=os.path.basename(__file__) ), mimetype="text/html") diff --git a/lib/private/default.nix b/lib/private/default.nix index c7d753a..86dd840 100644 --- a/lib/private/default.nix +++ b/lib/private/default.nix @@ -1,4 +1,4 @@ -{}: +{ pkgs }: { # This adds header colors to the builds, but it rebuilds the whole # world from scratch, so only use it to debug! diff --git a/modules/private/buildbot/default.nix b/modules/private/buildbot/default.nix index 3ee1f8b..d9e5966 100644 --- a/modules/private/buildbot/default.nix +++ b/modules/private/buildbot/default.nix @@ -16,6 +16,29 @@ in }; config = lib.mkIf config.myServices.buildbot.enable { + myServices.chatonsProperties.hostings.buildbot = { + file.datetime = "2022-08-21T10:37:00"; + hosting = { + name = "Buildbot"; + description = "Python-based continuous integration testing framework"; + type = "INSTANCE"; + website = "https://git.immae.eu"; + logo = "https://www.buildbot.net/img/icon.png"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + guide.user = "https://www.immae.eu/docs/forge-logicielle.html"; + }; + software = { + name = "Buildbot"; + website = "https://www.buildbot.net/"; + license.url = "https://github.com/buildbot/buildbot/blob/master/LICENSE"; + license.name = "GNU General Public License v2.0"; + version = pkgs.buildbot.version; + source.url = "https://github.com/buildbot/buildbot"; + }; + }; nixpkgs.overlays = [ (self: super: { follow-systemd-unit = self.writeScriptBin "follow-systemd-unit" '' diff --git a/modules/private/chatons.nix b/modules/private/chatons.nix new file mode 100644 index 0000000..7f5ae0e --- /dev/null +++ b/modules/private/chatons.nix @@ -0,0 +1,156 @@ +{ config, lib, pkgs, nodes, ... }: +let + concatValue = value: if lib.isList value then builtins.concatStringsSep "," value else builtins.toString value; + toProperties = properties: builtins.concatStringsSep "\n" ( + lib.collect + (p: !(lib.isAttrs p)) + (lib.mapAttrsRecursive + (path: value: builtins.concatStringsSep "." (builtins.filter (f: f != "") path) + " = " + (concatValue value)) + properties)); + before = name: { + "${name}" = { + status.level = "OK"; + status.description = "OK"; + install.type = "PACKAGE"; + registration.load = "OPEN"; + }; + host = { + name = "Hetzner"; + server.type = "PHYSICAL"; + provider.type = "HOSTEDSERVER"; + server.distribution = "NixOS"; + country.name = "Allemagne"; + country.code = "DE"; + }; + }; + after = name: { + file = { + class = name; + protocol = "ChatonsInfos-0.5"; + generator = "Nix derivation"; + }; + "${name}" = { + legal.url = "https://www.immae.eu/mentions.html"; + guide.technical = "https://git.immae.eu/cgit/perso/Immae/Config/Nix.git/"; + contact.url = "https://www.immae.eu/contacts_fr.html"; + contact.email = config.myEnv.tools.contact; + startdate = "01/01/2019"; + }; + }; + organization = { + file = { + class = "organization"; + protocol = "ChatonsInfos-0.5"; + datetime = "2021-01-11T22:23:00"; + generator = "Nix derivation"; + }; + organization = { + country.name = "France"; + country.code = "FR"; + name = "ImmaeEu"; + description = "ImmaeEu est un CHATONS des Alpes-Maritimes"; + website = "https://www.immae.eu"; + logo = "https://assets.immae.eu/logo.jpg"; + socialnetworks = { + diaspora = "https://diaspora.immae.eu/people/1a185f29cc76cb35"; + facebook = "https://www.facebook.com/ismael.bouya"; + mastodon = "https://mastodon.immae.eu/@immae"; + peertube = "https://peertube.immae.eu/accounts/immae/"; + twitter = "https://twitter.com/_immae"; + }; + chatrooms = { + xmpp = "ismael@immae.fr"; + irc = "immae@freenode"; + matrix = "#support:immae.eu"; + }; + contact.url = "https://www.immae.eu/contacts_fr.html"; + contact.email = config.myEnv.tools.contact; + legal.url = "https://www.immae.eu/mentions.html"; + guide.technical = "https://git.immae.eu/cgit/perso/Immae/Config/Nix.git/"; + guide.user = "https://www.immae.eu/docs"; + status.level = "ACTIVE"; + status.description = "En activité"; + startdate = "01/01/2019"; + type = "COMPANY"; + owner = { + logo = "https://assets.immae.eu/logo.jpg"; + name = "Ismaël Bouya"; + website = "https://www.immae.eu"; + }; + memberof.chatons = { + startdate = "01/07/2019"; + status.level = "ACTIVE"; + status.description = "Participe au collectif"; + }; + }; + }; + toOrganizationProperties = name: pkgs.writeText name (toProperties organization + "\n" + ( + builtins.concatStringsSep "\n" (lib.mapAttrsToList + (n: v: "subs.${n} = https://www.immae.eu/.well-known/chatonsinfos/service-${n}.properties") mergedServices + )) + "\n" + ( + builtins.concatStringsSep "\n" (lib.mapAttrsToList + (n: v: "subs.hosting-${n} = https://www.immae.eu/.well-known/chatonsinfos/hosting-${n}.properties") mergedHostings + ))); + toHostingProperties = name: content: pkgs.writeText name (toProperties (lib.recursiveUpdate (before "hosting") (lib.recursiveUpdate content (after "hosting")))); + toServiceProperties = name: content: pkgs.writeText name (toProperties (lib.recursiveUpdate (before "service") (lib.recursiveUpdate content (after "service")))); + + cfg = config.myServices.chatonsProperties; + mergedServices = lib.foldr (v: o: lib.recursiveUpdate o v) {} (lib.mapAttrsToList (k: v: v.config.myServices.chatonsProperties.services) nodes); + mergedHostings = lib.foldr (v: o: lib.recursiveUpdate o v) {} (lib.mapAttrsToList (k: v: v.config.myServices.chatonsProperties.hostings) nodes); +in { + options.myServices.chatonsProperties.enable = lib.mkEnableOption "Enable chatons properties"; + options.myServices.chatonsProperties.organization = lib.mkOption { + type = lib.types.attrsOf lib.types.unspecified; + default = {}; + description = '' + nested attrs of strings or arrays of strings + ''; + }; + options.myServices.chatonsProperties.services = lib.mkOption { + type = lib.types.attrsOf lib.types.unspecified; + default = {}; + description = '' + nested attrs of strings or arrays of strings + ''; + }; + options.myServices.chatonsProperties.hostings = lib.mkOption { + type = lib.types.attrsOf lib.types.unspecified; + default = {}; + description = '' + nested attrs of strings or arrays of strings + ''; + }; + config = lib.mkIf cfg.enable { + myServices.chatonsProperties.hostings.infogerance = { + file.datetime = "2022-08-27T18:50:00"; + hosting = { + name = "Infogérance"; + description = "Administration de serveurs"; + website = "https://www.immae.eu/"; + logo = "https://assets.immae.eu/logo.jpg"; + type = "HOSTEDSERVER"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + }; + services.websites.env.production.vhostConfs.immae_production.extraConfig = let + chatons = pkgs.runCommand "chatons" {} '' + mkdir -p $out + cp ${toOrganizationProperties "immae-eu"} $out/immae-eu.properties + ${builtins.concatStringsSep "\n" (lib.mapAttrsToList (n: c: "cp ${toHostingProperties n c} $out/hosting-${n}.properties") mergedHostings)} + ${builtins.concatStringsSep "\n" (lib.mapAttrsToList (n: c: "cp ${toServiceProperties n c} $out/service-${n}.properties") mergedServices)} + ''; + in [ + '' + Alias /.well-known/chatonsinfos ${chatons} + + Options Indexes FollowSymLinks MultiViews Includes + AllowOverride None + Require all granted + + '' + ]; + }; +} diff --git a/modules/private/coturn.nix b/modules/private/coturn.nix index 41e836b..d8b02c5 100644 --- a/modules/private/coturn.nix +++ b/modules/private/coturn.nix @@ -1,6 +1,26 @@ -{ config, name, lib, ... }: +{ config, name, lib, pkgs, ... }: { config = lib.mkIf (name == "eldiron") { + myServices.chatonsProperties.services.coturn = { + file.datetime = "2022-08-27T19:00:00"; + service = { + name = "Coturn"; + description = "coturn TURN server"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "FULL"; + install.type = "PACKAGE"; + }; + software = { + name = "coturn"; + website = "https://github.com/coturn/coturn"; + license.url = "https://github.com/coturn/coturn/blob/master/LICENSE"; + license.name = "3-Clause BSD License"; + version = pkgs.coturn.version; + source.url = "https://github.com/coturn/coturn"; + }; + }; networking.firewall.allowedTCPPorts = [ config.services.coturn.alt-listening-port config.services.coturn.alt-tls-listening-port diff --git a/modules/private/databases/mariadb_replication.nix b/modules/private/databases/mariadb_replication.nix index 68e6f7f..efe55a3 100644 --- a/modules/private/databases/mariadb_replication.nix +++ b/modules/private/databases/mariadb_replication.nix @@ -73,6 +73,26 @@ in }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.hostings.mysql-replication = { + file.datetime = "2022-08-27T15:00:00"; + hosting = { + name = "Mysql replication"; + description = "Replication of mysql database"; + website = "db-1.immae.eu"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "MariaDB"; + website = "https://mariadb.org/"; + license.url = "https://github.com/MariaDB/server/blob/10.11/COPYING"; + license.name = "GNU General Public License v2.0"; + version = pkgs.mariadb.version; + source.url = "https://github.com/MariaDB/server"; + }; + }; users.users.mysql = { description = "MySQL server user"; group = "mysql"; diff --git a/modules/private/databases/postgresql_replication.nix b/modules/private/databases/postgresql_replication.nix index 135bbed..67eb33f 100644 --- a/modules/private/databases/postgresql_replication.nix +++ b/modules/private/databases/postgresql_replication.nix @@ -50,6 +50,26 @@ in }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.hostings.postgresql-replication = { + file.datetime = "2022-08-27T15:00:00"; + hosting = { + name = "PostgreSQL replication"; + description = "Replication of PostgreSQL database"; + website = "db-1.immae.eu"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "PostgreSQL"; + website = "https://www.postgresql.org/"; + license.url = "https://www.postgresql.org/about/licence/"; + license.name = "The PostgreSQL Licence"; + version = pkgs.postgresql.version; + source.url = "https://git.postgresql.org/gitweb/?p=postgresql.git;a=summary"; + }; + }; users.users.postgres = { name = "postgres"; uid = config.ids.uids.postgres; diff --git a/modules/private/default.nix b/modules/private/default.nix index d2a11d0..09ed090 100644 --- a/modules/private/default.nix +++ b/modules/private/default.nix @@ -15,6 +15,7 @@ set = { mariadbReplication = ./databases/mariadb_replication.nix; redisReplication = ./databases/redis_replication.nix; openldapReplication = ./databases/openldap_replication.nix; + chatonsProperties = ./chatons.nix; websites = ./websites; gemini = ./gemini; diff --git a/modules/private/dns.nix b/modules/private/dns.nix index 81cf25e..8fc4045 100644 --- a/modules/private/dns.nix +++ b/modules/private/dns.nix @@ -84,6 +84,26 @@ (_: v: "${n} IN MX ${v.mx.priority} ${v.mx.subdomain}.${conf.name}.") mxes); in lib.mkIf config.myServices.dns.enable { + myServices.chatonsProperties.hostings.dns-secondaire = { + file.datetime = "2022-08-22T02:00:00"; + hosting = { + name = "DNS secondaire"; + description = "DNS secondaire"; + website = "ns1.immae.eu"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "bind9"; + website = pkgs.bind.meta.homepage; + license.url = pkgs.bind.meta.license.url; + license.name = pkgs.bind.meta.license.fullName; + version = pkgs.bind.version; + source.url = "https://www.isc.org/download/"; + }; + }; networking.firewall.allowedUDPPorts = [ 53 ]; networking.firewall.allowedTCPPorts = [ 53 ]; users.users.named.extraGroups = [ "keys" ]; diff --git a/modules/private/ftp.nix b/modules/private/ftp.nix index 63eda99..d6742e2 100644 --- a/modules/private/ftp.nix +++ b/modules/private/ftp.nix @@ -30,6 +30,74 @@ in }; config = lib.mkIf config.myServices.ftp.enable { + myServices.chatonsProperties.services.espace-de-stockage = { + file.datetime = "2022-08-22T01:00:00"; + service = { + name = "Espace de stockage"; + description = "Compte FTP/SFTP"; + logo = if pure-ftpd-enabled + then "https://www.pureftpd.org/project/pure-ftpd/images/favicon.png" + else if proftpd-enabled + then "http://proftpd.org/proftpd.png" + else ""; + website = "ftp.immae.eu"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = if pure-ftpd-enabled then { + name = "Pure-ftpd"; + website = "https://www.pureftpd.org/project/pure-ftpd/"; + license.url = "https://github.com/jedisct1/pure-ftpd/blob/master/COPYING"; + license.name = "MIT Licence"; + version = package.version; + source.url = "https://github.com/jedisct1/pure-ftpd/"; + modules = "openssh"; + } else if proftpd-enabled then { + name = "ProFTPD"; + website = "http://proftpd.org/"; + license.url = "https://github.com/proftpd/proftpd/blob/master/COPYING"; + license.name = "GNU General Public License v2.0"; + version = pkgs.proftpd.version; + source.url = "https://github.com/proftpd/proftpd/"; + modules = "openssh"; + } else {}; + }; + #myServices.chatonsProperties.services.ftp = { + # file.datetime = "2022-08-22T01:00:00"; + # service = { + # name = "Comptes FTP"; + # description = "Compte FTP/SFTP"; + # logo = if pure-ftpd-enabled + # then "https://www.pureftpd.org/project/pure-ftpd/images/favicon.png" + # else if proftpd-enabled + # then "http://proftpd.org/proftpd.png" + # else ""; + # website = "ftp.immae.eu"; + # status.level = "OK"; + # status.description = "OK"; + # registration."" = ["MEMBER" "CLIENT"]; + # registration.load = "OPEN"; + # install.type = "PACKAGE"; + # }; + # software = if pure-ftpd-enabled then { + # name = "Pure-ftpd"; + # website = "https://www.pureftpd.org/project/pure-ftpd/"; + # license.url = "https://github.com/jedisct1/pure-ftpd/blob/master/COPYING"; + # license.name = "MIT Licence"; + # version = package.version; + # source.url = "https://github.com/jedisct1/pure-ftpd/"; + # } else if proftpd-enabled then { + # name = "ProFTPD"; + # website = "http://proftpd.org/"; + # license.url = "https://github.com/proftpd/proftpd/blob/master/COPYING"; + # license.name = "GNU General Public License v2.0"; + # version = pkgs.proftpd.version; + # source.url = "https://github.com/proftpd/proftpd/"; + # } else {}; + #}; security.acme.certs."ftp" = config.myServices.certificates.certConfig // { domain = "eldiron.immae.eu"; # FIXME: make it global diff --git a/modules/private/gemini/default.nix b/modules/private/gemini/default.nix index ffe8a12..600afbc 100644 --- a/modules/private/gemini/default.nix +++ b/modules/private/gemini/default.nix @@ -14,6 +14,30 @@ in { options.myServices.gemini.enable = lib.mkEnableOption "enable Gemini capsule"; config = lib.mkIf config.myServices.gemini.enable { + security.acme.certs.immae.postRun = '' + systemctl restart gemini.service + ''; + myServices.chatonsProperties.hostings.gemini = { + file.datetime = "2022-08-27T18:00:00"; + hosting = { + name = "Hébergement Gemini"; + description = "Hébergement de capsules Gemini"; + type = "INSTANCE"; + website = "gemini://immae.eu"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "twins"; + website = "https://code.rocketnine.space/tslocum/twins"; + license.url = "https://code.rocketnine.space/tslocum/twins/src/branch/master/LICENSE"; + license.name = "MIT License"; + version = pkgs.twins.version; + source.url = "https://code.rocketnine.space/tslocum/twins"; + }; + }; networking.firewall.allowedTCPPorts = [ 1965 ]; systemd.services.gemini = { description = "Gemini capsule server"; diff --git a/modules/private/gitolite/default.nix b/modules/private/gitolite/default.nix index e34d4fa..d1325f8 100644 --- a/modules/private/gitolite/default.nix +++ b/modules/private/gitolite/default.nix @@ -11,6 +11,29 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.gitolite = { + file.datetime = "2022-08-21T10:01:00"; + service = { + name = "Gitolite"; + description = "Gitolite allows you to setup git hosting on a central server, with fine-grained access control and many more powerful features."; + website = "https://git.immae.eu"; + logo = "https://git.immae.eu/cgit-css/favicon.ico"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + guide.user = "https://www.immae.eu/docs/forge-logicielle.html"; + }; + software = { + name = "Gitolite"; + website = "https://gitolite.com/gitolite/"; + license.url = "https://github.com/sitaramc/gitolite/blob/master/COPYING"; + license.name = "GNU General Public License v2.0"; + version = pkgs.gitolite.version; + source.url = "https://github.com/sitaramc/gitolite"; + }; + }; myServices.ssh.modules = [{ snippet = builtins.readFile ./ldap_gitolite.sh; dependencies = [ pkgs.gitolite ]; diff --git a/modules/private/irc.nix b/modules/private/irc.nix index bc0bfb4..427e74e 100644 --- a/modules/private/irc.nix +++ b/modules/private/irc.nix @@ -17,6 +17,30 @@ in }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.bitlbee = { + file.datetime = "2022-08-27T19:00:00"; + service = { + name = "Bitlbee"; + description = "An IRC to other chat networks gateway"; + logo = "https://www.bitlbee.org/style/logo.png"; + website = "irc.immae.eu"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "FULL"; + install.type = "PACKAGE"; + }; + software = { + name = "BitlBee"; + website = "https://www.bitlbee.org/"; + license.url = "https://github.com/bitlbee/bitlbee/blob/master/COPYING"; + license.name = "GNU General Public License v2.0"; + version = pkgs.bitlbee.version; + source.url = "https://github.com/bitlbee/bitlbee"; + modules = map (a: a.pname) config.services.bitlbee.plugins + ++ map (a: a.pname) config.services.bitlbee.libpurple_plugins; + }; + }; security.acme.certs."irc" = config.myServices.ircCerts // { domain = "irc.immae.eu"; postRun = '' diff --git a/modules/private/mail/dovecot.nix b/modules/private/mail/dovecot.nix index ae06f2f..3c3ae3d 100644 --- a/modules/private/mail/dovecot.nix +++ b/modules/private/mail/dovecot.nix @@ -13,6 +13,29 @@ let in { config = lib.mkIf config.myServices.mail.enable { + myServices.chatonsProperties.services.email = { + file.datetime = "2022-08-22T01:00:00"; + service = { + name = "E-mail account"; + description = "Compte e-mail avec configuration imap et smtp/pop3"; + logo = "https://www.dovecot.org/wp-content/uploads/2021/09/favicon.ico"; + website = "https://mail.immae.eu/"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Dovecot"; + website = "https://www.dovecot.org/"; + license.url = "https://github.com/dovecot/core/blob/main/COPYING"; + license.name = "MIT and LGPLv2.1 Licenses"; + version = pkgs.dovecot.version; + source.url = "https://github.com/dovecot/core"; + modules = ["roundcube" "rainloop"] ++ map (a: a.pname) config.services.dovecot2.modules; + }; + }; systemd.services.dovecot2.serviceConfig.Slice = "mail.slice"; secrets.keys."dovecot/ldap" = { user = config.services.dovecot2.user; diff --git a/modules/private/mail/postfix.nix b/modules/private/mail/postfix.nix index 21f12ff..89fd096 100644 --- a/modules/private/mail/postfix.nix +++ b/modules/private/mail/postfix.nix @@ -1,6 +1,27 @@ { lib, pkgs, config, nodes, ... }: { config = lib.mkIf config.myServices.mail.enable { + myServices.chatonsProperties.hostings.mx-backup = { + file.datetime = "2022-08-22T01:00:00"; + hosting = { + name = "MX Backup"; + description = "Serveur e-mail secondaire"; + logo = "https://www.postfix.org/favicon.ico"; + website = "https://mail.immae.eu/"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Postfix"; + website = "http://www.postfix.org/"; + license.url = "http://postfix.mirrors.ovh.net/postfix-release/LICENSE"; + license.name = "Eclipse Public license (EPL 2.0) and IBM Public License (IPL 1.0)"; + version = pkgs.postfix.version; + source.url = "http://www.postfix.org/download.html"; + }; + }; secrets.keys = { "postfix/mysql_alias_maps" = { user = config.services.postfix.user; diff --git a/modules/private/mail/sympa.nix b/modules/private/mail/sympa.nix index 420f706..75bc15e 100644 --- a/modules/private/mail/sympa.nix +++ b/modules/private/mail/sympa.nix @@ -5,6 +5,28 @@ let in { config = lib.mkIf config.myServices.mail.enable { + myServices.chatonsProperties.services.sympa = { + file.datetime = "2022-08-22T00:50:00"; + service = { + name = "Sympa"; + description = "Mailing lists service"; + website = "https://mail.immae.eu/sympa"; + logo = "https://mail.immae.eu/static-sympa/icons/favicon_sympa.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Sympa"; + website = "https://www.sympa.org/"; + license.url = "https://github.com/sympa-community/sympa/blob/sympa-6.2/COPYING"; + license.name = "GNU General Public License v2.0"; + version = pkgs.sympa.version; + source.url = "https://github.com/sympa-community/sympa/"; + }; + }; myServices.databases.postgresql.authorizedHosts = { backup-2 = [ { diff --git a/modules/private/monitoring/default.nix b/modules/private/monitoring/default.nix index 2e0773a..f48e206 100644 --- a/modules/private/monitoring/default.nix +++ b/modules/private/monitoring/default.nix @@ -145,6 +145,28 @@ in }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.hostings.monitoring = lib.mkIf cfg.master { + file.datetime = "2022-08-27T16:00:00"; + hosting = { + name = "Monitoring"; + description = "Website and server health monitoring"; + website = "https://status.immae.eu"; + logo = "https://www.naemon.io/favicon.ico"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "naemon"; + website = "https://www.naemon.io/"; + license.url = "https://github.com/naemon/naemon-core/blob/master/COPYING"; + license.name = "GNU General Public License v2.0"; + version = config.services.naemon.package.version; + source.url = "https://github.com/naemon/naemon-core"; + modules = "livestatus,status-engine"; + }; + }; services.nginx = lib.mkIf config.myServices.status.enable { virtualHosts."status.immae.eu".locations = objectsFiles // { "=/common/immae.cfg" = { diff --git a/modules/private/pub/default.nix b/modules/private/pub/default.nix index 6a7855e..bfe8c2a 100644 --- a/modules/private/pub/default.nix +++ b/modules/private/pub/default.nix @@ -11,6 +11,28 @@ }; config = lib.mkIf config.myServices.pub.enable { + myServices.chatonsProperties.services.vm-like = { + file.datetime = "2022-08-22T01:00:00"; + service = { + name = "Comptes shell"; + description = "Compte shell cloisonné"; + logo = "https://www.openssh.com/favicon.ico"; + website = "pub.immae.eu"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Openssh"; + website = "https://www.openssh.com/"; + license.url = "https://github.com/openssh/openssh-portable/blob/master/LICENCE"; + license.name = "BSD Licence"; + version = pkgs.openssh.version; + source.url = "https://github.com/openssh/openssh-portable"; + }; + }; myServices.ssh.modules = [{ snippet = builtins.readFile ./ldap_pub.sh; dependencies = [ pkgs.coreutils ]; diff --git a/modules/private/system/backup-2.nix b/modules/private/system/backup-2.nix index 05b61e5..83caf68 100644 --- a/modules/private/system/backup-2.nix +++ b/modules/private/system/backup-2.nix @@ -64,6 +64,27 @@ enable = true; }; + myServices.chatonsProperties.hostings.rsync-backup = { + file.datetime = "2022-08-27T16:00:00"; + hosting = { + name = "Rsync backups"; + description = "Remote initiated rsync backups"; + website = "backup-2.v.immae.eu"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "rsync"; + website = "https://rsync.samba.org/"; + license.url = "https://rsync.samba.org/GPL.html"; + license.name = "GNU General Public License version 3"; + version = pkgs.rsync.version; + source.url = "https://github.com/WayneD/rsync"; + }; + }; + services.rsyncBackup = { mountpoint = "/backup2"; profiles = config.myEnv.rsync_backup.profiles; diff --git a/modules/private/system/eldiron.nix b/modules/private/system/eldiron.nix index f3bed74..6ae3875 100644 --- a/modules/private/system/eldiron.nix +++ b/modules/private/system/eldiron.nix @@ -123,7 +123,7 @@ services.netdata.config.health."enabled" = "no"; services.netdata.config.web.mode = "none"; users.users."${config.services.netdata.user}".extraGroups = [ "keys" ]; - environment.etc."netdata/stream.conf".source = config.secrets.fullPaths."netdata-stream.conf"; + services.netdata.configDir."stream.conf" = config.secrets.fullPaths."netdata-stream.conf"; secrets.keys = { "netdata-stream.conf" = { user = config.services.netdata.user; diff --git a/modules/private/system/monitoring-1.nix b/modules/private/system/monitoring-1.nix index 192aa93..c45835f 100644 --- a/modules/private/system/monitoring-1.nix +++ b/modules/private/system/monitoring-1.nix @@ -37,13 +37,13 @@ ]; services.netdata.enable = true; + services.netdata.configDir."stream.conf" = config.secrets.fullPaths."netdata-stream.conf"; services.netdata.config.web."allow dashboard from" = "localhost"; services.netdata.config.web."allow badges from" = "*"; services.netdata.config.web."allow streaming from" = "*"; services.netdata.config.web."allow netdata.conf from" = "fd*"; services.netdata.config.web."allow management from" = "fd*"; networking.firewall.allowedTCPPorts = [ 19999 ]; - environment.etc."netdata/stream.conf".source = config.secrets.fullPaths."netdata-stream.conf"; secrets.keys = { "netdata-stream.conf" = { diff --git a/modules/private/tasks/default.nix b/modules/private/tasks/default.nix index 7eb8688..087885d 100644 --- a/modules/private/tasks/default.nix +++ b/modules/private/tasks/default.nix @@ -86,6 +86,28 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.taskwarrior = { + file.datetime = "2022-08-22T00:00:00"; + service = { + name = "Taskwarrior"; + description = "Taskwarrior is Free and Open Source Software that manages your TODO list from the command line. Web interface and synchronization server"; + website = "https://task.immae.eu/"; + logo = "https://taskwarrior.org/favicon.ico"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Taskwarrior"; + website = "https://taskwarrior.org/"; + license.url = "https://github.com/GothenburgBitFactory/taskwarrior/blob/develop/LICENSE"; + license.name = "MIT License"; + version = pkgs.webapps.taskwarrior-web.version; + source.url = "https://taskwarrior.org/download/"; + }; + }; secrets.keys = { "webapps/tools-taskwarrior-web" = { user = "wwwrun"; diff --git a/modules/private/vpn/default.nix b/modules/private/vpn/default.nix index d4b197d..adee67c 100644 --- a/modules/private/vpn/default.nix +++ b/modules/private/vpn/default.nix @@ -8,6 +8,27 @@ in }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.hostings.vpn = { + file.datetime = "2022-08-27T18:00:00"; + hosting = { + name = "VPN"; + description = "VPN"; + website = "https://vpn.immae.eu"; + logo = "https://tinc-vpn.org/favicon.ico"; + status.level = "OK"; + status.description = "OK"; + registration.load = "FULL"; + install.type = "PACKAGE"; + }; + software = { + name = "tinc"; + website = "https://tinc-vpn.org/"; + license.url = "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"; + license.name = "GNU General Public License v2.0"; + version = pkgs.tinc.version; + source.url = "https://tinc-vpn.org/git/browse?p=tinc"; + }; + }; secrets.keys = { "tinc/key.priv" = { user = "root"; diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix index 5920fbe..f226083 100644 --- a/modules/private/websites/default.nix +++ b/modules/private/websites/default.nix @@ -102,6 +102,27 @@ in options.myServices.websites.enable = lib.mkEnableOption "enable websites"; config = lib.mkIf config.myServices.websites.enable { + myServices.chatonsProperties.hostings.web = { + file.datetime = "2022-08-22T01:30:00"; + hosting = { + name = "Hébergement Web"; + description = "Service d'hébergement web avec php/mysql/postgresql"; + website = "https://www.immae.eu"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Apache Httpd"; + website = "https://httpd.apache.org/"; + license.url = "https://www.apache.org/licenses/"; + license.name = "Apache License Version 2"; + version = pkgs.apacheHttpd.version; + source.url = "https://httpd.apache.org/download.cgi"; + modules = "openssh,pure-ftpd"; + }; + }; users.users.wwwrun.extraGroups = [ "keys" ]; networking.firewall.allowedTCPPorts = [ 80 443 ]; diff --git a/modules/private/websites/immae/chatons/immae-eu.properties b/modules/private/websites/immae/chatons/immae-eu.properties deleted file mode 100644 index 32b2d47..0000000 --- a/modules/private/websites/immae/chatons/immae-eu.properties +++ /dev/null @@ -1,46 +0,0 @@ -# https://framagit.org/chatons/chatonsinfos/-/blob/master/MODELES/organization.properties - -# [File] -file.class = organization -file.protocol = ChatonsInfos-0.1 -file.datetime = 2021-01-11T22:23:00 -file.generator = Immae avec ses doigts - -# [Organisation] -organization.country.name = France -organization.country.code = FR -organization.name = ImmaeEu -organization.description = ImmaeEu est un CHATONS des Alpes Maritimes -organization.website = https://www.immae.eu -organization.logo = https://assets.immae.eu/logo.jpg -organization.socialnetworks.diaspora = https://diaspora.immae.eu/people/1a185f29cc76cb35 -organization.socialnetworks.facebook = https://www.facebook.com/ismael.bouya -organization.socialnetworks.mastodon = https://mastodon.immae.eu/@immae -organization.socialnetworks.peertube = https://peertube.immae.eu/accounts/immae/ -organization.socialnetworks.twitter = https://twitter.com/_immae -organization.chatrooms.xmpp = ismael@immae.fr -organization.chatrooms.irc = immae@freenode -organization.chatrooms.matrix = @immae:matrix.org -organization.owner.name = Ismaël Bouya -organization.owner.website = https://www.immae.eu -organization.owner.logo = https://assets.immae.eu/logo.jpg -organization.contact.url = https://www.immae.eu/contacts_fr.html -organization.contact.email = contact@mail.immae.eu -organization.legal.url = https://www.immae.eu/mentions.html -organization.guide.technical = https://git.immae.eu/cgit/perso/Immae/Config/Nix.git/ -organization.status.level = ACTIVE -organization.status.description = En activité -organization.startdate = 01/01/2019 - -organization.memberof.chatons.startdate = 01/07/2019 -organization.memberof.chatons.status.level = ACTIVE -organization.memberof.chatons.status.description = Participe au collectif - -# [Subs] -# Un lien vers un fichier properties complémentaire (type URL, optionnel, ex. https://www.chapril.org/.well-known/chapril.properties). -subs.etherpad = https://www.immae.eu/.well-known/chatonsinfos/service-etherpad.properties - - -# [Metrics] -#metrics.http.total.2020 = - diff --git a/modules/private/websites/immae/chatons/service-etherpad.properties b/modules/private/websites/immae/chatons/service-etherpad.properties deleted file mode 100644 index cfcab1d..0000000 --- a/modules/private/websites/immae/chatons/service-etherpad.properties +++ /dev/null @@ -1,164 +0,0 @@ -# service.properties - -# [File] -# Classe du fichier (valeur parmi Federation/Organization/Service/Device, obligatoire). -file.class = service - -# Version de l'ontologie utilisée utilisé (type STRING, recommandé). -file.protocol = ChatonsInfos-0.1 - -# Date et horaire de génération du fichier (type DATETIME, recommandé). -file.datetime = 2021-01-04T00:01:00 - -# Nom du générateur du fichier (type STRING, recommandé). Exemple : Florian avec ses doigts -file.generator = Immae avec ses doigts - - -# [Service] -# Nom du service (type STRING, obligatoire). Exemple : Pad Exemple -service.name = Etherpard - -# Description du service (type STRING, recommandé). -service.description = Éditeur de texte collaboratif en temps réel. on peut y écrire simultanément. - -# Lien du site web du service (type URL, recommandé). Exemple : https://pad.exemple.ext -service.website = https://ether.immae.eu - -# Lien du logo du service (type URL, recommandé, ex. https://www.chapril.org/.well-known/statoolinfos/chapril-logo-mini.png. -service.logo = https://ether.immae.eu/favicon.ico - -# Lien de la page web des mentions légales du service (type URL, recommandé). Exemple : https://pad.exemple.ext/cgu.html -service.legal.url = https://www.immae.eu/mentions.html - -# Lien de la documentation web du service (type URL, recommandé). -service.guide.technical = https://git.immae.eu/cgit/perso/Immae/Config/Nix.git/ - -# Lien des aides web pour le service (type URL, recommandé). -service.guide.user = - -# Lien de la page de support du service (type URL, recommandé). Exemple : https://exemple.ext/contact.html -service.contact.url = https://www.immae.eu/contacts_fr.html - -# Courriel du support du service (type EMAIL, recommandé). Exemple : contact@exemple.ext -service.contact.email = contact@mail.immae.eu - -# Date d'ouverture du service (type DATE, recommandé). Exemple : 20/03/2020 -service.startdate = 01/01/2019 - -# Date de fermeture du service (type DATE, optionnel). -service.enddate = - -# Statut du service (un parmi {OK,WARNING,ALERT,ERROR,OVER,VOID}, obligatoire). -service.status.level = OK - -# Description du statut du service (type STRING, optionnel, exemple : mise à jour en cours) -service.status.description = OK - -# Inscriptions requises pour utiliser le service (parmi None;Free;Member;Client, obligatoire). -service.registration = None - -# [Software] -# Nom du logiciel (type STRING, obligatoire). -software.name = Etherpad - -# Lien du site web du logiciel (type URL, recommandé). -software.website = https://etherpad.org/ - -# Lien web vers la licence du logiciel (type URL, obligatoire). -software.license.url = https://github.com/ether/etherpad-lite/blob/develop/LICENSE - -# Nom de la licence du logiciel (type STRING, obligatoire). -software.license.name = Apache License Version 2.0 - -# Version du logiciel (type STRING, recommandé). -software.version = 1.8.3 - -# Lien web vers les sources du logiciel (type URL, recommandé). -software.source.url = https://github.com/ether/etherpad-lite - -# Liste de modules optionnels installés (type VALUES, optionnel, ex. Nextcloud-Calendar,Nextcloud-Talk). -software.modules = ep_align,ep_bookmark,ep_colors,ep_comments_page,ep_cursortrace,ep_delete_empty_pads,ep_embedmedia,ep_font_size,ep_headings2,ep_immae_buttons,ep_ldapauth,ep_line_height,ep_markdown,ep_mypads,ep_page_view,ep_previewimages,ep_ruler,ep_scrollto,ep_set_title_on_pad,ep_subscript_and_superscript,ep_timesliderdiff - - -# [Host] -# Nom de l'hébergeur de la machine qui fait tourner le service, dans le cas d'un auto-hébergement c'est vous ! (type STRING, obligatoire). Exemple : OVH. -host.name = Hetzner - -# Description de l'hébergeur (type STRING, optionnel). -host.description = - -# Type de serveur (un parmi NANO, PHYSICAL, VIRTUAL, SHARED, CLOUD, obligatoire, ex. PHYSICAL). -# NANO : nano-ordinateur (Raspberry Pi, Olimex…) -# PHYSICAL : machine physique -# VIRTUAL : machine virtuelle -# SHARED : hébergement mutualisé -# CLOUD : infrastructure multi-serveurs -host.server.type = PHYSICAL - -# Type d'hébergement (un parmi HOME, HOSTEDBAY, HOSTEDSERVER, OUTSOURCED, obligatoire, ex. HOSTEDSERVER). -# HOME : hébergement à domicile -# HOSTEDBAY : serveur personnel hébergé dans une baie d'un fournisseur -# HOSTEDSERVER : serveur d'un fournisseur -# OUTSOURCED : infrastructure totalement sous-traitée -host.provider.type = HOSTEDSERVER - -# Si vous avez du mal à remplir les champs précédents, ce tableau pourra vous aider : -# NANO PHYSICAL VIRTUAL SHARED CLOUD -# HOME pm pm vm shared cloud -# HOSTEDBAY -- pm vm shared cloud -# HOSTEDSERVER -- pm vm shared cloud -# OUTSOURCED -- -- vps shared cloud -# Légendes : pm : physical machine ; vm : virtual machine ; vps : virtual private server. - -# Pays de l'hébergeur (type STRING, recommandé). Exemple : France -host.country.name = Allemagne - -# Code pays de l'hébergeur (type STRING, recommandé). Exemple : FR -host.country.code = DE - - - -# [Subs] -# Un lien vers un fichier properties complémentaire (type URL, optionnel). Exemple : https:// -subs.foo = - -# [Metrics] -# Nom du métrique (type STRING, recommandé). -metrics.http.total.name = Nombre total de requêtes HTTP - -# Description du métrique (type STRING, recommandé). -metrics.http.total.description = Somme des requêtes HTTP ipv4 et ipv6. - -# Métrique à valeur anuelle (type NUMERIC, optionnel). -metrics.http.total.2020 = - -# Métrique à valeur mensuelle (type MONTHS, optionnel). -metrics.http.total.2020.months= - -# Métrique à valeur hebdomadaire (type WEEKS, optionnel). -metrics.http.total.2020.weeks= - -# Métrique à valeur quotidienne (type DAYS, optionnel). -metrics.http.total.2020.days= - - -# Nom du métrique (type STRING, recommandé). -metrics.visitors.total.name = Nombre total de visiteurs - -# Description du métrique (type STRING, recommandé). -metrics.visitors.total.description = - -# Métrique à valeur anuelle (type NUMERIC, optionnel). -metrics.visitors.total.2020 = - -# Métrique à valeur mensuelle (type MONTHS, optionnel). -metrics.visitors.total.2020.months= - -# Métrique à valeur hebdomadaire (type WEEKS, optionnel). -metrics.visitors.total.2020.weeks= - -# Métrique à valeur quotidienne (type DAYS, optionnel). -metrics.visitors.total.2020.days= - - -# [Metrics spécifiques au service] diff --git a/modules/private/websites/immae/production.nix b/modules/private/websites/immae/production.nix index e0f51e2..95a8a41 100644 --- a/modules/private/websites/immae/production.nix +++ b/modules/private/websites/immae/production.nix @@ -12,6 +12,7 @@ in { options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website"; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.enable = true; services.webstats.sites = [ { name = "www.immae.eu"; } ]; services.websites.env.production.vhostConfs.immae_production = { @@ -44,13 +45,6 @@ in { Require all granted - Alias /.well-known/chatonsinfos ${./chatons} - - Options Indexes FollowSymLinks MultiViews Includes - AllowOverride None - Require all granted - - Alias /.well-known/matrix ${./matrix} Options Indexes FollowSymLinks MultiViews Includes diff --git a/modules/private/websites/tools/cloud/default.nix b/modules/private/websites/tools/cloud/default.nix index a09b629..929fabb 100644 --- a/modules/private/websites/tools/cloud/default.nix +++ b/modules/private/websites/tools/cloud/default.nix @@ -48,6 +48,44 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.hostings.nextcloud = { + file.datetime = "2022-08-21T19:50:00"; + hosting = { + name = "Nextcloud"; + description = "The self-hosted productivity platform that keeps you in control"; + website = "https://cloud.immae.eu/"; + logo = "https://cloud.immae.eu/core/img/favicon.ico"; + type = "INSTANCE"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + }; + myServices.chatonsProperties.services.nextcloud = { + file.datetime = "2022-08-21T19:50:00"; + service = { + name = "Nextcloud"; + description = "The self-hosted productivity platform that keeps you in control"; + website = "https://cloud.immae.eu/"; + logo = "https://cloud.immae.eu/core/img/favicon.ico"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + guide.user = "https://www.immae.eu/docs/nextcloud.html"; + }; + software = { + name = "Nextcloud"; + website = "https://nextcloud.com/"; + license.url = "https://github.com/nextcloud/server/blob/master/COPYING"; + license.name = "GNU Affero General Public License v3.0"; + version = nextcloud.version; + source.url = "https://github.com/nextcloud/server"; + modules = map (a: a.appName) nextcloud.apps; + }; + }; services.websites.env.tools.modules = [ "proxy_fcgi" ]; services.websites.env.tools.vhostConfs.cloud = { diff --git a/modules/private/websites/tools/commento/default.nix b/modules/private/websites/tools/commento/default.nix index c36255b..385b0d6 100644 --- a/modules/private/websites/tools/commento/default.nix +++ b/modules/private/websites/tools/commento/default.nix @@ -12,6 +12,28 @@ in enable = lib.mkEnableOption "Enable commento website"; }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.commento = { + file.datetime = "2022-08-21T01:11:00"; + service = { + name = "Commento"; + description = "Commento is a fast, privacy-focused commenting platform"; + website = "https://commento.immae.eu"; + logo = "https://commento.immae.eu/images/logo.svg"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Commento"; + website = "https://www.commento.io/"; + license.url = "https://gitlab.com/commento/commento/-/blob/master/LICENSE"; + license.name = "MIT License"; + version = pkgs.commento.version; + source.url = "https://gitlab.com/commento/commento"; + }; + }; secrets.keys = { "commento/env" = { permissions = "0400"; diff --git a/modules/private/websites/tools/cryptpad/default.nix b/modules/private/websites/tools/cryptpad/default.nix index 69b9877..bea5c44 100644 --- a/modules/private/websites/tools/cryptpad/default.nix +++ b/modules/private/websites/tools/cryptpad/default.nix @@ -32,6 +32,42 @@ in { options.myServices.websites.tools.cryptpad.enable = lib.mkEnableOption "Enable Cryptpad"; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.hostings.cryptpad = { + file.datetime = "2022-08-21T01:20:00"; + hosting = { + name = "Cryptpad"; + description = "Collaboration suite, encrypted and open-source"; + website = "https://cryptpad.immae.eu/"; + logo = "https://cryptpad.immae.eu/customize/favicon/main-favicon.png"; + type = "INSTANCE"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + }; + myServices.chatonsProperties.services.cryptpad = { + file.datetime = "2022-08-21T01:20:00"; + service = { + name = "Cryptpad"; + description = "Collaboration suite, encrypted and open-source"; + website = "https://cryptpad.immae.eu/"; + logo = "https://cryptpad.immae.eu/customize/favicon/main-favicon.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["NONE" "FREE" "MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Cryptpad"; + website = "https://cryptpad.org/"; + license.url = "https://github.com/xwiki-labs/cryptpad/blob/main/LICENSE"; + license.name = "GNU Affero General Public License v3.0"; + version = pkgs.cryptpad.version; + source.url = "https://github.com/xwiki-labs/cryptpad"; + }; + }; myServices.tools.cryptpad.farm.hosts.immaeEu = { inherit domain port; config = configFile; diff --git a/modules/private/websites/tools/dav/default.nix b/modules/private/websites/tools/dav/default.nix index b3aa03d..289a569 100644 --- a/modules/private/websites/tools/dav/default.nix +++ b/modules/private/websites/tools/dav/default.nix @@ -27,6 +27,75 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services = { + davical = { + file.datetime = "2022-08-21T01:33:00"; + service = { + name = "Davical"; + description = "DAViCal is a server for calendar sharing"; + website = "https://dav.immae.eu"; + logo = "https://www.davical.org/images/logo.gif"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Davical"; + website = "https://www.davical.org/"; + license.url = "https://gitlab.com/davical-project/davical/-/blob/master/COPYING"; + license.name = "GNU General Public License Version 2"; + version = pkgs.webapps.davical.version; + source.url = "https://gitlab.com/davical-project/davical/"; + modules = "infcloud"; + }; + }; + #calendar = { + # file.datetime = "2022-08-22T00:00:00"; + # service = { + # name = "Calendar"; + # description = "Opensource CalDAV web client"; + # website = "https://dav.immae.eu/caldavzap/"; + # logo = "https://dav.immae.eu/caldavzap/images/infcloud_logo.svg"; + # status.level = "OK"; + # status.description = "OK"; + # registration."" = ["MEMBER" "CLIENT"]; + # registration.load = "OPEN"; + # install.type = "PACKAGE"; + # }; + # software = { + # name = "InfCloud"; + # website = "https://inf-it.com/open-source/clients/infcloud/"; + # license.url = "https://www.gnu.org/licenses/agpl-3.0.en.html"; + # license.name = "GNU Affero General Public License (version 3.0)"; + # version = pkgs.webapps.infcloud.version; + # source.url = "https://inf-it.com/open-source/clients/infcloud/"; + # }; + #}; + #contacts = { + # file.datetime = "2022-08-22T00:00:00"; + # service = { + # name = "Contacts"; + # description = "Opensource Carddav web client"; + # website = "https://dav.immae.eu/carddavmate/"; + # logo = "https://dav.immae.eu/caldavzap/images/infcloud_logo.svg"; + # status.level = "OK"; + # status.description = "OK"; + # registration."" = ["MEMBER" "CLIENT"]; + # registration.load = "OPEN"; + # install.type = "PACKAGE"; + # }; + # software = { + # name = "InfCloud"; + # website = "https://inf-it.com/open-source/clients/infcloud/"; + # license.url = "https://www.gnu.org/licenses/agpl-3.0.en.html"; + # license.name = "GNU Affero General Public License (version 3.0)"; + # version = pkgs.webapps.infcloud.version; + # source.url = "https://inf-it.com/open-source/clients/infcloud/"; + # }; + #}; + }; system.activationScripts.davical = davical.activationScript; secrets.keys = davical.keys; services.websites.env.tools.modules = davical.apache.modules; diff --git a/modules/private/websites/tools/diaspora/default.nix b/modules/private/websites/tools/diaspora/default.nix index 60e32ff..cba8ae4 100644 --- a/modules/private/websites/tools/diaspora/default.nix +++ b/modules/private/websites/tools/diaspora/default.nix @@ -10,6 +10,28 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.diaspora = { + file.datetime = "2022-08-21T01:39:00"; + service = { + name = "Diaspora"; + description = "The online social world where you are in control"; + website = "https://diaspora.immae.eu"; + logo = "https://diaspora.immae.eu/assets/apple-touch-icon-9f7c9cc3923b4817fbb25bfeb0dd5fd34638827fd9c82b5a03f7b68e6e90806f.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Diaspora*"; + website = "https://diasporafoundation.org/"; + license.url = "https://github.com/diaspora/diaspora/blob/develop/LICENSE"; + license.name = "GNU Affero General Public License v3.0"; + version = dcfg.package.version; + source.url = "https://github.com/diaspora/diaspora"; + }; + }; users.users.diaspora.extraGroups = [ "keys" ]; secrets.keys = { diff --git a/modules/private/websites/tools/ether/default.nix b/modules/private/websites/tools/ether/default.nix index f1128b5..acf9ec6 100644 --- a/modules/private/websites/tools/ether/default.nix +++ b/modules/private/websites/tools/ether/default.nix @@ -12,6 +12,29 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.etherpad = { + file.datetime = "2021-01-04T00:01:00"; + service = { + name = "Etherpad"; + description = "Éditeur de texte collaboratif en temps réel. on peut y écrire simultanément."; + website = "https://ether.immae.eu"; + logo = "https://ether.immae.eu/favicon.ico"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["NONE" "MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Etherpad"; + website = "https://etherpad.org/"; + license.url = "https://github.com/ether/etherpad-lite/blob/develop/LICENSE"; + license.name = "Apache License Version 2.0"; + version = ecfg.package.version; + source.url = "https://github.com/ether/etherpad-lite"; + modules = ecfg.package.moduleNames; + }; + }; secrets.keys = { "webapps/tools-etherpad-apikey" = { permissions = "0400"; diff --git a/modules/private/websites/tools/games/codenames/default.nix b/modules/private/websites/tools/games/codenames/default.nix index 25eb62d..513678f 100644 --- a/modules/private/websites/tools/games/codenames/default.nix +++ b/modules/private/websites/tools/games/codenames/default.nix @@ -11,6 +11,28 @@ in { options.myServices.websites.games.codenames.enable = lib.mkEnableOption "Enable Codenames game"; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.codenames = { + file.datetime = "2022-08-27T14:08:00"; + service = { + name = "Codenames Green"; + description = "Co-op codenames app"; + website = "https://codenames.games.immae.eu/"; + logo = "https://codenames.games.immae.eu/images/apple-touch-icon.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["NONE"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Codenames Green"; + website = "https://www.codenamesgreen.com/"; + license.url = "https://github.com/jbowens/codenamesgreen/blob/master/package.json"; + license.name = "MIT"; + version = greenapid.version; + source.url = "https://github.com/jbowens/codenamesgreen"; + }; + }; systemd.services.codenames_api = { description = "Api for codenames game"; wantedBy = [ "multi-user.target" ]; diff --git a/modules/private/websites/tools/games/terraforming-mars/default.nix b/modules/private/websites/tools/games/terraforming-mars/default.nix index 0df5363..0948a8c 100644 --- a/modules/private/websites/tools/games/terraforming-mars/default.nix +++ b/modules/private/websites/tools/games/terraforming-mars/default.nix @@ -6,6 +6,28 @@ in { options.myServices.websites.games.terraforming-mars.enable = lib.mkEnableOption "Enable Terraforming mars game"; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.terraforming-mars = { + file.datetime = "2022-08-27T14:20:00"; + service = { + name = "Terraforming Mars"; + description = "Terraforming Mars Boardgame"; + website = "https://terraforming-mars.games.immae.eu/"; + logo = "https://terraforming-mars.games.immae.eu/favicon.ico"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["NONE"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Terraforming Mars"; + website = "https://github.com/terraforming-mars/terraforming-mars"; + license.url = "https://github.com/terraforming-mars/terraforming-mars/blob/main/LICENSE"; + license.name = "GNU General Public License v3.0"; + version = "unversionned"; + source.url = "https://github.com/terraforming-mars/terraforming-mars"; + }; + }; systemd.services.terraforming-mars = { path = [ pkgs.nodejs pkgs.bashInteractive ]; description = "Terraforming mars game"; diff --git a/modules/private/websites/tools/git/default.nix b/modules/private/websites/tools/git/default.nix index 8f611ee..8e40b42 100644 --- a/modules/private/websites/tools/git/default.nix +++ b/modules/private/websites/tools/git/default.nix @@ -16,6 +16,30 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.mantisbt = { + file.datetime = "2022-08-21T10:08:00"; + service = { + name = "MantisBT"; + description = "Mantis Bug Tracker"; + website = "https://git.immae.eu/mantisbt"; + logo = "https://git.immae.eu/mantisbt/images/favicon.ico"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + guide.user = "https://www.immae.eu/docs/forge-logicielle.html"; + }; + software = { + name = "MantisBT"; + website = "https://mantisbt.org/"; + license.url = "https://opensource.org/licenses/gpl-license"; + license.name = "GNU General Public License"; + version = mantisbt.webRoot.version; + source.url = "https://github.com/mantisbt/mantisbt"; + modules = mantisbt.webRoot.pluginNames; + }; + }; secrets.keys = mantisbt.keys; services.websites.env.tools.modules = gitweb.apache.modules ++ diff --git a/modules/private/websites/tools/im/default.nix b/modules/private/websites/tools/im/default.nix index 94dc4f8..372fa32 100644 --- a/modules/private/websites/tools/im/default.nix +++ b/modules/private/websites/tools/im/default.nix @@ -8,6 +8,73 @@ in }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.converse = { + file.datetime = "2022-08-21T19:20:00"; + service = { + name = "Converse"; + description = "A free and open-source XMPP chat client in your browser"; + website = "https://im.immae.fr/converse"; + logo = "https://conversejs.org/docs/html/_static/favicon.ico"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["NONE" "FREE"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Converse"; + website = "https://conversejs.org/"; + license.name = "Mozilla Public License 2.0"; + license.url = "https://github.com/conversejs/converse.js/blob/master/LICENSE"; + version = "9.1.1"; + source.url = "https://github.com/conversejs/converse.js"; + }; + }; + myServices.chatonsProperties.services.weechat-bridge = { + file.datetime = "2022-08-21T19:20:00"; + service = { + name = "Weechat bridge"; + description = "WeeChat web frontend"; + website = "https://im.immae.fr/glowing-bear"; + logo = "https://im.immae.fr/glowing-bear/assets/img/glowing_bear_128x128.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["NONE" "FREE"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Glowing bear"; + website = "https://www.ejabberd.im/"; + license.name = "GNU General Public License v3.0"; + license.url = "https://github.com/processone/ejabberd"; + version = pkgs.glowing-bear.version; + source.url = "https://github.com/glowing-bear/glowing-bear"; + }; + }; + myServices.chatonsProperties.services.xmpp = { + file.datetime = "2022-08-21T19:20:00"; + service = { + name = "XMPP"; + description = "Universal messaging standard"; + website = "https://im.immae.fr/"; + logo = "https://xmpp.org/favicon-32x32.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "ejabberd"; + website = "https://www.ejabberd.im/"; + license.url = "https://github.com/processone/ejabberd/blob/master/COPYING"; + license.name = "GNU GENERAL PUBLIC LICENSE Version 2"; + version = pkgs.ejabberd.version; + source.url = "https://github.com/processone/ejabberd"; + modules = "converse"; + }; + }; services.websites.env.tools.vhostConfs.im = { certName = "eldiron"; addToCerts = true; diff --git a/modules/private/websites/tools/kanboard/farm.nix b/modules/private/websites/tools/kanboard/farm.nix index 5e37292..a845429 100644 --- a/modules/private/websites/tools/kanboard/farm.nix +++ b/modules/private/websites/tools/kanboard/farm.nix @@ -73,6 +73,42 @@ in }; config = lib.mkIf (builtins.length (builtins.attrNames cfg.instances) > 0) { + myServices.chatonsProperties.hostings.kanboard = { + file.datetime = "2022-08-21T19:40:00"; + hosting = { + name = "Kanboard"; + description = "Kanban project management software"; + website = "https://tools.immae.eu/kanboard"; + logo = "https://tools.immae.eu/kanboard/assets/img/favicon.png"; + type = "INSTANCE"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + }; + myServices.chatonsProperties.services.kanboard = { + file.datetime = "2022-08-21T19:40:00"; + service = { + name = "Kanboard"; + description = "Kanban project management software"; + website = "https://tools.immae.eu/kanboard"; + logo = "https://tools.immae.eu/kanboard/assets/img/favicon.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Kanboard"; + website = "https://kanboard.org/"; + license.url = "https://github.com/kanboard/kanboard/blob/main/LICENSE"; + license.name = "MIT License"; + version = pkgs.kanboard.version; + source.url = "https://github.com/kanboard/kanboard"; + }; + }; system.activationScripts.kanboard_farm_vardirs = { deps = [ "httpd" ]; text = '' diff --git a/modules/private/websites/tools/mail/default.nix b/modules/private/websites/tools/mail/default.nix index 390f7ad..377410c 100644 --- a/modules/private/websites/tools/mail/default.nix +++ b/modules/private/websites/tools/mail/default.nix @@ -21,6 +21,51 @@ in ]; config = lib.mkIf cfg.enable { + #myServices.chatonsProperties.services.mail-rainloop = { + # file.datetime = "2022-08-22T00:30:00"; + # service = { + # name = "Rainloop"; + # description = "Simple, modern & fast web-based email client"; + # website = "https://mail.immae.eu/rainloop"; + # logo = "https://www.rainloop.net/static/img/logo-16x16.png"; + # status.level = "ERROR"; + # status.description = "Stopped due to CVE-2022-29360"; + # registration."" = ["MEMBER" "CLIENT"]; + # registration.load = "OPEN"; + # install.type = "PACKAGE"; + # }; + # software = { + # name = "Rainloop"; + # website = "https://www.rainloop.net/"; + # license.url = "https://www.rainloop.net/licensing/"; + # license.name = "GNU Affero General Public License v3.0"; + # version = rainloop.webRoot.version; + # source.url = "https://github.com/RainLoop/rainloop-webmail"; + # }; + #}; + #myServices.chatonsProperties.services.mail-roundcube = { + # file.datetime = "2022-08-22T00:30:00"; + # service = { + # name = "Roundcube"; + # description = "The Roundcube Webmail suite"; + # website = "https://mail.immae.eu/roundcube"; + # logo = "https://mail.immae.eu/roundcube/skins/elastic/images/favicon.ico"; + # status.level = "OK"; + # status.description = "OK"; + # registration."" = ["MEMBER" "CLIENT"]; + # registration.load = "OPEN"; + # install.type = "PACKAGE"; + # }; + # software = { + # name = "Roundcube"; + # website = "https://roundcube.net/"; + # license.url = "https://github.com/roundcube/roundcubemail/blob/master/LICENSE"; + # license.name = "GNU General Public License v3.0"; + # version = roundcubemail.webRoot.version; + # source.url = "https://github.com/roundcube/roundcubemail"; + # modules = map (a: a.pluginName) roundcubemail.webRoot.plugins ++ map (a: a.skinName) roundcubemail.webRoot.skins; + # }; + #}; secrets.keys = roundcubemail.keys; services.websites.env.tools.modules = diff --git a/modules/private/websites/tools/mastodon/default.nix b/modules/private/websites/tools/mastodon/default.nix index 37da3c3..94d2bc7 100644 --- a/modules/private/websites/tools/mastodon/default.nix +++ b/modules/private/websites/tools/mastodon/default.nix @@ -10,6 +10,28 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.mastodon = { + file.datetime = "2022-08-21T19:50:00"; + service = { + name = "Mastodon"; + description = "Your self-hosted, globally interconnected microblogging community"; + website = "https://mastodon.immae.eu/"; + logo = "https://mastodon.immae.eu/apple-touch-icon.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Mastodon"; + website = "https://joinmastodon.org/"; + license.url = "https://github.com/tootsuite/mastodon/blob/master/LICENSE"; + license.name = "GNU General Public License v3.0"; + version = mcfg.package.version; + source.url = "https://github.com/tootsuite/mastodon"; + }; + }; secrets.keys."webapps/tools-mastodon" = { user = "mastodon"; group = "mastodon"; diff --git a/modules/private/websites/tools/mgoblin/default.nix b/modules/private/websites/tools/mgoblin/default.nix index 1e5f5a0..24bb5c4 100644 --- a/modules/private/websites/tools/mgoblin/default.nix +++ b/modules/private/websites/tools/mgoblin/default.nix @@ -9,6 +9,29 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.mediagoblin = { + file.datetime = "2022-08-21T20:00:00"; + service = { + name = "Mediagoblin"; + description = "MediaGoblin is a free software media publishing platform that anyone can run"; + website = "https://mgoblin.immae.eu/"; + logo = "https://mgoblin.immae.eu/mgoblin_static/images/goblin.ico"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Mediagoblin"; + website = "https://mediagoblin.org/"; + license.url = "http://www.gnu.org/licenses/agpl.html"; + license.name = "GNU Affero General Public License"; + version = mcfg.package.version; + source.url = "https://git.savannah.gnu.org/git/mediagoblin.git"; + modules = map (a: a.pluginName) mcfg.package.plugins; + }; + }; secrets.keys."webapps/tools-mediagoblin" = { user = "mediagoblin"; group = "mediagoblin"; diff --git a/modules/private/websites/tools/peertube/default.nix b/modules/private/websites/tools/peertube/default.nix index c491d92..0269e80 100644 --- a/modules/private/websites/tools/peertube/default.nix +++ b/modules/private/websites/tools/peertube/default.nix @@ -9,6 +9,42 @@ in { }; config = lib.mkIf cfg.enable { + 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"; diff --git a/modules/private/websites/tools/tools/default.nix b/modules/private/websites/tools/tools/default.nix index e640eb6..133ab9f 100644 --- a/modules/private/websites/tools/tools/default.nix +++ b/modules/private/websites/tools/tools/default.nix @@ -82,6 +82,39 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services = { + dokuwiki = dokuwiki.chatonsProperties; + shaarli = shaarli.chatonsProperties; + ttrss = ttrss.chatonsProperties; + wallabag = wallabag.chatonsProperties; + paste = { + file.datetime = "2022-08-22T00:15:00"; + service = { + name = "Paste"; + description = "A simple paster script with syntax highlight"; + website = "https://tools.immae.eu/paste/"; + logo = "https://assets.immae.eu/logo.jpg"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + guide.user = "https://tools.immae.eu/paste/"; + }; + software = { + name = "Paste"; + website = "https://tools.immae.eu/paste/"; + license.url = "https://tools.immae.eu/paste/license"; + license.name = "MIT License"; + version = "Unversioned"; + source.url = "https://tools.immae.eu/paste/abcd123/py"; + }; + }; + }; + myServices.chatonsProperties.hostings = { + dokuwiki = dokuwiki.chatonsHostingProperties; + phpbb = phpbb.chatonsHostingProperties; + }; secrets.keys = kanboard.keys // ldap.keys diff --git a/modules/private/websites/tools/tools/dokuwiki.nix b/modules/private/websites/tools/tools/dokuwiki.nix index aee495a..724168e 100644 --- a/modules/private/websites/tools/tools/dokuwiki.nix +++ b/modules/private/websites/tools/tools/dokuwiki.nix @@ -16,6 +16,43 @@ rec { install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions ''; }; + chatonsHostingProperties = { + file.datetime = "2022-08-21T22:50:00"; + hosting = { + name = "Dokuwiki"; + description = "DokuWiki is a simple to use and highly versatile Open Source wiki software"; + website = "https://tools.immae.eu/dokuwiki/"; + logo = "https://tools.immae.eu/dokuwiki/lib/tpl/dokuwiki/images/apple-touch-icon.png"; + type = "INSTANCE"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + }; + chatonsProperties = { + file.datetime = "2022-08-21T22:50:00"; + service = { + name = "Dokuwiki"; + description = "DokuWiki is a simple to use and highly versatile Open Source wiki software"; + website = "https://tools.immae.eu/dokuwiki/"; + logo = "https://tools.immae.eu/dokuwiki/lib/tpl/dokuwiki/images/apple-touch-icon.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Dokuwiki"; + website = "https://www.dokuwiki.org/dokuwiki"; + license.url = "http://www.gnu.org/licenses/gpl-2.0.html"; + license.name = "GNU General Public License Version 2"; + version = webRoot.version; + source.url = "https://download.dokuwiki.org/"; + modules = map (a: a.pluginName) webRoot.plugins; + }; + }; webRoot = dokuwiki.withPlugins (p: [ p.farmer p.todo ]); apache = rec { user = "wwwrun"; diff --git a/modules/private/websites/tools/tools/phpbb.nix b/modules/private/websites/tools/tools/phpbb.nix index 77845c3..88c7817 100644 --- a/modules/private/websites/tools/tools/phpbb.nix +++ b/modules/private/websites/tools/tools/phpbb.nix @@ -12,6 +12,20 @@ rec { install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions ''; }; + chatonsHostingProperties = { + file.datetime = "2022-08-21T22:50:00"; + hosting = { + name = "phpBB"; + description = "Forum software"; + website = "https://tools.immae.eu/forum"; + logo = "https://www.phpbb.com/favicon.ico"; + type = "INSTANCE"; + status.level = "OK"; + status.description = "OK"; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + }; webRoot = phpbb; apache = rec { user = "wwwrun"; diff --git a/modules/private/websites/tools/tools/shaarli.nix b/modules/private/websites/tools/tools/shaarli.nix index d128465..462de51 100644 --- a/modules/private/websites/tools/tools/shaarli.nix +++ b/modules/private/websites/tools/tools/shaarli.nix @@ -33,6 +33,29 @@ in rec { ''; }; + chatonsProperties = { + file.datetime = "2022-08-21T22:50:00"; + service = { + name = "Shaarli"; + description = "The personal, minimalist, super-fast, database free, bookmarking service - community repo"; + website = "https://tools.immae.eu/Shaarli/"; + logo = "https://tools.immae.eu/Shaarli/tpl/default/img/apple-touch-icon.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Shaarli"; + website = "https://shaarli.readthedocs.io/"; + license.url = "https://github.com/shaarli/Shaarli/blob/master/COPYING"; + license.name = "GNU General Public License Version 3"; + version = webRoot.version; + source.url = "https://github.com/shaarli/Shaarli"; + modules = "ldap-connection-patch"; + }; + }; keys."webapps/tools-shaarli" = { user = apache.user; group = apache.group; diff --git a/modules/private/websites/tools/tools/ttrss.nix b/modules/private/websites/tools/tools/ttrss.nix index f1842aa..c34817f 100644 --- a/modules/private/websites/tools/tools/ttrss.nix +++ b/modules/private/websites/tools/tools/ttrss.nix @@ -16,6 +16,29 @@ rec { install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions ''; }; + chatonsProperties = { + file.datetime = "2022-08-21T22:50:00"; + service = { + name = "RSS"; + description = "Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader and aggregator"; + website = "https://tools.immae.eu/ttrss/"; + logo = "https://tools.immae.eu/ttrss/images/favicon.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Tiny Tiny RSS"; + website = "https://tt-rss.org/"; + license.url = "https://www.gnu.org/copyleft/gpl.html"; + license.name = "GNU General Public License Version 3"; + version = webRoot.version; + source.url = "https://git.tt-rss.org/fox/tt-rss.git/"; + modules = map (p: p.pluginName) webRoot.plugins; + }; + }; keys."webapps/tools-ttrss" = { user = apache.user; group = apache.group; diff --git a/modules/private/websites/tools/tools/wallabag.nix b/modules/private/websites/tools/tools/wallabag.nix index 0ebdb0b..8ec7c29 100644 --- a/modules/private/websites/tools/tools/wallabag.nix +++ b/modules/private/websites/tools/tools/wallabag.nix @@ -64,6 +64,29 @@ rec { arguments: ['/run/wrappers/bin/sendmail -bs'] ''; }; + chatonsProperties = { + file.datetime = "2022-08-21T22:50:00"; + service = { + name = "Wallabag"; + description = "wallabag is a self hostable application for saving web pages: Save and classify articles. Read them later. Freely."; + website = "https://tools.immae.eu/wallabag/"; + logo = "https://tools.immae.eu/wallabag/wallassets/themes/_global/img/appicon/apple-touch-icon-120.png"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Wallabag"; + website = "https://wallabag.org/en"; + license.url = "https://github.com/wallabag/wallabag/blob/master/COPYING.md"; + license.name = "MIT License"; + version = webappDir.version; + source.url = "https://github.com/wallabag/wallabag"; + modules = "ldap-patch"; + }; + }; webappDir = wallabag.override { ldap = true; wallabag_config = config.secrets.fullPaths."webapps/tools-wallabag"; }; activationScript = '' install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} \ diff --git a/modules/private/websites/tools/tools/yourls.nix b/modules/private/websites/tools/tools/yourls.nix index 3717520..c59fae3 100644 --- a/modules/private/websites/tools/tools/yourls.nix +++ b/modules/private/websites/tools/tools/yourls.nix @@ -39,6 +39,29 @@ rec { define( 'LDAPAUTH_USERCACHE_TYPE', 0); ''; }; + chatonsProperties = { + file.datetime = "2022-08-27T18:00:00"; + service = { + name = "Yourls"; + description = "Your own URL shortener"; + website = "https://tools.immae.eu/url/admin/"; + logo = "https://tools.immae.eu/url/images/favicon.gif"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "FULL"; + install.type = "PACKAGE"; + }; + software = { + name = "YOURLS"; + website = "http://yourls.org/"; + license.url = "https://github.com/YOURLS/YOURLS/blob/master/LICENSE"; + license.name = "MIT License"; + version = webRoot.version; + source.url = "https://github.com/YOURLS/YOURLS"; + modules = map (a: a.pluginName) webRoot.plugins; + }; + }; webRoot = (yourls.override { yourls_config = config.secrets.fullPaths."webapps/tools-yourls"; }).withPlugins (p: [p.ldap]); apache = rec { user = "wwwrun"; diff --git a/modules/private/websites/tools/visio/default.nix b/modules/private/websites/tools/visio/default.nix index f9b2e59..7636732 100644 --- a/modules/private/websites/tools/visio/default.nix +++ b/modules/private/websites/tools/visio/default.nix @@ -8,6 +8,27 @@ in { }; config = lib.mkIf cfg.enable { + myServices.chatonsProperties.services.galene = { + file.datetime = "2022-08-21T22:45:00"; + service = { + name = "Galene"; + description = "The Galène videoconference server"; + website = "https://visio.immae.eu/"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["NONE"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Galene"; + website = "https://galene.org/"; + license.url = "https://github.com/jech/galene/blob/master/LICENCE"; + license.name = "MIT License"; + version = pkgs.galene.version; + source.url = "https://github.com/jech/galene"; + }; + }; services.galene = { enable = true; httpPort = port; diff --git a/pkgs/webapps/mantisbt_2/default.nix b/pkgs/webapps/mantisbt_2/default.nix index 5aa04d1..466595d 100644 --- a/pkgs/webapps/mantisbt_2/default.nix +++ b/pkgs/webapps/mantisbt_2/default.nix @@ -5,6 +5,7 @@ let (name: callPackage (./plugins + "/${name}") {}); toPassthru = pkg: plugins: { inherit plugins allPlugins; + pluginNames = map (n: n.pluginName) plugins; withPlugins = withPlugins pkg; }; withPlugins = pkg: toPlugins: diff --git a/pkgs/webapps/mantisbt_2/plugins/source-integration/default.nix b/pkgs/webapps/mantisbt_2/plugins/source-integration/default.nix index dc6c7de..1ab00c5 100644 --- a/pkgs/webapps/mantisbt_2/plugins/source-integration/default.nix +++ b/pkgs/webapps/mantisbt_2/plugins/source-integration/default.nix @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { cp -a Source* $out/ ''; passthru = { + pluginName = "source-integration"; selector = "Source*"; }; } -- 2.41.0