nullforge 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nullforge/__init__.py +1 -0
- nullforge/foundry/README.md +0 -0
- nullforge/foundry/__init__.py +7 -0
- nullforge/foundry/full_cast.py +22 -0
- nullforge/inventories/README.md +0 -0
- nullforge/inventories/example.py +87 -0
- nullforge/models/__init__.py +1 -0
- nullforge/models/containers.py +60 -0
- nullforge/models/dns.py +222 -0
- nullforge/models/monitoring/__init__.py +29 -0
- nullforge/models/monitoring/base.py +19 -0
- nullforge/models/monitoring/nezha.py +13 -0
- nullforge/models/netsec.py +43 -0
- nullforge/models/profiles.py +33 -0
- nullforge/models/system.py +15 -0
- nullforge/models/users.py +9 -0
- nullforge/models/warp.py +65 -0
- nullforge/models/zerotrust.py +9 -0
- nullforge/molds/__init__.py +38 -0
- nullforge/molds/base_mold.py +59 -0
- nullforge/molds/containers.py +26 -0
- nullforge/molds/defaults.py +10 -0
- nullforge/molds/dns.py +70 -0
- nullforge/molds/features.py +75 -0
- nullforge/molds/haproxy.py +23 -0
- nullforge/molds/monitoring/__init__.py +45 -0
- nullforge/molds/monitoring/nezha.py +118 -0
- nullforge/molds/netsec.py +237 -0
- nullforge/molds/profiles.py +30 -0
- nullforge/molds/system.py +140 -0
- nullforge/molds/telemt.py +140 -0
- nullforge/molds/tor.py +28 -0
- nullforge/molds/user.py +77 -0
- nullforge/molds/utils.py +115 -0
- nullforge/molds/warp.py +54 -0
- nullforge/molds/xray.py +16 -0
- nullforge/molds/zerotrust.py +59 -0
- nullforge/runes/__init__.py +46 -0
- nullforge/runes/base.py +327 -0
- nullforge/runes/containers.py +212 -0
- nullforge/runes/dns.py +256 -0
- nullforge/runes/haproxy.py +135 -0
- nullforge/runes/monitoring.py +21 -0
- nullforge/runes/netsec.py +547 -0
- nullforge/runes/prepare.py +30 -0
- nullforge/runes/profiles.py +583 -0
- nullforge/runes/telemt.py +252 -0
- nullforge/runes/tor.py +57 -0
- nullforge/runes/users.py +159 -0
- nullforge/runes/warp.py +273 -0
- nullforge/runes/xray.py +81 -0
- nullforge/runes/zerotrust.py +91 -0
- nullforge/smithy/__init__.py +1 -0
- nullforge/smithy/admin.py +40 -0
- nullforge/smithy/arch.py +36 -0
- nullforge/smithy/blocky.py +37 -0
- nullforge/smithy/cloudflare.py +32 -0
- nullforge/smithy/github.py +256 -0
- nullforge/smithy/http.py +85 -0
- nullforge/smithy/install.py +149 -0
- nullforge/smithy/monitoring/__init__.py +1 -0
- nullforge/smithy/monitoring/nezha/__init__.py +0 -0
- nullforge/smithy/monitoring/nezha/agent.py +54 -0
- nullforge/smithy/monitoring/nezha/dashboard.py +137 -0
- nullforge/smithy/monitoring/nezha/deploy.py +81 -0
- nullforge/smithy/network.py +95 -0
- nullforge/smithy/packages.py +176 -0
- nullforge/smithy/service.py +37 -0
- nullforge/smithy/sni.py +358 -0
- nullforge/smithy/swap.py +132 -0
- nullforge/smithy/system.py +86 -0
- nullforge/smithy/versions.py +282 -0
- nullforge/templates/__init__.py +32 -0
- nullforge/templates/cloudflared/tunnel.yml.j2 +6 -0
- nullforge/templates/dns/blocky.yaml.j2 +11 -0
- nullforge/templates/dns/dns.yaml.j2 +6 -0
- nullforge/templates/dns/resolv.conf.j2 +1 -0
- nullforge/templates/dns/resolved.conf.j2 +13 -0
- nullforge/templates/etc/default/zramswap.j2 +13 -0
- nullforge/templates/nvim/nvim_patch.lua.j2 +5 -0
- nullforge/templates/profiles/direnv.toml +2 -0
- nullforge/templates/profiles/starship.toml +186 -0
- nullforge/templates/profiles/tmux.conf +32 -0
- nullforge/templates/profiles/zshrc.j2 +46 -0
- nullforge/templates/scripts/telemt-synfix.sh +89 -0
- nullforge/templates/scripts/teleproxy-warp.sh +127 -0
- nullforge/templates/scripts/warp-v6-policy.sh +118 -0
- nullforge/templates/scripts/zt-tunnel-warp.sh +28 -0
- nullforge/templates/systemd/blocky.service.j2 +19 -0
- nullforge/templates/systemd/cloudflare-tunnel.service.j2 +27 -0
- nullforge/templates/systemd/cloudflare-warp.service.j2 +21 -0
- nullforge/templates/systemd/dns-internal.service.j2 +15 -0
- nullforge/templates/systemd/telemt.service.j2 +36 -0
- nullforge/templates/telemt/telemt.toml.j2 +49 -0
- nullforge/templates/tor/torrc.j2 +5 -0
- nullforge-0.1.0.dist-info/METADATA +39 -0
- nullforge-0.1.0.dist-info/RECORD +99 -0
- nullforge-0.1.0.dist-info/WHEEL +4 -0
- nullforge-0.1.0.dist-info/licenses/LICENSE +7 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"""Versions utilities for NullForge."""
|
|
2
|
+
|
|
3
|
+
import io
|
|
4
|
+
|
|
5
|
+
from pyinfra.context import host as _ctx_host
|
|
6
|
+
from pyinfra.facts.files import File, FileContents
|
|
7
|
+
from pyinfra.facts.server import Command
|
|
8
|
+
from pyinfra.operations import files
|
|
9
|
+
|
|
10
|
+
from nullforge.smithy.arch import arch_id
|
|
11
|
+
from nullforge.smithy.http import CURL_ARGS, pin_host_args
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
DEFAULT_VERSIONS = {
|
|
15
|
+
"wgcf": "2.2.31",
|
|
16
|
+
"usque": "4.2.1",
|
|
17
|
+
"doggo": "1.1.7",
|
|
18
|
+
"nvim": "v0.12.4",
|
|
19
|
+
"tmux": "3.7b",
|
|
20
|
+
"curl": "8.21.0",
|
|
21
|
+
"eza": "v0.23.5",
|
|
22
|
+
"cloudflared": "2026.7.2",
|
|
23
|
+
"blocky": "v0.33.0",
|
|
24
|
+
"direnv": "v2.37.1",
|
|
25
|
+
"telemt": "3.4.23",
|
|
26
|
+
"nerd_fonts": "v3.4.0",
|
|
27
|
+
}
|
|
28
|
+
"""Version pins (override per-host via inventory if needed)."""
|
|
29
|
+
|
|
30
|
+
RELEASE_ASSET_HOST = "release-assets.githubusercontent.com"
|
|
31
|
+
"""Host GitHub redirects `_release_url()` downloads to, and so the one serving the bytes."""
|
|
32
|
+
|
|
33
|
+
VERSION_COMMANDS: dict[str, str | None] = {
|
|
34
|
+
"wgcf": None, # wgcf has no version output; tracked via marker file
|
|
35
|
+
"usque": "{bin} version",
|
|
36
|
+
"doggo": "{bin} --version",
|
|
37
|
+
"nvim": "{bin} --version",
|
|
38
|
+
"tmux": "{bin} -V",
|
|
39
|
+
"curl": "{bin} --version",
|
|
40
|
+
"eza": "{bin} --version",
|
|
41
|
+
"cloudflared": "{bin} --version",
|
|
42
|
+
"blocky": "{bin} version",
|
|
43
|
+
"direnv": "{bin} version",
|
|
44
|
+
"telemt": "{bin} --version",
|
|
45
|
+
}
|
|
46
|
+
"""How each pinned tool reports its installed version (None = tracked via marker file)."""
|
|
47
|
+
|
|
48
|
+
VERSION_MARKER_DIR = "/var/lib/nullforge/versions"
|
|
49
|
+
"""Marker files recording installed versions of tools that cannot report their own."""
|
|
50
|
+
|
|
51
|
+
STATIC_URLS = {
|
|
52
|
+
"starship_install": "https://starship.rs/install.sh",
|
|
53
|
+
"docker_install": "https://get.docker.com",
|
|
54
|
+
"xray_install": "https://github.com/XTLS/Xray-install/raw/main/install-release.sh",
|
|
55
|
+
"nezha_agent_install": "https://raw.githubusercontent.com/nezhahq/scripts/main/agent/install.sh",
|
|
56
|
+
"atuin_install": "https://setup.atuin.sh",
|
|
57
|
+
"zoxide_install": "https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh",
|
|
58
|
+
}
|
|
59
|
+
"""Static endpoints."""
|
|
60
|
+
|
|
61
|
+
ZSH_PLUGINS: dict[str, str] = {
|
|
62
|
+
"zsh-autosuggestions": "https://github.com/zsh-users/zsh-autosuggestions",
|
|
63
|
+
"zsh-syntax-highlighting": "https://github.com/zsh-users/zsh-syntax-highlighting",
|
|
64
|
+
"ohmyzsh-full-autoupdate": "https://github.com/Pilaton/OhMyZsh-full-autoupdate",
|
|
65
|
+
}
|
|
66
|
+
"""Oh-my-zsh plugins to install (name → git URL)."""
|
|
67
|
+
|
|
68
|
+
GPG_KEYS = {
|
|
69
|
+
"haproxy": "https://haproxy.debian.net/haproxy-archive-keyring.gpg",
|
|
70
|
+
"gvisor": "https://gvisor.dev/archive.key",
|
|
71
|
+
}
|
|
72
|
+
"""GPG keys."""
|
|
73
|
+
|
|
74
|
+
KEYRING_DIR = "/etc/apt/keyrings"
|
|
75
|
+
"""Keyring directory."""
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class Versions:
|
|
79
|
+
def __init__(self, overrides: dict[str, str] | None = None) -> None:
|
|
80
|
+
if overrides is None:
|
|
81
|
+
try:
|
|
82
|
+
overrides = _ctx_host.data.get("versions", {}) or {}
|
|
83
|
+
except AttributeError:
|
|
84
|
+
overrides = {}
|
|
85
|
+
self.versions: dict[str, str] = {**DEFAULT_VERSIONS, **overrides}
|
|
86
|
+
|
|
87
|
+
def _arch_select(self, x86_64: str, arm64: str) -> str:
|
|
88
|
+
arch = arch_id()
|
|
89
|
+
match arch:
|
|
90
|
+
case "x86_64":
|
|
91
|
+
return x86_64
|
|
92
|
+
case "arm64":
|
|
93
|
+
return arm64
|
|
94
|
+
case _:
|
|
95
|
+
raise ValueError(f"Unsupported architecture: {arch}")
|
|
96
|
+
|
|
97
|
+
@staticmethod
|
|
98
|
+
def _release_url(repo: str, tag: str, asset: str) -> str:
|
|
99
|
+
"""Build a GitHub release asset URL."""
|
|
100
|
+
|
|
101
|
+
if tag == "latest":
|
|
102
|
+
return f"https://github.com/{repo}/releases/latest/download/{asset}"
|
|
103
|
+
return f"https://github.com/{repo}/releases/download/{tag}/{asset}"
|
|
104
|
+
|
|
105
|
+
@staticmethod
|
|
106
|
+
def release_curl_args() -> dict[str, str]:
|
|
107
|
+
return {**CURL_ARGS, **pin_host_args(RELEASE_ASSET_HOST)}
|
|
108
|
+
|
|
109
|
+
def cloudflared_url(self) -> str:
|
|
110
|
+
arch = self._arch_select("amd64", "arm64")
|
|
111
|
+
return self._release_url(
|
|
112
|
+
"cloudflare/cloudflared",
|
|
113
|
+
self.versions["cloudflared"],
|
|
114
|
+
f"cloudflared-linux-{arch}",
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
def blocky_tar(self) -> str:
|
|
118
|
+
# asset embeds version, so `latest` version will 404
|
|
119
|
+
version = self.versions["blocky"]
|
|
120
|
+
arch = self._arch_select("x86_64", "arm64")
|
|
121
|
+
return self._release_url(
|
|
122
|
+
"0xERR0R/blocky",
|
|
123
|
+
version,
|
|
124
|
+
f"blocky_{version}_Linux_{arch}.tar.gz",
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
def eza_tar(self) -> str:
|
|
128
|
+
version = self.versions["eza"]
|
|
129
|
+
arch = self._arch_select("x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu")
|
|
130
|
+
return self._release_url(
|
|
131
|
+
"eza-community/eza",
|
|
132
|
+
version,
|
|
133
|
+
f"eza_{arch}.tar.gz",
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
def direnv_url(self) -> str:
|
|
137
|
+
arch = self._arch_select("amd64", "arm64")
|
|
138
|
+
return self._release_url(
|
|
139
|
+
"direnv/direnv",
|
|
140
|
+
self.versions["direnv"],
|
|
141
|
+
f"direnv.linux-{arch}",
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
def wgcf_url(self) -> str:
|
|
145
|
+
# asset embeds version, so `latest` version will 404
|
|
146
|
+
version = self.versions["wgcf"]
|
|
147
|
+
arch = self._arch_select("amd64", "arm64")
|
|
148
|
+
tag = "latest" if version == "latest" else f"v{version}"
|
|
149
|
+
return self._release_url(
|
|
150
|
+
"ViRb3/wgcf",
|
|
151
|
+
tag,
|
|
152
|
+
f"wgcf_{version}_linux_{arch}",
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
def usque_zip(self) -> str:
|
|
156
|
+
# asset embeds version, so `latest` version will 404
|
|
157
|
+
version = self.versions["usque"]
|
|
158
|
+
arch = self._arch_select("amd64", "arm64")
|
|
159
|
+
tag = "latest" if version == "latest" else f"v{version}"
|
|
160
|
+
return self._release_url(
|
|
161
|
+
"Diniboy1123/usque",
|
|
162
|
+
tag,
|
|
163
|
+
f"usque_{version}_linux_{arch}.zip",
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
def doggo_tar(self) -> str:
|
|
167
|
+
# asset embeds version, so `latest` version will 404
|
|
168
|
+
version = self.versions["doggo"]
|
|
169
|
+
arch = self._arch_select("x86_64", "arm64")
|
|
170
|
+
tag = "latest" if version == "latest" else f"v{version}"
|
|
171
|
+
return self._release_url(
|
|
172
|
+
"mr-karan/doggo",
|
|
173
|
+
tag,
|
|
174
|
+
f"doggo_{version}_Linux_{arch}.tar.gz",
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
def nvim_appimage(self) -> str:
|
|
178
|
+
arch = self._arch_select("x86_64", "arm64")
|
|
179
|
+
ext = "appimage" if arch == "x86_64" else "tar.gz"
|
|
180
|
+
return self._release_url(
|
|
181
|
+
"neovim/neovim",
|
|
182
|
+
self.versions["nvim"],
|
|
183
|
+
f"nvim-linux-{arch}.{ext}",
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
def tmux_tar(self) -> str:
|
|
187
|
+
# asset embeds version, so `latest` version will 404
|
|
188
|
+
version = self.versions["tmux"]
|
|
189
|
+
return self._release_url(
|
|
190
|
+
"tmux/tmux",
|
|
191
|
+
version,
|
|
192
|
+
f"tmux-{version}.tar.gz",
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
def curl_tar(self) -> str:
|
|
196
|
+
# asset embeds version, so `latest` version will 404
|
|
197
|
+
version = self.versions["curl"]
|
|
198
|
+
arch = self._arch_select("x86_64-musl", "aarch64-musl")
|
|
199
|
+
return self._release_url(
|
|
200
|
+
"stunnel/static-curl",
|
|
201
|
+
version,
|
|
202
|
+
f"curl-linux-{arch}-{version}.tar.xz",
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
def nerd_font_tar(self, family: str) -> str:
|
|
206
|
+
"""Release archive for a single Nerd Font family, named as its base asset name.
|
|
207
|
+
|
|
208
|
+
Assets are arch-independent, so there is nothing to select on here.
|
|
209
|
+
"""
|
|
210
|
+
|
|
211
|
+
return self._release_url(
|
|
212
|
+
"ryanoasis/nerd-fonts",
|
|
213
|
+
self.versions["nerd_fonts"],
|
|
214
|
+
f"{family}.tar.xz",
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
def telemt_tar(self) -> str:
|
|
218
|
+
version = self.versions["telemt"]
|
|
219
|
+
arch = self._arch_select("x86_64", "aarch64")
|
|
220
|
+
tag = "latest" if version == "latest" else version
|
|
221
|
+
return self._release_url(
|
|
222
|
+
"telemt/telemt",
|
|
223
|
+
tag,
|
|
224
|
+
f"telemt-{arch}-linux-gnu.tar.gz",
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def get_versions() -> Versions:
|
|
229
|
+
cache_key = "_nullforge_versions"
|
|
230
|
+
try:
|
|
231
|
+
if hasattr(_ctx_host.data, cache_key):
|
|
232
|
+
return getattr(_ctx_host.data, cache_key)
|
|
233
|
+
v = Versions()
|
|
234
|
+
setattr(_ctx_host.data, cache_key, v)
|
|
235
|
+
return v
|
|
236
|
+
except AttributeError:
|
|
237
|
+
return Versions()
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
def _marker_path(tool: str) -> str:
|
|
241
|
+
return f"{VERSION_MARKER_DIR}/{tool}"
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def _recorded_version(tool: str) -> str | None:
|
|
245
|
+
"""Check version via marker file."""
|
|
246
|
+
|
|
247
|
+
lines = _ctx_host.get_fact(FileContents, path=_marker_path(tool))
|
|
248
|
+
return lines[0].strip() if lines else None
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
def is_pinned_version_installed(tool: str, binary_path: str) -> bool:
|
|
252
|
+
"""Check that binary exists and matches pinned version."""
|
|
253
|
+
|
|
254
|
+
if not _ctx_host.get_fact(File, binary_path):
|
|
255
|
+
return False
|
|
256
|
+
|
|
257
|
+
pinned = get_versions().versions[tool]
|
|
258
|
+
if pinned == "latest":
|
|
259
|
+
return True
|
|
260
|
+
|
|
261
|
+
command = VERSION_COMMANDS[tool]
|
|
262
|
+
if command is None:
|
|
263
|
+
return _recorded_version(tool) == pinned
|
|
264
|
+
|
|
265
|
+
output = _ctx_host.get_fact(Command, f"{command.format(bin=binary_path)} 2>&1 || true")
|
|
266
|
+
if not output:
|
|
267
|
+
return False
|
|
268
|
+
|
|
269
|
+
return pinned.removeprefix("v") in output
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def record_installed_version(tool: str) -> None:
|
|
273
|
+
"""Persist pinned version for tools without version output."""
|
|
274
|
+
|
|
275
|
+
files.put(
|
|
276
|
+
name=f"Record installed {tool} version",
|
|
277
|
+
src=io.StringIO(f"{get_versions().versions[tool]}\n"),
|
|
278
|
+
dest=_marker_path(tool),
|
|
279
|
+
mode="0644",
|
|
280
|
+
create_remote_dir=True,
|
|
281
|
+
_sudo=True,
|
|
282
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""NullForge templates package."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from pyinfra.api.util import get_template
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
BLOCK_TRIM_ENV: dict[str, Any] = {"trim_blocks": True, "lstrip_blocks": True}
|
|
10
|
+
"""Jinja options for line-oriented templates."""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def get_template_path(template_name: str) -> str:
|
|
14
|
+
"""Get the full path to a template file."""
|
|
15
|
+
|
|
16
|
+
templates_dir = Path(__file__).parent
|
|
17
|
+
template_path = templates_dir / template_name
|
|
18
|
+
|
|
19
|
+
if not template_path.exists():
|
|
20
|
+
raise FileNotFoundError(f"Template not found: {template_name}")
|
|
21
|
+
|
|
22
|
+
return str(template_path)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def render_template(
|
|
26
|
+
template_name: str,
|
|
27
|
+
jinja_env_kwargs: dict[str, Any] | None = None,
|
|
28
|
+
**data: Any,
|
|
29
|
+
) -> str:
|
|
30
|
+
"""Render a template on the control node, for operations that take content instead of a source file."""
|
|
31
|
+
|
|
32
|
+
return get_template(get_template_path(template_name), jinja_env_kwargs).render(data)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nameserver {{ LISTEN_ADDRESS }}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Algorithm to use.
|
|
2
|
+
ALGO={{ algo }}
|
|
3
|
+
|
|
4
|
+
# Specifies the amount of RAM to use as zram swap.
|
|
5
|
+
# If both PERCENT and SIZE are specified, SIZE takes precedence.
|
|
6
|
+
{% if size.endswith('%') %}
|
|
7
|
+
PERCENT={{ size.rstrip('%') }}
|
|
8
|
+
{% else %}
|
|
9
|
+
SIZE={{ size }}
|
|
10
|
+
{% endif %}
|
|
11
|
+
|
|
12
|
+
# Priority for the zram swap devices.
|
|
13
|
+
PRIORITY=100
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
add_newline = true
|
|
2
|
+
|
|
3
|
+
[aws]
|
|
4
|
+
symbol = " "
|
|
5
|
+
|
|
6
|
+
[buf]
|
|
7
|
+
symbol = " "
|
|
8
|
+
|
|
9
|
+
[bun]
|
|
10
|
+
symbol = " "
|
|
11
|
+
|
|
12
|
+
[c]
|
|
13
|
+
symbol = " "
|
|
14
|
+
|
|
15
|
+
[cmake]
|
|
16
|
+
symbol = " "
|
|
17
|
+
|
|
18
|
+
[conda]
|
|
19
|
+
symbol = " "
|
|
20
|
+
|
|
21
|
+
[crystal]
|
|
22
|
+
symbol = " "
|
|
23
|
+
|
|
24
|
+
[dart]
|
|
25
|
+
symbol = " "
|
|
26
|
+
|
|
27
|
+
[deno]
|
|
28
|
+
symbol = " "
|
|
29
|
+
|
|
30
|
+
[directory]
|
|
31
|
+
read_only = " "
|
|
32
|
+
|
|
33
|
+
[docker_context]
|
|
34
|
+
symbol = " "
|
|
35
|
+
|
|
36
|
+
[elixir]
|
|
37
|
+
symbol = " "
|
|
38
|
+
|
|
39
|
+
[elm]
|
|
40
|
+
symbol = " "
|
|
41
|
+
|
|
42
|
+
[fennel]
|
|
43
|
+
symbol = " "
|
|
44
|
+
|
|
45
|
+
[fossil_branch]
|
|
46
|
+
symbol = " "
|
|
47
|
+
|
|
48
|
+
[gcloud]
|
|
49
|
+
symbol = " "
|
|
50
|
+
|
|
51
|
+
[git_branch]
|
|
52
|
+
symbol = " "
|
|
53
|
+
|
|
54
|
+
[git_commit]
|
|
55
|
+
tag_symbol = ' '
|
|
56
|
+
|
|
57
|
+
[golang]
|
|
58
|
+
symbol = " "
|
|
59
|
+
|
|
60
|
+
[guix_shell]
|
|
61
|
+
symbol = " "
|
|
62
|
+
|
|
63
|
+
[haskell]
|
|
64
|
+
symbol = " "
|
|
65
|
+
|
|
66
|
+
[haxe]
|
|
67
|
+
symbol = " "
|
|
68
|
+
|
|
69
|
+
[hg_branch]
|
|
70
|
+
symbol = " "
|
|
71
|
+
|
|
72
|
+
[hostname]
|
|
73
|
+
ssh_symbol = " "
|
|
74
|
+
|
|
75
|
+
[java]
|
|
76
|
+
symbol = " "
|
|
77
|
+
|
|
78
|
+
[julia]
|
|
79
|
+
symbol = " "
|
|
80
|
+
|
|
81
|
+
[kotlin]
|
|
82
|
+
symbol = " "
|
|
83
|
+
|
|
84
|
+
[lua]
|
|
85
|
+
symbol = " "
|
|
86
|
+
|
|
87
|
+
[memory_usage]
|
|
88
|
+
symbol = " "
|
|
89
|
+
|
|
90
|
+
[meson]
|
|
91
|
+
symbol = " "
|
|
92
|
+
|
|
93
|
+
[nim]
|
|
94
|
+
symbol = " "
|
|
95
|
+
|
|
96
|
+
[nix_shell]
|
|
97
|
+
symbol = " "
|
|
98
|
+
|
|
99
|
+
[nodejs]
|
|
100
|
+
symbol = " "
|
|
101
|
+
|
|
102
|
+
[ocaml]
|
|
103
|
+
symbol = " "
|
|
104
|
+
|
|
105
|
+
[os.symbols]
|
|
106
|
+
Alpaquita = " "
|
|
107
|
+
Alpine = " "
|
|
108
|
+
AlmaLinux = " "
|
|
109
|
+
Amazon = " "
|
|
110
|
+
Android = " "
|
|
111
|
+
Arch = " "
|
|
112
|
+
Artix = " "
|
|
113
|
+
CachyOS = " "
|
|
114
|
+
CentOS = " "
|
|
115
|
+
Debian = " "
|
|
116
|
+
DragonFly = " "
|
|
117
|
+
Emscripten = " "
|
|
118
|
+
EndeavourOS = " "
|
|
119
|
+
Fedora = " "
|
|
120
|
+
FreeBSD = " "
|
|
121
|
+
Garuda = " "
|
|
122
|
+
Gentoo = " "
|
|
123
|
+
HardenedBSD = " "
|
|
124
|
+
Illumos = " "
|
|
125
|
+
Kali = " "
|
|
126
|
+
Linux = " "
|
|
127
|
+
Mabox = " "
|
|
128
|
+
Macos = " "
|
|
129
|
+
Manjaro = " "
|
|
130
|
+
Mariner = " "
|
|
131
|
+
MidnightBSD = " "
|
|
132
|
+
Mint = " "
|
|
133
|
+
NetBSD = " "
|
|
134
|
+
NixOS = " "
|
|
135
|
+
Nobara = " "
|
|
136
|
+
OpenBSD = " "
|
|
137
|
+
openSUSE = " "
|
|
138
|
+
OracleLinux = " "
|
|
139
|
+
Pop = " "
|
|
140
|
+
Raspbian = " "
|
|
141
|
+
Redhat = " "
|
|
142
|
+
RedHatEnterprise = " "
|
|
143
|
+
RockyLinux = " "
|
|
144
|
+
Redox = " "
|
|
145
|
+
Solus = " "
|
|
146
|
+
SUSE = " "
|
|
147
|
+
Ubuntu = " "
|
|
148
|
+
Unknown = " "
|
|
149
|
+
Void = " "
|
|
150
|
+
Windows = " "
|
|
151
|
+
|
|
152
|
+
[package]
|
|
153
|
+
symbol = " "
|
|
154
|
+
|
|
155
|
+
[perl]
|
|
156
|
+
symbol = " "
|
|
157
|
+
|
|
158
|
+
[php]
|
|
159
|
+
symbol = " "
|
|
160
|
+
|
|
161
|
+
[pijul_channel]
|
|
162
|
+
symbol = " "
|
|
163
|
+
|
|
164
|
+
[python]
|
|
165
|
+
symbol = " "
|
|
166
|
+
|
|
167
|
+
[rlang]
|
|
168
|
+
symbol = " "
|
|
169
|
+
|
|
170
|
+
[ruby]
|
|
171
|
+
symbol = " "
|
|
172
|
+
|
|
173
|
+
[rust]
|
|
174
|
+
symbol = " "
|
|
175
|
+
|
|
176
|
+
[scala]
|
|
177
|
+
symbol = " "
|
|
178
|
+
|
|
179
|
+
[swift]
|
|
180
|
+
symbol = " "
|
|
181
|
+
|
|
182
|
+
[zig]
|
|
183
|
+
symbol = " "
|
|
184
|
+
|
|
185
|
+
[gradle]
|
|
186
|
+
symbol = " "
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Support for colors
|
|
2
|
+
set-option -sa terminal-overrides ",xterm*:Tc"
|
|
3
|
+
|
|
4
|
+
# Toggle mouse on\off
|
|
5
|
+
set-option -g mouse on # Mouse support
|
|
6
|
+
bind-key m \
|
|
7
|
+
if-shell -F "#{?mouse,1,0}" \
|
|
8
|
+
"set-option -g mouse off; display-message 'Mouse: OFF'" \
|
|
9
|
+
"set-option -g mouse on; display-message 'Mouse: ON'"
|
|
10
|
+
|
|
11
|
+
# Start windows and panes at 1, not 0
|
|
12
|
+
set -g base-index 1
|
|
13
|
+
set -g pane-base-index 1
|
|
14
|
+
set-window-option -g pane-base-index 1
|
|
15
|
+
set-option -g renumber-windows on
|
|
16
|
+
|
|
17
|
+
# Open pane in same directory
|
|
18
|
+
bind '\' split-window -v -c "#{pane_current_path}"
|
|
19
|
+
bind '%' split-window -h -c "#{pane_current_path}"
|
|
20
|
+
|
|
21
|
+
# Additions to the status bar
|
|
22
|
+
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
|
|
23
|
+
|
|
24
|
+
# Plugins
|
|
25
|
+
set -g @plugin 'tmux-plugins/tpm'
|
|
26
|
+
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
27
|
+
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
28
|
+
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
|
29
|
+
set -g @plugin 'tmux-plugins/tmux-sessionist'
|
|
30
|
+
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
31
|
+
set -g @plugin 'hoshiya4522/tokyo-night-tmux'
|
|
32
|
+
run '~/.tmux/plugins/tpm/tpm'
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export ZSH="{{ home }}/.oh-my-zsh"
|
|
2
|
+
ZSH_THEME=""
|
|
3
|
+
|
|
4
|
+
case ":$PATH:" in
|
|
5
|
+
*:/usr/local/bin:*) ;;
|
|
6
|
+
*) export PATH="/usr/local/sbin:/usr/local/bin:$PATH" ;;
|
|
7
|
+
esac
|
|
8
|
+
|
|
9
|
+
plugins=(
|
|
10
|
+
git
|
|
11
|
+
docker
|
|
12
|
+
zsh-autosuggestions
|
|
13
|
+
zsh-syntax-highlighting
|
|
14
|
+
ohmyzsh-full-autoupdate
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
zstyle ':omz:update' mode auto
|
|
18
|
+
|
|
19
|
+
source $ZSH/oh-my-zsh.sh
|
|
20
|
+
|
|
21
|
+
[ -f "$HOME/.atuin/bin/env" ] && . "$HOME/.atuin/bin/env"
|
|
22
|
+
|
|
23
|
+
command -v atuin >/dev/null 2>&1 && eval "$(atuin init zsh)"
|
|
24
|
+
command -v starship >/dev/null 2>&1 && eval "$(starship init zsh)"
|
|
25
|
+
command -v direnv >/dev/null 2>&1 && eval "$(direnv hook zsh)"
|
|
26
|
+
if command -v zoxide >/dev/null 2>&1; then
|
|
27
|
+
eval "$(zoxide init zsh)"
|
|
28
|
+
alias cd='z'
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Aliases
|
|
32
|
+
alias tailf='tail -f'
|
|
33
|
+
command -v btop >/dev/null 2>&1 && alias top='btop'
|
|
34
|
+
command -v eza >/dev/null 2>&1 && alias ls='eza'
|
|
35
|
+
command -v nvim >/dev/null 2>&1 && alias vim='nvim'
|
|
36
|
+
command -v duf >/dev/null 2>&1 && alias df='duf'
|
|
37
|
+
command -v doggo >/dev/null 2>&1 && alias dig='doggo'
|
|
38
|
+
# `bat` named `batcat` on Debian/Ubuntu
|
|
39
|
+
# `bat` on RHEL/Fedora
|
|
40
|
+
if command -v batcat >/dev/null 2>&1; then
|
|
41
|
+
alias cat='batcat --style=plain --paging=never'
|
|
42
|
+
elif command -v bat >/dev/null 2>&1; then
|
|
43
|
+
alias cat='bat --style=plain --paging=never'
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# Edits between the markers are overwritten on deploy - put host-specific config below the end marker
|