From a54e950ecca45225d94c5e982e2dd3453c09ea22 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Wed, 23 Apr 2025 11:32:30 +0200 Subject: [PATCH] Revert "added environment script." Cant have 2 instances of copyparty running, even if one is just for ah-cli... This reverts commit c60c8d8e0bc744d72f895fd191325e745fc2f64c. --- contrib/nixos/modules/copyparty.nix | 31 ----------------------------- 1 file changed, 31 deletions(-) diff --git a/contrib/nixos/modules/copyparty.nix b/contrib/nixos/modules/copyparty.nix index 25211df3..1b68f2ca 100644 --- a/contrib/nixos/modules/copyparty.nix +++ b/contrib/nixos/modules/copyparty.nix @@ -70,15 +70,6 @@ in { ''; }; - mkWrapper = mkOption { - type = types.bool; - default = true; - description = '' - Make a shell script wrapper called 'copyparty-env' with all options set here, - for ease of things like password hashing - ''; - }; - user = mkOption { type = types.str; default = "copyparty"; @@ -333,27 +324,5 @@ in { home = lib.mkIf externalStateDir; isSystemUser = true; }; - environment.systemPackages = lib.mkIf cfg.mkWrapper [ - ( - let - command = '' - ${getExe cfg.package} -c ${runtimeConfigPath} \ - ${optionalString (cfg.seperateHist) "--hist ${externalCacheDir}"} \ - ''; - in - pkgs.writeShellScriptBin "copyparty-env" '' - set -a # automatically export variables - # set same environment variables as the systemd service - ${lib.pipe config.systemd.services.copyparty.environment [ - (lib.filterAttrs (n: v: v != null && n != "PATH")) - (lib.mapAttrs (_: v: "${v}")) - (lib.toShellVars) - ]} - PATH=${config.systemd.services.copyparty.environment.PATH}:$PATH - - exec ${command} "$@" - '' - ) - ]; }; }