From 09b0c69504e9b51bcb17af58927f3058de635d39 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Sat, 31 Jan 2026 12:52:58 -0600 Subject: copyparty --- modules/services/nixos/copyparty.nix | 48 ++++++++++++++++++++++++++++++++++++ modules/services/nixos/default.nix | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 modules/services/nixos/copyparty.nix (limited to 'modules/services/nixos') diff --git a/modules/services/nixos/copyparty.nix b/modules/services/nixos/copyparty.nix new file mode 100644 index 0000000..400338f --- /dev/null +++ b/modules/services/nixos/copyparty.nix @@ -0,0 +1,48 @@ +{ + config, + lib, + pkgs, + inputs, + ... +}: let + cfg = config.collinux.services.copyparty; +in { + imports = [ + inputs.copyparty.nixosModules.default + (import ./mkCaddyCfg.nix cfg) + ]; + + config = lib.mkIf cfg.enable { + services.copyparty = { + enable = true; + + settings = { + i = "0.0.0.0"; + p = [cfg.port]; + chpw = true; + rproxy = "1"; + usernames = true; + }; + + accounts = { + collin = { + passwordFile = toString <| pkgs.writeText "default-pw" "admin"; # not the actual password anymore + }; + }; + volumes = { + "/" = { + path = "/media"; + access = { + r = "*"; + rw = ["collin"]; + }; + + flags = { + scan = 60; + chmod_f = 777; + }; + }; + }; + }; + }; +} diff --git a/modules/services/nixos/default.nix b/modules/services/nixos/default.nix index 234a712..1160c90 100644 --- a/modules/services/nixos/default.nix +++ b/modules/services/nixos/default.nix @@ -7,5 +7,7 @@ # ./jellyfin.nix ./caddy.nix ./adguard.nix + + ./copyparty.nix ]; } -- cgit v1.3.1