Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nixos/nix: add option to preface remote machines with a comment
I recently ran into an issue where I wasn't able to use the DNS hostname of a machine inside the /etc/nix/machines file. Nothing to do with NixOS or Nix itself, just a weird networking setup I was in. This meant I had to use the plain IPv4 and IPv6 addresses of those machines in these files. I still like to have some reference to what these machines are, so I've always put a comment above the remote machine line with the DNS name of the machine, and then use the hostName option for the IP address. This adds the nix.buildMachines.*.comment option. Allows us to do the following. { nix.buildMachines = [ { protocol = "ssh-ng"; sshUser = "nixbld"; hostName = "192.168.0.222"; comment = "Some very powerful machine in Belgium"; } ]; } Which would result in the following /etc/nix/machines entry. # Some very powerful machine in Belgium ssh-ng://[email protected] - - 1 1 - - -
- Loading branch information