1 { lib, pkgs, config, ... }:
3 cfg = config.myServices.websites.ressourcerie_banon.cryptpad;
4 configFile = "${pkgs.cryptpad}/lib/node_modules/cryptpad/config/config.example.js";
6 options.myServices.websites.ressourcerie_banon.cryptpad.enable = lib.mkEnableOption "Enable Ressourcerie Banon’s cryptpad";
8 config = lib.mkIf cfg.enable {
9 systemd.services.cryptpad-ressourcerie_banon = {
10 description = "Cryptpad Banon Service";
11 wantedBy = [ "multi-user.target" ];
12 after = [ "networking.target" ];
16 "CRYPTPAD_CONFIG=${configFile}"
17 "HOME=%S/cryptpad/ressourcerie_banon"
19 ExecStart = "${pkgs.cryptpad}/bin/cryptpad";
22 StateDirectory = "cryptpad/ressourcerie_banon";
23 WorkingDirectory = "%S/cryptpad/ressourcerie_banon";
26 services.websites.env.production.vhostConfs.ressourcerie_banon_cryptpad = {
27 certName = "ressourcerie_banon";
29 hosts = ["pad.le-garage-autonome.org"];