* set dnsdomainname
@ 2019-03-05 10:30 Marco van Hulten
2019-03-05 18:44 ` Marco van Hulten
0 siblings, 1 reply; 5+ messages in thread
From: Marco van Hulten @ 2019-03-05 10:30 UTC (permalink / raw)
To: help-guix
Hello Guix—
I want `dnsdomainname` to be set on my system with GuixSD (because it
is used as a destination in my Postfix configuration). How do I go
about this?
The system with GuixSD gets network information from my Debian 8 server
that runs the ISC DHCP server. So I thought the best approach would be
to configure the DHCP server by adding this near the top of dhcpd.conf:
ddns-updates on;
ddns-domainname "instanton";
But it doesn't get picked up by the GuixSD client system.
Is there a way to specify full hostname(1) information (`hostname
--fqdn`, `dnsdomainname`) in Guix' system configuration?
—Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: set dnsdomainname
2019-03-05 10:30 set dnsdomainname Marco van Hulten
@ 2019-03-05 18:44 ` Marco van Hulten
2019-03-06 7:35 ` Giovanni Biscuolo
0 siblings, 1 reply; 5+ messages in thread
From: Marco van Hulten @ 2019-03-05 18:44 UTC (permalink / raw)
To: help-guix
Je 5 mrt 11:30 skribis Marco:
> Hello Guix—
>
> I want `dnsdomainname` to be set on my system with GuixSD (because it
> is used as a destination in my Postfix configuration). How do I go
> about this?
>
> The system with GuixSD gets network information from my Debian 8 server
> that runs the ISC DHCP server. So I thought the best approach would be
> to configure the DHCP server by adding this near the top of dhcpd.conf:
>
> ddns-updates on;
> ddns-domainname "instanton";
>
> But it doesn't get picked up by the GuixSD client system.
>
> Is there a way to specify full hostname(1) information (`hostname
> --fqdn`, `dnsdomainname`) in Guix' system configuration?
I found that one can edit /etc/hosts , starting with something like:
127.0.0.1 localhost
127.0.1.1 myhost.mydomain myhost
but of course this is overwritten by the Guix system (at reboot).
—Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: set dnsdomainname
2019-03-05 18:44 ` Marco van Hulten
@ 2019-03-06 7:35 ` Giovanni Biscuolo
2019-03-06 9:21 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 5+ messages in thread
From: Giovanni Biscuolo @ 2019-03-06 7:35 UTC (permalink / raw)
To: Marco van Hulten, help-guix
[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]
Hi Marco,
Marco van Hulten <Marco.Hulten@uib.no> writes:
[...]
> I found that one can edit /etc/hosts , starting with something like:
>
> 127.0.0.1 localhost
> 127.0.1.1 myhost.mydomain myhost
for hosts you have to configure "hosts-file" [1] in your
operating-system section
I found this in an old thread [2]:
--8<---------------cut here---------------start------------->8---
you can keep your hosts file wherever you want, let's say
"~/my-config/hosts"; and you can add this line to your operating-system
declaration:
(hosts-file (local-file (string-append (getenv "HOME")
"/my-config/hosts")))
After reconfiguring your system, this file will be put into the store,
and /etc/hosts will have the same contents after reboot.
--8<---------------cut here---------------end--------------->8---
I'd prefer setting the contents "inline" declaring each hosts
record... but I don't know how to do it
HTH!
Giovanni
[1] https://www.gnu.org/software/guix/manual/en/html_node/operating_002dsystem-Reference.html#index-hosts-file
[2] https://lists.gnu.org/archive/html/bug-guix/2016-03/msg00114.html
[-- Attachment #2.1: Type: text/plain, Size: 53 bytes --]
--
Giovanni Biscuolo
Xelera IT Infrastructures
[-- Attachment #2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: set dnsdomainname
2019-03-06 7:35 ` Giovanni Biscuolo
@ 2019-03-06 9:21 ` Tobias Geerinckx-Rice
2019-03-06 19:23 ` Marco van Hulten
0 siblings, 1 reply; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-03-06 9:21 UTC (permalink / raw)
To: Giovanni Biscuolo; +Cc: help-guix
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: set dnsdomainname
2019-03-06 9:21 ` Tobias Geerinckx-Rice
@ 2019-03-06 19:23 ` Marco van Hulten
0 siblings, 0 replies; 5+ messages in thread
From: Marco van Hulten @ 2019-03-06 19:23 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: help-guix
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-03-06 19:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-05 10:30 set dnsdomainname Marco van Hulten
2019-03-05 18:44 ` Marco van Hulten
2019-03-06 7:35 ` Giovanni Biscuolo
2019-03-06 9:21 ` Tobias Geerinckx-Rice
2019-03-06 19:23 ` Marco van Hulten
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).