1 { lib, pkgs, config, ... }:
3 cfg = config.myServices.websites.ressourcerie_banon.cryptpad;
4 envCfg = config.myEnv.tools.cryptpad.ressourcerie_banon;
6 configFile = pkgs.writeText "config.js" ''
7 // ${pkgs.cryptpad}/lib/node_modules/cryptpad/config/config.example.js
9 httpUnsafeOrigin: 'https://${domain}',
10 httpPort: ${toString port},
11 adminEmail: '${envCfg.email}',
12 filePath: './datastore/',
13 archivePath: './data/archive',
14 pinPath: './data/pins',
15 taskPath: './data/tasks',
18 blobStagingPath: './data/blobstage',
19 decreePath: './data/decrees',
20 logPath: './data/logs',
26 adminKeys: ${builtins.toJSON envCfg.admins},
29 domain = "pad.le-garage-autonome.org";
31 options.myServices.websites.ressourcerie_banon.cryptpad.enable = lib.mkEnableOption "Enable Ressourcerie Banon’s cryptpad";
33 config = lib.mkIf cfg.enable {
34 myServices.tools.cryptpad.farm.hosts.ressourcerie_banon = {
38 services.websites.env.production.modules = [ "proxy_wstunnel" ];
39 services.websites.env.production.vhostConfs.ressourcerie_banon_cryptpad = {
40 certName = "ressourcerie_banon";
43 root = config.myServices.tools.cryptpad.farm.vhostRoots.ressourcerie_banon;
45 config.myServices.tools.cryptpad.farm.vhosts.ressourcerie_banon