copyparty
This commit is contained in:
44
system-modules/nx2site/copyparty.nix
Normal file
44
system-modules/nx2site/copyparty.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{ 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
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user