install copyparty

This commit is contained in:
Khaïs COLIN 2025-08-13 17:41:35 +02:00
parent 1e9714ba0b
commit 188ddc66c4
Signed by: logistic-bot
SSH key fingerprint: SHA256:3zI3/tx0ZpCLHCLPmEaGR4oeYCPMCzQxXhXutBmtOAU
3 changed files with 121 additions and 20 deletions

90
flake.lock generated
View file

@ -107,6 +107,25 @@
"url": "ssh://forgejo@forgejo.005540.xyz/logistic-bot/cassowary" "url": "ssh://forgejo@forgejo.005540.xyz/logistic-bot/cassowary"
} }
}, },
"copyparty": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1755035202,
"narHash": "sha256-gFYvDIAU1HoqgYUOuetUsiJZAe1tuU/f0ju5JYoGySg=",
"owner": "9001",
"repo": "copyparty",
"rev": "715d374ee4d849ef4e7da2aec84f68f5dad87458",
"type": "github"
},
"original": {
"owner": "9001",
"repo": "copyparty",
"type": "github"
}
},
"devshell": { "devshell": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -276,6 +295,21 @@
} }
}, },
"flake-utils": { "flake-utils": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
@ -290,7 +324,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
@ -308,7 +342,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_3"
}, },
@ -477,9 +511,9 @@
"mms": { "mms": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"nix": "nix", "nix": "nix",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1669478601, "lastModified": 1669478601,
@ -498,7 +532,7 @@
"nix": { "nix": {
"inputs": { "inputs": {
"lowdown-src": "lowdown-src", "lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"nixpkgs-regression": "nixpkgs-regression" "nixpkgs-regression": "nixpkgs-regression"
}, },
"locked": { "locked": {
@ -562,7 +596,7 @@
}, },
"nixos-06cb-009a-fingerprint-sensor": { "nixos-06cb-009a-fingerprint-sensor": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1734692513, "lastModified": 1734692513,
@ -580,18 +614,17 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1657693803, "lastModified": 1748162331,
"narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", "narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "id": "nixpkgs",
"ref": "nixos-22.05-small", "ref": "nixos-25.05",
"repo": "nixpkgs", "type": "indirect"
"type": "github"
} }
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
@ -639,6 +672,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1657693803,
"narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "365e1b3a859281cf11b94f87231adeabbdd878a2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.05-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1669378442, "lastModified": 1669378442,
"narHash": "sha256-nm+4PN0A4SnV0SzEchxrMyKPvI3Ld/aoom4PnHeHucs=", "narHash": "sha256-nm+4PN0A4SnV0SzEchxrMyKPvI3Ld/aoom4PnHeHucs=",
@ -654,7 +703,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1734323986, "lastModified": 1734323986,
"narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
@ -669,7 +718,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1757810152, "lastModified": 1757810152,
"narHash": "sha256-Vp9K5ol6h0J90jG7Rm4RWZsCB3x7v5VPx588TQ1dkfs=", "narHash": "sha256-Vp9K5ol6h0J90jG7Rm4RWZsCB3x7v5VPx588TQ1dkfs=",
@ -685,7 +734,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1721924956, "lastModified": 1721924956,
"narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=", "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=",
@ -704,7 +753,7 @@
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_6",
"nixvim": "nixvim_2" "nixvim": "nixvim_2"
}, },
"locked": { "locked": {
@ -778,7 +827,7 @@
}, },
"nuschtosSearch": { "nuschtosSearch": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_3",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"nixvim", "nixvim",
@ -801,7 +850,7 @@
}, },
"other-transcode": { "other-transcode": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_4",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -844,11 +893,12 @@
"inputs": { "inputs": {
"breezex-cursor": "breezex-cursor", "breezex-cursor": "breezex-cursor",
"cassowary": "cassowary", "cassowary": "cassowary",
"copyparty": "copyparty",
"home-manager": "home-manager", "home-manager": "home-manager",
"mms": "mms", "mms": "mms",
"nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened", "nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened",
"nixos-06cb-009a-fingerprint-sensor": "nixos-06cb-009a-fingerprint-sensor", "nixos-06cb-009a-fingerprint-sensor": "nixos-06cb-009a-fingerprint-sensor",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim", "nixvim": "nixvim",
"other-transcode": "other-transcode", "other-transcode": "other-transcode",

View file

@ -47,6 +47,8 @@
}; };
mms.url = "github:mkaito/nixos-modded-minecraft-servers"; mms.url = "github:mkaito/nixos-modded-minecraft-servers";
copyparty.url = "github:9001/copyparty";
}; };
outputs = { outputs = {
nixpkgs, nixpkgs,
@ -61,6 +63,7 @@
nixos-06cb-009a-fingerprint-sensor, nixos-06cb-009a-fingerprint-sensor,
cassowary, cassowary,
mms, mms,
copyparty,
... ...
}: let }: let
system = "x86_64-linux"; system = "x86_64-linux";
@ -92,6 +95,12 @@
stylix.nixosModules.stylix stylix.nixosModules.stylix
./stylix.nix ./stylix.nix
copyparty.nixosModules.default
({ ... }: {
# add the copyparty overlay to expose the package to the module
nixpkgs.overlays = [ copyparty.overlays.default ];
})
]; ];
specialArgs = { specialArgs = {
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system}; pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};

View file

@ -56,6 +56,7 @@
# package for controlling brightness on external monitor # package for controlling brightness on external monitor
environment.systemPackages = [ environment.systemPackages = [
pkgs.ddcutil pkgs.ddcutil
pkgs.copyparty
]; ];
# mount external drive # mount external drive
@ -373,6 +374,41 @@
}; };
}; };
services.copyparty = {
enable = true;
settings = {
z = true;
i = "127.0.0.1";
p = "3004";
xff-hdr = "X-Forwarded-For";
xff-src = "127.0.0.1";
rproxy = 1;
e2dsa = true;
e2ts = true;
re-maxage = 7200; # rescan every 2 hours
no-robots = true;
theme = 2;
shr = "/shr";
};
accounts = {
"khais" = {
passwordFile = "/etc/nixos/secrets/copyparty/khais.password";
};
};
volumes = {
"/" = {
path = "/pile/copyparty/";
access = {
"g" = "*";
"A" = ["khais"];
};
flags = {
fk = 8;
};
};
};
};
services.victorialogs = { services.victorialogs = {
enable = true; enable = true;
extraOptions = ["-memory.allowedBytes=100MB"]; extraOptions = ["-memory.allowedBytes=100MB"];
@ -400,6 +436,7 @@
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedProxySettings = true; recommendedProxySettings = true;
logError = "stderr info"; logError = "stderr info";
clientMaxBodySize = "64G";
appendHttpConfig = '' appendHttpConfig = ''
access_log syslog:server=unix:/dev/log combined; access_log syslog:server=unix:/dev/log combined;
''; '';
@ -460,6 +497,11 @@
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
}; };
"copyparty.005540.xyz" = {
locations."/".proxyPass = "http://localhost:3004";
enableACME = true;
forceSSL = true;
};
}; };
}; };
} }