From fa0c1d610444067001faaad204b25fa112fdc838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 7 Oct 2014 21:33:12 +0200 Subject: services: Add '%facebook-host-aliases'. * gnu/services/networking.scm (%facebook-host-aliases): New variable. * doc/guix.texi (Networking Services): Document it. --- doc/guix.texi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index ac2aad643c..583bdbf621 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3610,6 +3610,35 @@ root. The other options should be self-descriptive. @end deffn +@defvr {Scheme Variable} %facebook-host-aliases +This variable contains a string for use in @file{/etc/hosts} +(@pxref{Host Names,,, libc, The GNU C Library Reference Manual}). Each +line contains a entry that maps a known server name of the Facebook +on-line service---e.g., @code{www.facebook.com}---to the local +host---@code{127.0.0.1} or its IPv6 equivalent, @code{::1}. + +This variable is typically used in the @code{hosts-file} field of an +@code{operating-system} declaration (@pxref{Using the Configuration +System}): + +@example +(use-modules (gnu) (guix)) + +(operating-system + (host-name "mymachine") + ;; ... + (hosts-file + ;; Create a /etc/hosts file with aliases for "localhost" + ;; and "mymachine", as well as for Facebook servers. + (text-file "hosts" + (string-append (local-host-aliases host-name) + %facebook-host-aliases)))) +@end example + +This mechanism can prevent programs running locally, such as Web +browsers, from accessing Facebook. +@end defvr + @node X Window @subsubsection X Window -- cgit v1.2.3