I use ZFS which requires that I set the hostId within the networking set. I think this is the default as I don’t remember writing this myself.
networking = {
hostId = (builtins.substring 0 8 (builtins.readFile "/etc/machine-id"));
networkmanager.enable = true;
hostName = "mai";
firewall.allowedUDPPorts = [ 631 ];
firewall.allowedTCPPorts = [ 443 631 19000 8080 3000 3333 ];
};
However when I try to migrate to flakes I get the following error:
error: access to absolute path '/etc/machine-id' is forbidden in pure eval mode (use '--impure' to override)
What is the recommended way to fix this issue?