X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fressourcerie_banon%2Fcryptpad.nix;fp=modules%2Fprivate%2Fwebsites%2Fressourcerie_banon%2Fcryptpad.nix;h=0000000000000000000000000000000000000000;hp=7aea728c66c93b252e5d1c88581d17f22c5089c6;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0 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 @@ -{ lib, pkgs, config, ... }: -let - cfg = config.myServices.websites.ressourcerie_banon.cryptpad; - envCfg = config.myEnv.tools.cryptpad.ressourcerie_banon; - port = envCfg.port; - configFile = pkgs.writeText "config.js" '' - // ${pkgs.cryptpad}/lib/node_modules/cryptpad/config/config.example.js - module.exports = { - httpUnsafeOrigin: 'https://${domain}', - httpPort: ${toString port}, - adminEmail: '${envCfg.email}', - filePath: './datastore/', - archivePath: './data/archive', - pinPath: './data/pins', - taskPath: './data/tasks', - blockPath: './block', - blobPath: './blob', - blobStagingPath: './data/blobstage', - decreePath: './data/decrees', - logPath: './data/logs', - logToStdout: false, - logLevel: 'info', - logFeedback: false, - verbose: false, - inactiveTime: false, - adminKeys: ${builtins.toJSON envCfg.admins}, - }; - ''; - domain = "pad.le-garage-autonome.org"; -in { - options.myServices.websites.ressourcerie_banon.cryptpad.enable = lib.mkEnableOption "Enable Ressourcerie Banon’s cryptpad"; - - config = lib.mkIf cfg.enable { - myServices.tools.cryptpad.farm.hosts.ressourcerie_banon = { - inherit domain port; - config = configFile; - }; - services.websites.env.production.modules = [ "proxy_wstunnel" ]; - services.websites.env.production.vhostConfs.ressourcerie_banon_cryptpad = { - certName = "ressourcerie_banon"; - addToCerts = true; - hosts = [domain]; - root = config.myServices.tools.cryptpad.farm.vhostRoots.ressourcerie_banon; - extraConfig = [ - config.myServices.tools.cryptpad.farm.vhosts.ressourcerie_banon - ]; - }; - }; -}