aboutsummaryrefslogtreecommitdiff
path: root/modules/services/nixos/copyparty.nix
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-06-23 20:50:07 -0500
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-06-23 20:50:07 -0500
commitf9f970d8364c220c9357f4791fdca2ced72fa804 (patch)
tree6d2ef5e2a3e7dfa8f3640b74181a8bb044e74599 /modules/services/nixos/copyparty.nix
parent9ef174152929b038b01bc2f261b719a57cdad654 (diff)
no more mkCaddyConfig, manually specify ports, no more manual /etc/hosts, started using dnsmasq instead. all works!
Diffstat (limited to 'modules/services/nixos/copyparty.nix')
-rw-r--r--modules/services/nixos/copyparty.nix100
1 files changed, 0 insertions, 100 deletions
diff --git a/modules/services/nixos/copyparty.nix b/modules/services/nixos/copyparty.nix
deleted file mode 100644
index 0e607e2..0000000
--- a/modules/services/nixos/copyparty.nix
+++ /dev/null
@@ -1,100 +0,0 @@
-{
- config,
- lib,
- inputs,
- ...
-}: let
- cfg = config.collinux.services.copyparty;
-in {
- imports = [
- inputs.copyparty.nixosModules.default
- (import ./mkCaddyCfg.nix cfg)
- ];
-
- config = lib.mkIf cfg.enable {
- users.groups."fileserver".members = [config.collinux.user.name];
-
- networking.firewall.allowedTCPPorts = lib.optional (cfg.listenAddr == "0.0.0.0") cfg.port;
-
- services.copyparty = {
- enable = true;
-
- user = "copyparty";
- group = "fileserver";
-
- settings = {
- i = cfg.listenAddr;
- p = [cfg.port];
- rproxy = "1";
- tls = false;
-
- name = "files@ganymede";
- usernames = true;
- no-robots = true;
- chmod-d = "775";
-
- e2dsa = true;
- hist = "/var/lib/copyparty/cache";
-
- # customization
- spinner = ",padding:0;border-radius:9em;border:.2em solid #444;border-top:.2em solid #fc0"; # no more tree
- ui-nolbar = true;
- ui-norepl = true;
- };
-
- accounts =
- cfg.users
- |> builtins.mapAttrs (k: v: {
- inherit (v) passwordFile;
- });
-
- groups.admin = cfg.users |> lib.attrsets.filterAttrs (k: v: v.isAdmin == true) |> builtins.attrNames;
-
- volumes = lib.mkMerge ([
- {
- "/" = {
- path = "/media/public";
- access = {
- r = "*";
- A = "@admin";
- };
- };
-
- "/public" = {
- path = "/var/empty";
- access.r = "*";
- };
-
- "/library" = {
- path = "/media/library";
- access = {
- g = "*";
- r = "@acct";
- A = "@admin";
- };
- flags = {
- fk = 6;
- dks = 6;
- e2ts = true; # enable music indexing
- };
- };
- }
- ]
- ++ lib.lists.flatten (cfg.users
- |> lib.attrsets.mapAttrsToList (k: v: [
- {
- "/${k}" = {
- path = "/media/${k}";
- access.rwd = k;
- };
- }
- (lib.optionalAttrs v.hasPublicDir {
- "/public/${k}" = {
- path = "/media/${k}/public";
- access.r = "*";
- };
- })
- ])));
- };
- };
-}