diff options
Diffstat (limited to 'modules/private/websites/tools/cryptpad/default.nix')
-rw-r--r-- | modules/private/websites/tools/cryptpad/default.nix | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/modules/private/websites/tools/cryptpad/default.nix b/modules/private/websites/tools/cryptpad/default.nix deleted file mode 100644 index 69b9877..0000000 --- a/modules/private/websites/tools/cryptpad/default.nix +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | { config, pkgs, lib, ... }: | ||
2 | let | ||
3 | cfg = config.myServices.websites.tools.cryptpad; | ||
4 | envCfg = config.myEnv.tools.cryptpad.immaeEu; | ||
5 | domain = "cryptpad.immae.eu"; | ||
6 | port = envCfg.port; | ||
7 | configFile = pkgs.writeText "config.js" '' | ||
8 | // ${pkgs.cryptpad}/lib/node_modules/cryptpad/config/config.example.js | ||
9 | module.exports = { | ||
10 | httpUnsafeOrigin: 'https://${domain}', | ||
11 | httpPort: ${toString port}, | ||
12 | adminEmail: '${envCfg.email}', | ||
13 | filePath: './datastore/', | ||
14 | archivePath: './data/archive', | ||
15 | pinPath: './data/pins', | ||
16 | taskPath: './data/tasks', | ||
17 | blockPath: './block', | ||
18 | blobPath: './blob', | ||
19 | blobStagingPath: './data/blobstage', | ||
20 | decreePath: './data/decrees', | ||
21 | logPath: './data/logs', | ||
22 | logToStdout: false, | ||
23 | logLevel: 'info', | ||
24 | logFeedback: false, | ||
25 | verbose: false, | ||
26 | inactiveTime: false, | ||
27 | maxUploadSize: 100 * 1024 * 1024, | ||
28 | adminKeys: ${builtins.toJSON envCfg.admins}, | ||
29 | }; | ||
30 | ''; | ||
31 | in | ||
32 | { | ||
33 | options.myServices.websites.tools.cryptpad.enable = lib.mkEnableOption "Enable Cryptpad"; | ||
34 | config = lib.mkIf cfg.enable { | ||
35 | myServices.tools.cryptpad.farm.hosts.immaeEu = { | ||
36 | inherit domain port; | ||
37 | config = configFile; | ||
38 | }; | ||
39 | services.websites.env.tools.modules = [ "proxy_wstunnel" ]; | ||
40 | services.websites.env.tools.vhostConfs.cryptpad = { | ||
41 | certName = "eldiron"; | ||
42 | addToCerts = true; | ||
43 | hosts = [domain]; | ||
44 | root = config.myServices.tools.cryptpad.farm.vhostRoots.immaeEu; | ||
45 | extraConfig = [ | ||
46 | config.myServices.tools.cryptpad.farm.vhosts.immaeEu | ||
47 | ]; | ||
48 | }; | ||
49 | }; | ||
50 | } | ||