From 4ce646f3e8b10c5409a9604d8c3c3332ab9c97c7 Mon Sep 17 00:00:00 2001 From: Gus El Khoury Seoane Date: Tue, 19 Dec 2023 14:00:39 +0000 Subject: [PATCH 1/3] Add tailscale-dev/deck-tailscale dir to PATH --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 5fe477a..29d24bc 100644 --- a/main.py +++ b/main.py @@ -3,6 +3,8 @@ import os os.environ['XDG_RUNTIME_DIR'] = '/run/user/1000' +# Add the install directory used by https://github.com/tailscale-dev/deck-tailscale to the PATH +os.environ['PATH'] += ':/opt/tailscale' class Plugin: From 0f0bcb3591232750eb9db782f929ccad42d4893f Mon Sep 17 00:00:00 2001 From: Gus El Khoury Seoane Date: Tue, 19 Dec 2023 14:02:03 +0000 Subject: [PATCH 2/3] Ignore deck.json, pnpm cache --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 17a9665..f62490d 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,9 @@ yalc.lock # Ignore output folder backend/out + +# Ignore pnpm cache +.pnpm-store/* + +# Ignore deck.json, which is developer-specific and stores the sensitive sudo password +deck.json From 67221d4a25b6ecea90a93dc38c4e582f4ba7eca1 Mon Sep 17 00:00:00 2001 From: Gus El Khoury Seoane Date: Wed, 20 Dec 2023 10:35:21 +0000 Subject: [PATCH 3/3] Add Nix path, prevent duplicate paths --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 29d24bc..03a96a7 100644 --- a/main.py +++ b/main.py @@ -3,9 +3,13 @@ import os os.environ['XDG_RUNTIME_DIR'] = '/run/user/1000' -# Add the install directory used by https://github.com/tailscale-dev/deck-tailscale to the PATH -os.environ['PATH'] += ':/opt/tailscale' +# Add install directories used by https://github.com/tailscale-dev/deck-tailscale +# and Nix (https://github.com/saumya-banthia/tailscale-control/issues/7) to the PATH +user_dirs = ['/opt/tailscale', '/home/deck/.nix-profile/bin'] +current_path = os.environ["PATH"].split(":") +new_path = ":".join(current_path + [user_dir for user_dir in user_dirs if user_dir not in current_path]) +os.environ["PATH"] = new_path class Plugin: async def up(self):