commit
e032370b99
3 changed files with 58 additions and 1 deletions
|
|
@ -9,6 +9,7 @@
|
|||
"caddy"
|
||||
"copyparty"
|
||||
"couchdb"
|
||||
"cryptpad"
|
||||
"homepage-dashboard"
|
||||
"immich"
|
||||
"jellyfin"
|
||||
|
|
|
|||
49
modules/nixos/features/cryptpad.nix
Normal file
49
modules/nixos/features/cryptpad.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
let
|
||||
httpPort = 5022;
|
||||
websocketPort = 5024;
|
||||
certloc = "/var/lib/acme/fi33.buzz";
|
||||
in
|
||||
{
|
||||
services = {
|
||||
cryptpad = {
|
||||
enable = true;
|
||||
settings = {
|
||||
inherit httpPort;
|
||||
inherit websocketPort;
|
||||
httpUnsafeOrigin = "https://cryptpad.fi33.buzz";
|
||||
httpSafeOrigin = "https://cryptpad-ui.fi33.buzz";
|
||||
inactiveTime = 7;
|
||||
archiveRetentionTime = 7;
|
||||
accountRetentionTime = 7;
|
||||
};
|
||||
};
|
||||
|
||||
caddy.virtualHosts."cryptpad.fi33.buzz, cryptpad-ui.fi33.buzz".extraConfig = ''
|
||||
header Strict-Transport-Security "includeSubDomains; preload"
|
||||
|
||||
handle /cryptpad_websocket* {
|
||||
reverse_proxy localhost:${toString websocketPort} {
|
||||
header_up Host {host}
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
}
|
||||
|
||||
handle {
|
||||
reverse_proxy localhost:${toString httpPort} {
|
||||
header_up Host {host}
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
}
|
||||
|
||||
@register {
|
||||
host cryptpad.fi33.buzz
|
||||
path /register*
|
||||
}
|
||||
respond @register 403
|
||||
|
||||
tls ${certloc}/cert.pem ${certloc}/key.pem {
|
||||
protocols tls1.3
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -48,9 +48,16 @@ in
|
|||
services = [
|
||||
{
|
||||
"Public Services" = [
|
||||
{
|
||||
CryptPad = {
|
||||
description = "Collaborative office suite";
|
||||
icon = "cryptpad.svg";
|
||||
href = "https://cryptpad.fi33.buzz/";
|
||||
};
|
||||
}
|
||||
{
|
||||
Send = {
|
||||
description = " Simple, private file sharing";
|
||||
description = "Simple, private file sharing";
|
||||
icon = "send.svg";
|
||||
href = "https://send.fi33.buzz/";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue