[Network] compute networking.hostId using the hash of the hostname

This commit is contained in:
Antoine Viallon 2024-05-13 02:19:54 +02:00
parent 65e6e93be8
commit 1102138015
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -78,7 +78,7 @@ in
# Must always be false
networking.useDHCP = false;
networking.hostId = mkDefault (builtins.abort "Default hostId not changed" null);
networking.hostId = mkDefault (substring 0 8 (builtins.hashString "sha256" config.networking.hostName));
networking.hostName = mkDefault (builtins.abort "Default hostname not changed" null);
# Needed for proper WiFi support in some countries (like France, for instance)