DHCP Option 12/send-hostname?

Howdy.

My lab environment is configured to allow DHCP clients to use Option 12/send-hostname to register their hostname with the DHCP (and thus the DNS) server for local name resolution. I’ve been looking at the docs, searching, and talking to a couple of LLMs and I’ve not been able to determine how one might configure NixOS’s DHCP client to register the hostname.

Anybody had any luck with this task? Care to share an example config?

thx

I assume you have networking.useDHCP = true, then I think you just need to add:

networking.dhcpcd.extraConfig = ''
  hostname
'';