feat: remove tailscale from iso

This commit is contained in:
2024-08-17 01:25:02 +08:00
parent c2d5ea6060
commit f78895ea62
3 changed files with 5 additions and 13 deletions

View File

@@ -52,7 +52,7 @@ function main() {
echo "Attempting to retrieve IP Address"
start_time=$(date +%s)
while true; do
if IP_ADDRESS="$(sudo qm agent "${VMID}" network-get-interfaces 2>/dev/null | jq -r '.[] | select(.name == "tailscale0") | .["ip-addresses"][] | select(.["ip-address-type"] == "ipv4")')"; then
if IP_ADDRESS="$(sudo qm agent "${VMID}" network-get-interfaces 2>/dev/null | jq -r '.[] | select(.name != "lo") | .["ip-addresses"][] | select(.["ip-address-type"] == "ipv4")')"; then
if [ -n "${IP_ADDRESS}" ]; then
echo "Retrieved IP Address: ${IP_ADDRESS}"
break

View File

@@ -1,6 +1,5 @@
{ config, lib, pkgs, meta, ...}:
let tailscale_key = builtins.getEnv "TAILSCALE_AUTH_KEY";
in {
{ config, lib, pkgs, ...}:
{
imports = [../common/users.nix];
nix = {
@@ -19,14 +18,7 @@ in {
neovim
wget
];
environment.etc."tailscale/preAuthKey".text = tailscale_key;
services.tailscale = {
enable = true;
extraUpFlags = [ "--login-server" "http://ts.yadunut.com:444"];
authKeyFile = "/etc/tailscale/preAuthKey";
};
boot.loader.timeout = lib.mkForce 0;
system.stateVersion = "24.05";
}