fix(uconsole): rename secret to home_wifi (shared across hosts, not uconsole-specific)
This commit is contained in:
@@ -30,9 +30,10 @@
|
||||
|
||||
# ============================================================
|
||||
# WiFi credentials from agenix (SSID + password encrypted)
|
||||
# Reused across hosts — all connect to the same home WiFi
|
||||
# ============================================================
|
||||
age.secrets.uconsole-wifi = {
|
||||
file = ../../secrets/uconsole-wifi.age;
|
||||
age.secrets.home_wifi = {
|
||||
file = ../../secrets/home_wifi.age;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
mode = "0400";
|
||||
@@ -41,8 +42,8 @@
|
||||
# Write WiFi connection at activation (reads decrypted age secret)
|
||||
systemd.services.ensure-wifi = {
|
||||
description = "Configure WiFi from age secret";
|
||||
after = [ "network.target" "age-uconsole-wifi.service" ];
|
||||
wants = [ "age-uconsole-wifi.service" ];
|
||||
after = [ "network.target" "age-home_wifi.service" ];
|
||||
wants = [ "age-home_wifi.service" ];
|
||||
before = [ "NetworkManager-wait-online.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
@@ -50,8 +51,8 @@
|
||||
RemainAfterExit = true;
|
||||
ExecStart = let
|
||||
wifi-setup = pkgs.writeShellScript "wifi-setup" ''
|
||||
SSID="$(head -1 /run/secrets/uconsole-wifi)"
|
||||
PASS="$(tail -1 /run/secrets/uconsole-wifi)"
|
||||
SSID="$(head -1 /run/secrets/home_wifi)"
|
||||
PASS="$(tail -1 /run/secrets/home_wifi)"
|
||||
if ! nmcli -t connection show "$SSID" >/dev/null 2>&1; then
|
||||
nmcli device wifi connect "$SSID" password "$PASS"
|
||||
fi
|
||||
|
||||
@@ -11,5 +11,5 @@ in
|
||||
"lazyworkhorse_host_ssh_key.age".publicKeys = authorizedKeys;
|
||||
"n8n_ssh_key.age".publicKeys = authorizedKeys;
|
||||
"openclaw_gateway_token.age".publicKeys = authorizedKeys;
|
||||
"uconsole-wifi.age".publicKeys = authorizedKeys;
|
||||
"home_wifi.age".publicKeys = authorizedKeys;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user