Skip to content

Commit e01d71a

Browse files
committed
refactor(android): remove sshd service and autostart scripts
1 parent 227fff4 commit e01d71a

5 files changed

Lines changed: 77 additions & 83 deletions

File tree

machines/aarch64/android/common.nix

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,6 @@
11
{ config, pkgs, lib, ... }:
22

33
{
4-
home.file.".ssh/sshd_config" = {
5-
text = ''
6-
Port 8022
7-
HostKey ${config.home.homeDirectory}/.ssh/sshd_host_ed25519_key
8-
AuthorizedKeysFile .ssh/authorized_keys
9-
PasswordAuthentication yes
10-
PermitEmptyPasswords no
11-
ChallengeResponseAuthentication no
12-
PrintMotd no
13-
AcceptEnv LANG LC_*
14-
'';
15-
};
16-
17-
home.activation.generateSshdHostKey = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
18-
HOST_KEY="${config.home.homeDirectory}/.ssh/sshd_host_ed25519_key"
19-
if [ ! -f "$HOST_KEY" ]; then
20-
${pkgs.openssh}/bin/ssh-keygen -t ed25519 -f "$HOST_KEY" -N ""
21-
fi
22-
'';
23-
24-
home.file.".termux/boot/start-sshd.sh" = {
25-
text = ''
26-
#!/bin/sh
27-
if ! pgrep -x "sshd" > /dev/null; then
28-
${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config
29-
fi
30-
'';
31-
executable = true;
32-
};
33-
344
xdg.configFile."nix/nix.conf".text = ''
355
sandbox = false
366
connect-timeout = 20

machines/aarch64/android/smartphone/default.nix

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,9 @@ in
2626

2727
programs.zsh.initExtra = ''
2828
export PROMPT="%F{yellow}%n%f@%F{green}${hostName}%f:%F{blue}%~%f%# "
29-
if ! pgrep -x "sshd" > /dev/null; then
30-
${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config
31-
fi
3229
'';
3330

3431
programs.bash.initExtra = ''
3532
export PS1="\[\033[01;33m\]\u\[\033[00m\]@\[\033[01;32m\]${hostName}\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
36-
if ! pgrep -x "sshd" > /dev/null; then
37-
${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config
38-
fi
3933
'';
4034
}

machines/aarch64/android/tablet/default.nix

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,9 @@ in
2626

2727
programs.zsh.initExtra = ''
2828
export PROMPT="%F{yellow}%n%f@%F{green}${hostName}%f:%F{blue}%~%f%# "
29-
if ! pgrep -x "sshd" > /dev/null; then
30-
${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config
31-
fi
3229
'';
3330

3431
programs.bash.initExtra = ''
3532
export PS1="\[\033[01;33m\]\u\[\033[00m\]@\[\033[01;32m\]${hostName}\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
36-
if ! pgrep -x "sshd" > /dev/null; then
37-
${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config
38-
fi
3933
'';
4034
}

programs/antigravity.nix

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,84 +19,88 @@
1919
"${config.home.homeDirectory}/.config/home-manager"
2020
config.home.homeDirectory
2121
];
22+
};
23+
24+
# Antigravity MCP configuration in ~/.gemini/antigravity-cli/mcp_config.json
25+
home.file.".gemini/antigravity-cli/mcp_config.json".text = builtins.toJSON {
2226
mcpServers = {
2327
fetch = {
24-
httpUrl = "https://server.smithery.ai/smithery-ai/fetch/mcp";
28+
serverUrl = "https://server.smithery.ai/smithery-ai/fetch/mcp";
2529
};
2630
github = {
27-
httpUrl = "https://github.run.tools";
31+
serverUrl = "https://github.run.tools";
2832
};
2933
context7 = {
30-
httpUrl = "https://context7-mcp--upstash.run.tools";
34+
serverUrl = "https://context7-mcp--upstash.run.tools";
3135
};
3236
grokipedia = {
33-
httpUrl = "https://grokipedia-mcp--skymoore.run.tools";
37+
serverUrl = "https://grokipedia-mcp--skymoore.run.tools";
3438
};
3539
reddit = {
36-
httpUrl = "https://reddit.run.tools";
40+
serverUrl = "https://reddit.run.tools";
3741
};
3842
instagram = {
39-
httpUrl = "https://instagram.run.tools";
43+
serverUrl = "https://instagram.run.tools";
4044
};
4145
linkedin = {
42-
httpUrl = "https://linkedin.run.tools";
46+
serverUrl = "https://linkedin.run.tools";
4347
};
4448
facebook = {
45-
httpUrl = "https://facebook.run.tools";
49+
serverUrl = "https://facebook.run.tools";
4650
};
4751
discord = {
48-
httpUrl = "https://discord.run.tools";
52+
serverUrl = "https://discord.run.tools";
4953
};
5054
discourse = {
51-
httpUrl = "https://discourse-forum-mcp--king-of-the-grackles.run.tools";
55+
serverUrl = "https://discourse-forum-mcp--king-of-the-grackles.run.tools";
5256
};
5357
eventbrite = {
54-
httpUrl = "https://eventbrite.run.tools";
58+
serverUrl = "https://eventbrite.run.tools";
5559
};
5660
gmail = {
57-
httpUrl = "https://gmail.run.tools";
61+
serverUrl = "https://gmail.run.tools";
5862
};
5963
google-calendar = {
60-
httpUrl = "https://googlecalendar.run.tools";
64+
serverUrl = "https://googlecalendar.run.tools";
6165
};
6266
google-maps = {
63-
httpUrl = "https://google_maps.run.tools";
67+
serverUrl = "https://google_maps.run.tools";
6468
};
6569
notion = {
66-
httpUrl = "https://notion.run.tools";
70+
serverUrl = "https://notion.run.tools";
6771
};
6872
math = {
69-
httpUrl = "https://math-mcp--ethanhenrickson.run.tools";
73+
serverUrl = "https://math-mcp--ethanhenrickson.run.tools";
7074
};
7175
audioscrape = {
72-
httpUrl = "https://audioscrape.run.tools";
76+
serverUrl = "https://audioscrape.run.tools";
7377
};
7478
rss-reader = {
75-
httpUrl = "https://rss-reader-mcp--kwp-lab.run.tools";
79+
serverUrl = "https://rss-reader-mcp--kwp-lab.run.tools";
7680
};
7781
twitter = {
78-
httpUrl = "https://twitter.run.tools";
82+
serverUrl = "https://twitter.run.tools";
7983
};
8084
excel = {
81-
httpUrl = "https://excel.run.tools";
85+
serverUrl = "https://excel.run.tools";
8286
};
8387
hackernews = {
84-
httpUrl = "https://hackernews.run.tools";
88+
serverUrl = "https://hackernews.run.tools";
8589
};
8690
excalidraw = {
87-
httpUrl = "https://excalidraw.run.tools";
91+
serverUrl = "https://excalidraw.run.tools";
8892
};
8993
exa = {
90-
httpUrl = "https://exa.run.tools";
94+
serverUrl = "https://exa.run.tools";
9195
};
9296
opengraph = {
93-
httpUrl = "https://opengraph--opengraph.run.tools";
97+
serverUrl = "https://opengraph--opengraph.run.tools";
9498
};
9599
youtube = {
96-
httpUrl = "https://youtube.run.tools";
100+
serverUrl = "https://youtube.run.tools";
97101
};
98102
gemini = {
99-
httpUrl = "https://gemini.run.tools";
103+
serverUrl = "https://gemini.run.tools";
100104
};
101105
anki = {
102106
command = "npx";
@@ -107,14 +111,32 @@
107111
args = [ "-y" "obsidian-mcp" "--path" "${config.home.homeDirectory}/Sync/Obsidian/My Notes" ];
108112
};
109113
paper-search = {
110-
httpUrl = "https://paper-search-mcp-openai--adamamer20.run.tools";
114+
serverUrl = "https://paper-search-mcp-openai--adamamer20.run.tools";
111115
};
112116
mem0 = {
113-
httpUrl = "https://mem0-memory-mcp--mem0ai.run.tools";
117+
serverUrl = "https://mem0-memory-mcp--mem0ai.run.tools";
114118
};
115119
linkup = {
116-
httpUrl = "https://linkup-mcp-server--linkupplatform.run.tools";
120+
serverUrl = "https://linkup-mcp-server--linkupplatform.run.tools";
121+
};
122+
grep = {
123+
serverUrl = "https://grep--vercel.run.tools";
124+
};
125+
huggingface = {
126+
serverUrl = "https://huggingface.run.tools";
127+
};
128+
supabase = {
129+
serverUrl = "https://supabase.run.tools";
130+
};
131+
figma = {
132+
serverUrl = "http://127.0.0.1:3845/mcp";
133+
};
134+
stripe = {
135+
serverUrl = "https://stripe.run.tools";
117136
};
118137
};
119138
};
139+
140+
# Also alias to ~/.gemini/config/mcp_config.json for global Antigravity discovery
141+
home.file.".gemini/config/mcp_config.json".text = config.home.file.".gemini/antigravity-cli/mcp_config.json".text;
120142
}

tests/programs/test_antigravity.py

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,39 @@ def test_antigravity_installed(home_manager_build):
22
assert (home_manager_build / "home-path/bin/agy").exists()
33

44
def test_antigravity_configs_generated(home_manager_build):
5-
"""Verifies that antigravity-cli config files are generated in ~/.gemini/antigravity-cli/."""
5+
"""Verifies that antigravity-cli config files and mcp_config.json are generated."""
66
settings = home_manager_build / "home-files/.gemini/antigravity-cli/settings.json"
7+
mcp_config = home_manager_build / "home-files/.gemini/antigravity-cli/mcp_config.json"
8+
global_mcp_config = home_manager_build / "home-files/.gemini/config/mcp_config.json"
79

810
assert settings.exists()
11+
assert mcp_config.exists()
12+
assert global_mcp_config.exists()
913

1014
import json
1115
settings_data = json.loads(settings.read_text())
16+
mcp_data = json.loads(mcp_config.read_text())
17+
1218
assert settings_data["security"]["auth"]["selectedType"] == "oauth-personal"
13-
assert "github" in settings_data["mcpServers"]
14-
assert "discourse" in settings_data["mcpServers"]
15-
assert "google-calendar" in settings_data["mcpServers"]
16-
assert "notion" in settings_data["mcpServers"]
17-
assert "math" in settings_data["mcpServers"]
18-
assert "audioscrape" in settings_data["mcpServers"]
19-
assert "rss-reader" in settings_data["mcpServers"]
20-
assert "linkedin" in settings_data["mcpServers"]
21-
assert "google-maps" in settings_data["mcpServers"]
22-
assert "eventbrite" in settings_data["mcpServers"]
23-
assert "opengraph" in settings_data["mcpServers"]
19+
20+
servers = mcp_data["mcpServers"]
21+
assert "github" in servers
22+
assert "discourse" in servers
23+
assert "google-calendar" in servers
24+
assert "notion" in servers
25+
assert "math" in servers
26+
assert "audioscrape" in servers
27+
assert "rss-reader" in servers
28+
assert "linkedin" in servers
29+
assert "google-maps" in servers
30+
assert "eventbrite" in servers
31+
assert "opengraph" in servers
32+
assert "grep" in servers
33+
assert "huggingface" in servers
34+
assert "supabase" in servers
35+
assert "figma" in servers
36+
assert "stripe" in servers
37+
assert "serverUrl" in servers["github"]
2438

2539
# Check trustedWorkspaces
2640
assert "/home/brantes" in settings_data["trustedWorkspaces"]

0 commit comments

Comments
 (0)