Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tailscale-dev/deck-tailscale dir to PATH #9

Merged
merged 4 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

os.environ['XDG_RUNTIME_DIR'] = '/run/user/1000'

# 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, exit_node=False, node_ip='', allow_lan_access=False):
Expand Down