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