ttyd for lio tailnet
This commit is contained in:
parent
9c77850ad5
commit
b6a7454f1d
4 changed files with 64 additions and 4 deletions
8
hosts/lio/flake.lock
generated
8
hosts/lio/flake.lock
generated
|
|
@ -64,11 +64,11 @@
|
||||||
"common": {
|
"common": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "flakes/common",
|
"dir": "flakes/common",
|
||||||
"lastModified": 1770664771,
|
"lastModified": 1770702882,
|
||||||
"narHash": "sha256-8X1QU1bmy0hQe2PnpVcg1trna4BO+bpTpC79mWsz1rY=",
|
"narHash": "sha256-IrNAJIl5Pzpr9pZjHEEuVmJNawK9k2vFUgfTbw7zin4=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "94249e7bcbfed6a04baa01972661bd1901a95f68",
|
"rev": "b5fd37ef8cade4cd833bc62f59bed44e23a281ac",
|
||||||
"revCount": 1248,
|
"revCount": 1253,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
|
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -175,6 +175,7 @@
|
||||||
# ./sway_customizations.nix
|
# ./sway_customizations.nix
|
||||||
# ./i3_customizations.nix
|
# ./i3_customizations.nix
|
||||||
./vms.nix
|
./vms.nix
|
||||||
|
./ttyd.nix
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
|
|
||||||
38
hosts/lio/ttyd-mobile.css
Normal file
38
hosts/lio/ttyd-mobile.css
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
/* Mobile-friendly TTYD styles */
|
||||||
|
html, body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#terminal-container, .terminal, .xterm {
|
||||||
|
width: 100vw !important;
|
||||||
|
max-width: 100vw !important;
|
||||||
|
height: 100vh !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xterm-viewport {
|
||||||
|
overflow-y: auto !important;
|
||||||
|
overflow-x: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Prevent horizontal scroll on mobile */
|
||||||
|
.xterm-screen {
|
||||||
|
max-width: 100vw !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Better touch scrolling */
|
||||||
|
.xterm-viewport::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure proper viewport on iOS */
|
||||||
|
@supports (-webkit-touch-callout: none) {
|
||||||
|
#terminal-container, .terminal, .xterm {
|
||||||
|
height: -webkit-fill-available !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
21
hosts/lio/ttyd.nix
Normal file
21
hosts/lio/ttyd.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
systemd.services.ttyd = {
|
||||||
|
description = "TTYD - Web Terminal";
|
||||||
|
after = [ "network.target" "tailscaled.service" ];
|
||||||
|
wants = [ "tailscaled.service" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "josh";
|
||||||
|
Group = "users";
|
||||||
|
ExecStart = "${pkgs.ttyd}/bin/ttyd -p 8383 -i 100.64.0.1 -W -c :root -t fontSize=56 -t rendererType=webgl -t disableLeaveAlert=true ${pkgs.zsh}/bin/zsh";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "5s";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue