Files
dotfiles/system-modules/nx2site/copyparty.nix
Lennart J. Kurzweg (Nx2) 871a270a21 copyparty
2025-08-24 14:50:35 +02:00

45 lines
1.5 KiB
Nix

{ config, pkgs, ... }@all: with all; {
imports = [ inputs.copyparty.nixosModules.default ];
config = {
sops.secrets."nx2site/copyparty/user-password/${hyper.user}".owner = "copyparty";
environment.systemPackages = with pkgs; [ copyparty ];
services.copyparty = {
enable = true;
package = pkgs.copyparty;
openFilesLimit = 8192;
settings = {
i = [ "0.0.0.0" "unix:770:copyparty:/dev/shm/party.sock" ];
p = [ 3210 3211 ];
no-reload = true;
ignored-flag = false;
shr = "/shares";
css-browser = "https://nx2.site/copyparty/extra-browser.css";
theme = 6;
xff-hdr = "X-Forwarded-For"; # so that cpp knows the real client ip behind nginx. Must match with nginx config
rproxy = 1;
no-robots = true;
};
accounts = {
"${hyper.user}" = {
passwordFile = config.sops.secrets."nx2site/copyparty/user-password/${hyper.user}".path;
};
};
volumes = {
"/" = {
path = "/srv/copyparty/root";
access = {
"A" = "${hyper.user}";
};
flags = {
fk = 4; # url password length
scan = 60; # scan interval in seconds
e2d = true; # volflag "e2d" enables the uploads database
d2t = true; # "d2t" disables multimedia parsers (in case the uploads are malicious)
nohash = "\.iso$"; # skips hashing file contents if path matches *.iso
};
};
};
};
};
}