"Zack Weinberg" <z...@owlfolio.org> writes: > There doesn't seem to be an analogue of local-file or plain-file for > symlinks, and I just spent half an hour poking at the guix repl trying > to get the daemon to cough up /gnu/store/xxxxxxxx-hostname as a thing > I could put into a gexp, without any luck. > > How would you suggest that this be done? >
I was also stumped on this question in the past. The key insight is that any declared file is a symlink to the Gnu Store itself. Further, it does not really matter what kind of file type the daemon configuration is in. All it wants is A file with the hostname, right? You could specify a (plain-file "filename" "hostname") in the [extra-special-file service][1] for a quick solution, but that would complicate any future hostname changes. The proper solution is to define a variable holding the hostname externally to the operating-system record, and use this variable in both the (operating-system (host-name)) field and a (mixed-text-file "filename" hostname) [procedure][2] [1]: https://guix.gnu.org/manual/devel/en/html_node/Base-Services.html [2]: https://guix.gnu.org/manual/devel/en/html_node/G_002dExpressions.html