

2·
9 hours agoI like it because I have a super complicated setup where a NAS is mounted in multiple places and gracefully disappears when I’m not at home (all managed deterministically with systemd at boot). Otherwise, I’d have to write a bash script that runs on a cron job to check the mount points. The way I have it now is laughably superior to that old, manual, (IMO incredibly kludgey) way of doing it.



Nice. I like Nix because it allows me to build custom systemd services that just work. I was able to build a systemd service I call “homebeacon” which tells my laptop whether it’s actually on my home network, cryptographically. A responder on my server signs a challenge with an Ed25519 key; the laptop checks four cheap network signals first, then does the handshake. The signature covers the server’s address so it can’t be relayed from outside.
The verdict raises or lowers a systemd target. NAS mounts arm when home and go inert when away, so the filesystem doesn’t hang. Battery charges to 80% at the desk, 100% travelling. It doesn’t drive firewall rules, keyring unlock, disk unlock; Nothing a spoofed “home” could turn into access.