diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-31 12:52:58 -0600 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-31 12:52:58 -0600 |
| commit | 09b0c69504e9b51bcb17af58927f3058de635d39 (patch) | |
| tree | a4340a406f6fd896a4362f40f1d21646091069fa | |
| parent | c9a1d2da80bca0a85e8c18f6d2db71c4d1127eda (diff) | |
copyparty
| -rw-r--r-- | flake.lock | 43 | ||||
| -rw-r--r-- | hosts/ganymede/config.nix | 6 | ||||
| -rw-r--r-- | modules/services/nixos/copyparty.nix | 48 | ||||
| -rw-r--r-- | modules/services/nixos/default.nix | 2 | ||||
| -rw-r--r-- | modules/services/options.nix | 7 |
5 files changed, 102 insertions, 4 deletions
@@ -39,6 +39,27 @@ "type": "github" } }, + "copyparty": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769809780, + "narHash": "sha256-4Q2f/wyj8cD1nRP8aUxwIcKXypksczZfnLbgBQD4tvY=", + "owner": "9001", + "repo": "copyparty", + "rev": "32c11f142e2b4c59b22e2e6df1cc85487c1d5999", + "type": "github" + }, + "original": { + "owner": "9001", + "repo": "copyparty", + "type": "github" + } + }, "crane": { "locked": { "lastModified": 1767461147, @@ -166,6 +187,21 @@ "type": "github" } }, + "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" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -383,6 +419,7 @@ "inputs": { "agenix": "agenix", "betterfox": "betterfox", + "copyparty": "copyparty", "deploy-rs": "deploy-rs", "disko": "disko", "firefox-csshacks": "firefox-csshacks", @@ -549,11 +586,11 @@ "yoshi-lua": { "flake": false, "locked": { - "lastModified": 1769448007, - "narHash": "sha256-Wz/ZQ7BDXG8CcDmzptoK1T0E1Ok4jCmvEoL6e51nvrw=", + "lastModified": 1769795029, + "narHash": "sha256-15+LQ7yB0k/z/7VTi0KPBjL8M3xsDUl+ERl54lLWslE=", "owner": "bluedragon1221", "repo": "yoshi", - "rev": "d5c4869cdb82b1f7b0f4abee0e177944ed4e2203", + "rev": "f8d055766d44cb8a5dd15f3fe7db8f432114e4d3", "type": "github" }, "original": { diff --git a/hosts/ganymede/config.nix b/hosts/ganymede/config.nix index ba7c854..a9e3279 100644 --- a/hosts/ganymede/config.nix +++ b/hosts/ganymede/config.nix @@ -50,6 +50,12 @@ ]; }; + copyparty = { + enable = true; + root_url = "up.williamsfam.us.com"; + caddy.enable = true; + }; + caddy = { enable = true; envFile = config.collinux.secrets."caddy-env".path; 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 ]; } diff --git a/modules/services/options.nix b/modules/services/options.nix index 880206f..ef9f57f 100644 --- a/modules/services/options.nix +++ b/modules/services/options.nix @@ -4,7 +4,7 @@ ... }: let inherit (lib) mkOption mkEnableOption; - inherit ((my-lib {inherit lib;}).netTypes) ipAddr; + inherit (my-lib.netTypes {inherit lib;}) ipAddr; selfhostOptions = { service_name, @@ -77,6 +77,11 @@ in { }; }; + copyparty = selfhostOptions { + service_name = "copyparty"; + default_port = 8099; + }; + headscale = selfhostOptions { service_name = "headscale"; default_port = 8080; |
