I’m using Tailscale automated in Systemd with this configuration.nix setup. Every time I do a rebuild of NixOS, Tailscale interprets that as a new machine and adds a new entry to its machine list with a number appended, and disconnects the prior version. I end up with a machine list like this:
100.60.1.37 z11pa-d8-1 tagged-devices linux offline
100.81.16.123 z11pa-d8-2 tagged-devices linux offline
100.73.19.128 z11pa-d8-3 tagged-devices linux offline
100.79.176.117 z11pa-d8-4 tagged-devices linux offline
100.105.25.29 z11pa-d8-5 tagged-devices linux offline
100.71.180.121 z11pa-d8-6 tagged-devices linux offline
100.90.122.127 z11pa-d8-7 tagged-devices linux -
100.90.123.127 z11pa-d8 tagged-devices linux offline
This obviously breaks any script that references the original machine name, ‘z11pa-d8’. Anyone know how to make the current machine persist through rebuilds?
I have /etc/machine-id
persisted in my ‘Erase Your Darlings’ setup, so it remains constant across rebuilds.