Skip to content

Commit 8b24b31

Browse files
committed
fix(genebean): restart cage-tty1 on config changes
Upstream's cage module sets restartIfChanged = false, presumably to avoid yanking an interactive desktop session out from under someone mid `nixos-rebuild switch`. That caution doesn't apply to a kiosk - confirmed on hardware (kiosk-entryway) that without this override, a config change (e.g. a new dashboard URL) requires a manual `systemctl restart cage-tty1` or a reboot to actually take effect, since the switch itself silently leaves the old chromium/cage instance running.
1 parent ad21005 commit 8b24b31

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

modules/genebean/nixos/services/chromium-kiosk.nix

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,20 @@ in
2525
user = username;
2626
};
2727

28-
systemd.services.cage-tty1.wants = [
29-
"wpa_supplicant-${wifiInterface}.service"
30-
"network-online.target"
31-
];
28+
systemd.services.cage-tty1 = {
29+
# Upstream's cage module sets restartIfChanged = false, presumably
30+
# to avoid yanking an interactive desktop session out from under
31+
# someone mid `nixos-rebuild switch`. That caution doesn't apply to
32+
# a kiosk - confirmed on hardware that without this override, a
33+
# config change (e.g. a new dashboard URL) requires a manual
34+
# `systemctl restart cage-tty1` (or a reboot) to actually take
35+
# effect, since the switch itself silently leaves the old
36+
# chromium/cage instance running.
37+
restartIfChanged = lib.mkForce true;
38+
wants = [
39+
"wpa_supplicant-${wifiInterface}.service"
40+
"network-online.target"
41+
];
42+
};
3243
};
3344
}

0 commit comments

Comments
 (0)