aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/ressourcerie_banon/cryptpad.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 01:35:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 02:11:48 +0200
commit1a64deeb894dc95e2645a75771732c6cc53a79ad (patch)
tree1b9df4838f894577a09b9b260151756272efeb53 /modules/private/websites/ressourcerie_banon/cryptpad.nix
parentfa25ffd4583cc362075cd5e1b4130f33306103f0 (diff)
downloadNix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository
Diffstat (limited to 'modules/private/websites/ressourcerie_banon/cryptpad.nix')
-rw-r--r--modules/private/websites/ressourcerie_banon/cryptpad.nix49
1 files changed, 0 insertions, 49 deletions
diff --git a/modules/private/websites/ressourcerie_banon/cryptpad.nix b/modules/private/websites/ressourcerie_banon/cryptpad.nix
deleted file mode 100644
index 7aea728..0000000
--- a/modules/private/websites/ressourcerie_banon/cryptpad.nix
+++ /dev/null
@@ -1,49 +0,0 @@
1{ lib, pkgs, config, ... }:
2let
3 cfg = config.myServices.websites.ressourcerie_banon.cryptpad;
4 envCfg = config.myEnv.tools.cryptpad.ressourcerie_banon;
5 port = envCfg.port;
6 configFile = pkgs.writeText "config.js" ''
7 // ${pkgs.cryptpad}/lib/node_modules/cryptpad/config/config.example.js
8 module.exports = {
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',
16 blockPath: './block',
17 blobPath: './blob',
18 blobStagingPath: './data/blobstage',
19 decreePath: './data/decrees',
20 logPath: './data/logs',
21 logToStdout: false,
22 logLevel: 'info',
23 logFeedback: false,
24 verbose: false,
25 inactiveTime: false,
26 adminKeys: ${builtins.toJSON envCfg.admins},
27 };
28 '';
29 domain = "pad.le-garage-autonome.org";
30in {
31 options.myServices.websites.ressourcerie_banon.cryptpad.enable = lib.mkEnableOption "Enable Ressourcerie Banon’s cryptpad";
32
33 config = lib.mkIf cfg.enable {
34 myServices.tools.cryptpad.farm.hosts.ressourcerie_banon = {
35 inherit domain port;
36 config = configFile;
37 };
38 services.websites.env.production.modules = [ "proxy_wstunnel" ];
39 services.websites.env.production.vhostConfs.ressourcerie_banon_cryptpad = {
40 certName = "ressourcerie_banon";
41 addToCerts = true;
42 hosts = [domain];
43 root = config.myServices.tools.cryptpad.farm.vhostRoots.ressourcerie_banon;
44 extraConfig = [
45 config.myServices.tools.cryptpad.farm.vhosts.ressourcerie_banon
46 ];
47 };
48 };
49}