79 lines
1.4 KiB
Nix
79 lines
1.4 KiB
Nix
{
|
|
inputs,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
imports = [ inputs.copyparty.nixosModules.default ];
|
|
nixpkgs.overlays = [ inputs.copyparty.overlays.default ];
|
|
environment.systemPackages = [ pkgs.copyparty ];
|
|
services.copyparty = {
|
|
enable = true;
|
|
|
|
group = "starr";
|
|
|
|
settings = {
|
|
p = [ 8086 ];
|
|
e2dsa = true;
|
|
e2ts = true;
|
|
z = true;
|
|
qr = true;
|
|
xff-hdr = "X-Real-IP";
|
|
xff-src = "lan";
|
|
rproxy = 1;
|
|
http-only = true;
|
|
og = true;
|
|
shr = "/shares";
|
|
};
|
|
|
|
accounts = {
|
|
serhao = {
|
|
passwordFile = config.age.secrets.copyparty-serhao.path;
|
|
};
|
|
};
|
|
|
|
volumes = {
|
|
"/movies" = {
|
|
path = "/mnt/mediacenter/media/movies";
|
|
access = {
|
|
r = "*";
|
|
};
|
|
};
|
|
"/shows" = {
|
|
path = "/mnt/mediacenter/media/shows";
|
|
access = {
|
|
r = "*";
|
|
};
|
|
};
|
|
|
|
"/musics" = {
|
|
path = "/mnt/mediacenter/media/musics";
|
|
access = {
|
|
r = "*";
|
|
};
|
|
};
|
|
"/mediacenter" = {
|
|
path = "/mnt/mediacenter/media";
|
|
access = {
|
|
rw = ["serhao"];
|
|
};
|
|
flags = {
|
|
e2d = true;
|
|
};
|
|
};
|
|
"/data" = {
|
|
path = "/mnt/data";
|
|
access = {
|
|
rwd = ["serhao"];
|
|
};
|
|
flags = {
|
|
e2d = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ 8086 ];
|
|
}
|