From eab7aa8d11cf36a8de13c6597aacfa006c4d62af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Thu, 18 Apr 2024 10:41:03 +0100 Subject: [PATCH] process-compose: use unix-socket --- src/modules/process-managers/process-compose.nix | 4 ++-- src/modules/processes.nix | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/process-managers/process-compose.nix b/src/modules/process-managers/process-compose.nix index d8acb4a9f..6bad7ffb0 100644 --- a/src/modules/process-managers/process-compose.nix +++ b/src/modules/process-managers/process-compose.nix @@ -39,9 +39,9 @@ in config = lib.mkIf cfg.enable { processManagerCommand = '' ${cfg.package}/bin/process-compose --config ${cfg.configFile} \ - --port ''${PC_HTTP_PORT:-${toString config.process.process-compose.port}} \ + --unix-socket ''${PC_SOCKET_PATH:-${toString config.process.process-compose.unix-socket}} \ --tui=''${PC_TUI_ENABLED:-${toString config.process.process-compose.tui}} \ - up "$@" & + -U up "$@" & ''; packages = [ cfg.package ]; diff --git a/src/modules/processes.nix b/src/modules/processes.nix index ad18014c9..d6d942b72 100644 --- a/src/modules/processes.nix +++ b/src/modules/processes.nix @@ -65,7 +65,7 @@ in ''; default = { version = "0.5"; - port = 9999; + unix-socket = "${config.devenv.runtime}/pc.sock"; tui = true; }; example = { @@ -133,7 +133,7 @@ in backgroundPID=$! - stop_up() { + down() { echo "Stopping processes..." kill -TERM $backgroundPID wait $backgroundPID @@ -142,7 +142,7 @@ in rm -rf ${config.devenv.runtime} } - trap stop_up SIGINT SIGTERM + trap down SIGINT SIGTERM wait '';