Re: set dnsdomainname

2019-03-06 Thread Marco van Hulten
Je  6 mrt 10:21 skribis Tobias:
> Giovanni Biscuolo wrote:
> > I'd prefer setting the contents "inline" declaring each hosts
> > record... but I don't know how to do it  
> 
> Probably easier than you thought!
> 
>   (host-name "lapdog.tobias.gr")
>   ;; This creates a file /gnu/store/…-hosts and links it as 
>   /etc/hosts.
>   (hosts-file (plain-file "hosts "\
> 127.0.0.1 lapdog.tobias.gr localhost
> ::1   lapdog.tobias.gr localhost
> "))
> 
> Doing it in Scheme also allows one to factor out some of that ugly 
> repetition, if I'd bother.

Great, this works fine!  Thanks, Giovanni and Tobias!

—Marco



Re: set dnsdomainname

2019-03-06 Thread Tobias Geerinckx-Rice

Giovanni, Marco,

Giovanni Biscuolo wrote:

I'd prefer setting the contents "inline" declaring each hosts
record... but I don't know how to do it


Probably easier than you thought!

 (host-name "lapdog.tobias.gr")
 ;; This creates a file /gnu/store/…-hosts and links it as 
 /etc/hosts.

 (hosts-file (plain-file "hosts "\
127.0.0.1 lapdog.tobias.gr localhost
::1   lapdog.tobias.gr localhost
"))

Doing it in Scheme also allows one to factor out some of that ugly 
repetition, if I'd bother.


Kind regards,

T G-R