Files
homelab/hosts/sin/copyparty.nix
T
sin_serhao f5e3ef7c5b
/ perform flake analysis (push) Failing after 3h7m58s
/ build hive configuration (push) Failing after 12m57s
heuuu plein de trucs en vrais
2026-06-22 11:53:37 +02:00

112 lines
2.3 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; # files indexing
e2ts = true; # multimedia indexing
z = true;
qr = true;
xff-hdr = "X-Real-IP";
xff-src = "lan";
rproxy = 1;
http-only = true;
og = true;
shr = "/shares";
ansi = true; # color in log messages
re-maxage = 60 * 60 * 12; # reindex every 12h
# idp-h-usr = "remote-user";
# idp-h-grp = "remote-group";
# idp-login = "https://auth.shobu.fr/?rd=https://files.shobu.fr";
# idp-logout = "https://auth.shobu.fr/";
};
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/";
access = {
rw = [ "serhao" ];
};
flags = {
e2d = true;
};
};
"/data" = {
path = "/mnt/data";
access = {
rwd = [ "serhao" ];
};
flags = {
e2d = true;
};
};
"/dump" = {
path = "/mnt/data/dump";
access = {
rw = "*";
rwd = [ "serhao" ];
};
flags = {
lifetime = 86400;
df = "100g";
vmaxb = "10g";
};
};
"/dump/quick" = {
path = "/mnt/data/dump/quick";
access = {
rw = "*";
rwd = [ "serhao" ];
};
flags = {
e2ds = true;
pk = "gz,9";
lifetime = 300;
df = "100g";
vmaxb = "10g";
};
};
};
};
networking.firewall.allowedTCPPorts = [ 8086 ];
}