From 2e99f5b18d48b8839c6b3952fc4b16a4d6f56502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Tue, 19 Jul 2022 13:20:48 +0100 Subject: [PATCH] Add cryptpad --- nixos/boxes/vpsfree1/cryptpad.nix | 23 +++++++++++++++++++++++ nixos/boxes/vpsfree1/default.nix | 1 + 2 files changed, 24 insertions(+) create mode 100644 nixos/boxes/vpsfree1/cryptpad.nix diff --git a/nixos/boxes/vpsfree1/cryptpad.nix b/nixos/boxes/vpsfree1/cryptpad.nix new file mode 100644 index 00000000..8e36d56a --- /dev/null +++ b/nixos/boxes/vpsfree1/cryptpad.nix @@ -0,0 +1,23 @@ +{ config, pkgs, inputs, lib, ... }: { + + imports = [ ../nginx.nix ]; + + services.nginx = { + virtualHosts = { + "notes.purrfect.estate" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:9005"; + proxyWebsockets = true; + }; + }; + }; + }; + + virtualisation.oci-containers.containers.cryptpad = { + image = "promasu/cryptpad"; + ports = [ "9005:3000" ]; + }; + +} diff --git a/nixos/boxes/vpsfree1/default.nix b/nixos/boxes/vpsfree1/default.nix index fa5f7a35..430032b5 100644 --- a/nixos/boxes/vpsfree1/default.nix +++ b/nixos/boxes/vpsfree1/default.nix @@ -9,6 +9,7 @@ ../../server-common.nix ../../tailscale.nix ./foundryvtt.nix + ./cryptpad.nix ]; systemd.extraConfig = ''