Compare commits

...

4 commits

Author SHA1 Message Date
chaos f0bc4e058f
add reverse proxy for notes share 2024-04-26 19:58:03 +01:00
chaos c84a946b76
add serve for notes 2024-04-26 19:57:02 +01:00
chaos a657ea7da5
add secrets for webdav and crypt 2024-04-26 19:55:22 +01:00
chaos c5aae8b387
add notes crypt to rclone config 2024-04-26 19:48:34 +01:00
4 changed files with 30 additions and 3 deletions

View file

@ -143,4 +143,10 @@ password2 = STORAGE_GAMING_CRYPT_SALT
[Gaming]
type = chunker
remote = Gaming-Source:
chunk_size = 128Mi
chunk_size = 128Mi
[Notes]
type = crypt
remote = StorageBox:Notes
password = STORAGE_NOTES_CRYPT_PASSWORD
password2 = STORAGE_NOTES_CRYPT_SALT

View file

@ -91,6 +91,7 @@ in {
"/Public/".proxyPass = "http://${containerIP}:${toString ports.webdav_public}";
"/Uploads/".proxyPass = "http://${containerIP}:${toString ports.webdav_uploads}";
"/Gaming/".proxyPass = "http://${containerIP}:${toString ports.webdav_gaming}";
"/Notes/".proxyPass = "http://${containerIP}:${toString ports.webdav_notes}";
};
extraConfig = ''
client_max_body_size ${clientMaxBodySize};

View file

@ -91,6 +91,16 @@ in {
"--vfs-cache-max-age=5m"
"--vfs-cache-max-size=1g"
"--vfs-cache-mode=full"
];
}
{
id = "notes";
remote = "Notes:";
type = "webdav";
extraArgs = [
"--addr=0.0.0.0:${toString ports.webdav_notes}"
"--htpasswd=${secrets.webdav_notes_htpasswd.path}"
"--baseurl=/Notes/"
];
}
{

View file

@ -43,9 +43,11 @@
"api-keys/data/storage/webdav/Public"
"api-keys/data/storage/webdav/Uploads"
"api-keys/data/storage/webdav/Gaming"
"api-keys/data/storage/webdav/Notes"
"private-public-keys/data/rclone/Chaos-Media-Crypt"
"private-public-keys/data/rclone/Chaos-Gaming-Crypt"
"private-public-keys/data/rclone/Chaos-Notes-Crypt"
];
packages = with pkgs; [
@ -235,7 +237,14 @@
simple_get_htpasswd "/api-keys/storage/webdav/Gaming" "$secretFile"
'';
};
webdav_notes_htpasswd = {
user = "storage";
group = "storage";
fetchScript = ''
simple_get_htpasswd "/api-keys/storage/webdav/Notes" "$secretFile"
'';
};
rclone_config = {
user = "storage";
group = "storage";
@ -260,6 +269,7 @@
simple_get_replace_crypt "/private-public-keys/rclone/Chaos-Media-Crypt" "STORAGE_MEDIA_CRYPT" "$secretFile"
simple_get_replace_crypt "/private-public-keys/rclone/Chaos-Gaming-Crypt" "STORAGE_GAMING_CRYPT" "$secretFile"
simple_get_replace_crypt "/private-public-keys/rclone/Chaos-Notes-Crypt" "STORAGE_NOTES_CRYPT" "$secretFile"
'';
};
};