nix-flake/modules/system/homelab/docs.nix
satr14 bd7e176671
All checks were successful
Activate Homelab Configuration / rebuild (push) Successful in 24s
cryptpad config
2026-04-29 19:00:06 +07:00

30 lines
No EOL
881 B
Nix

{ homelab, ... }: let
domain = "docs.${homelab.domain}";
sandbox = "docs-sandbox.${homelab.domain}";
data-dir = "/mnt/data/apps/cryptpad";
in {
services.cryptpad = {
enable = true;
settings = {
httpPort = 7090;
httpAddress = "127.0.0.1";
httpUnsafeOrigin = "https://${domain}";
httpSafeOrigin = "https://${sandbox}";
blockDailyCheck = true;
disableIntegratedEviction = true;
archivePath = "${data-dir}/archive";
pinPath = "${data-dir}/pins";
taskPath = "${data-dir}/tasks";
blockPath = "${data-dir}/block";
blobPath = "${data-dir}/blob";
blobStagingPath = "${data-dir}/blobstage";
decreePath = "${data-dir}/decrees";
logPath = "${data-dir}/logs";
};
};
systemd.services.cryptpad.serviceConfig = {
ReadWritePaths = [ data-dir ];
ProtectMountPoints = false;
};
}