unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#36294] [PATCH 0/3] Fix and document NetworkManager + dnsmasq
@ 2019-06-19 16:05 pelzflorian (Florian Pelz)
  2019-06-19 16:08 ` [bug#36294] [PATCH 1/3] Use new upstream nomenclature in documentation of NetworkManager’s dnsmasq Florian Pelz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: pelzflorian (Florian Pelz) @ 2019-06-19 16:05 UTC (permalink / raw)
  To: 36294

Please accept this patch series which enables and describes more use
cases of NetworkManager + Dnsmasq.

Regards,
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#36294] [PATCH 1/3] Use new upstream nomenclature in documentation of NetworkManager’s dnsmasq.
  2019-06-19 16:05 [bug#36294] [PATCH 0/3] Fix and document NetworkManager + dnsmasq pelzflorian (Florian Pelz)
@ 2019-06-19 16:08 ` Florian Pelz
  2019-06-19 16:09 ` [bug#36294] [PATCH 2/3] Have NetworkManager create '/var/lib/misc' directory required by dnsmasq Florian Pelz
  2019-06-19 16:09 ` [bug#36294] [PATCH 3/3] Document use cases for NetworkManager with dnsmasq Florian Pelz
  2 siblings, 0 replies; 5+ messages in thread
From: Florian Pelz @ 2019-06-19 16:08 UTC (permalink / raw)
  To: 36294

* doc/guix.texi (Networking Services): Replace term 'split DNS' by
'conditional forwarding'.
---
 doc/guix.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 65c3b8a7f1..694b802e1e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12735,8 +12735,8 @@ NetworkManager will update @code{resolv.conf} to reflect the nameservers
 provided by currently active connections.
 
 @item dnsmasq
-NetworkManager will run @code{dnsmasq} as a local caching nameserver,
-using a "split DNS" configuration if you are connected to a VPN, and
+NetworkManager will run @code{dnsmasq} as a local caching nameserver, using a
+@dfn{conditional forwarding} configuration if you are connected to a VPN, and
 then update @code{resolv.conf} to point to the local nameserver.
 
 @item none
-- 
2.22.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#36294] [PATCH 2/3] Have NetworkManager create '/var/lib/misc' directory required by dnsmasq.
  2019-06-19 16:05 [bug#36294] [PATCH 0/3] Fix and document NetworkManager + dnsmasq pelzflorian (Florian Pelz)
  2019-06-19 16:08 ` [bug#36294] [PATCH 1/3] Use new upstream nomenclature in documentation of NetworkManager’s dnsmasq Florian Pelz
@ 2019-06-19 16:09 ` Florian Pelz
  2019-06-19 16:09 ` [bug#36294] [PATCH 3/3] Document use cases for NetworkManager with dnsmasq Florian Pelz
  2 siblings, 0 replies; 5+ messages in thread
From: Florian Pelz @ 2019-06-19 16:09 UTC (permalink / raw)
  To: 36294

* gnu/services/networking.scm (%network-manager-activation): Rename to...
(network-manager-activation): ... this and make it a procedure.  Make it
create '/var/lib/misc' when using dnsmasq.
(network-manager-service-type): Use it.
---
 gnu/services/networking.scm | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 73acb3b17f..13cffd9feb 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -895,11 +895,17 @@ and @command{wicd-curses} user interfaces."
   (vpn-plugins network-manager-vpn-plugins        ;list of <package>
                (default '())))
 
-(define %network-manager-activation
-  ;; Activation gexp for NetworkManager.
-  #~(begin
-      (use-modules (guix build utils))
-      (mkdir-p "/etc/NetworkManager/system-connections")))
+(define network-manager-activation
+  ;; Activation gexp for NetworkManager
+  (match-lambda
+    (($ <network-manager-configuration> network-manager dns vpn-plugins)
+     #~(begin
+         (use-modules (guix build utils))
+         (mkdir-p "/etc/NetworkManager/system-connections")
+         #$@(if (equal? dns "dnsmasq")
+                ;; create directory to store dnsmasq lease file
+                '((mkdir-p "/var/lib/misc"))
+                '())))))
 
 (define (vpn-plugin-directory plugins)
   "Return a directory containing PLUGINS, the NM VPN plugins."
@@ -949,7 +955,7 @@ and @command{wicd-curses} user interfaces."
             (service-extension dbus-root-service-type config->package)
             (service-extension polkit-service-type config->package)
             (service-extension activation-service-type
-                               (const %network-manager-activation))
+                               network-manager-activation)
             (service-extension session-environment-service-type
                                network-manager-environment)
             ;; Add network-manager to the system profile.
-- 
2.22.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#36294] [PATCH 3/3] Document use cases for NetworkManager with dnsmasq.
  2019-06-19 16:05 [bug#36294] [PATCH 0/3] Fix and document NetworkManager + dnsmasq pelzflorian (Florian Pelz)
  2019-06-19 16:08 ` [bug#36294] [PATCH 1/3] Use new upstream nomenclature in documentation of NetworkManager’s dnsmasq Florian Pelz
  2019-06-19 16:09 ` [bug#36294] [PATCH 2/3] Have NetworkManager create '/var/lib/misc' directory required by dnsmasq Florian Pelz
@ 2019-06-19 16:09 ` Florian Pelz
  2019-06-24 21:26   ` bug#36294: " Ludovic Courtès
  2 siblings, 1 reply; 5+ messages in thread
From: Florian Pelz @ 2019-06-19 16:09 UTC (permalink / raw)
  To: 36294

* doc/guix.texi (Networking Services): Give examples.
---
 doc/guix.texi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 694b802e1e..172106068f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12739,6 +12739,31 @@ NetworkManager will run @code{dnsmasq} as a local caching nameserver, using a
 @dfn{conditional forwarding} configuration if you are connected to a VPN, and
 then update @code{resolv.conf} to point to the local nameserver.
 
+With this setting, you can share your network connection.  For example when
+you want to share your network connection to another laptop @i{via} an
+Ethernet cable, you can open @command{nm-connection-editor} and configure the
+Wired connection’s method for IPv4 and IPv6 to be 'Shared to other computers'
+and reestablish the connection (or reboot).
+
+You can also set up a @dfn{host-to-guest connection} to QEMU VMs
+(@pxref{Installing Guix in a VM}).  With a host-to-guest connection, you can
+e.g.@: access a Web server running on the VM (@pxref{Web Services}) from a Web
+browser on your host system, or connect to the VM @i{via} SSH
+(@pxref{Networking Services, @code{openssh-service-type}}).  To set up a
+host-to-guest connection, run this command once:
+
+@example
+nmcli connection add type tun \
+ connection.interface-name tap0 \
+ tun.mode tap tun.owner $(id -u) \
+ ipv4.method shared \
+ ipv4.addresses 172.28.112.1/24
+@end example
+
+Then each time you launch your QEMU VM (@pxref{Running Guix in a VM}), pass
+@option{-nic tap,ifname=tap0,script=no,downscript=no} to
+@command{qemu-system-...}.
+
 @item none
 NetworkManager will not modify @code{resolv.conf}.
 @end table
-- 
2.22.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#36294: [PATCH 3/3] Document use cases for NetworkManager with dnsmasq.
  2019-06-19 16:09 ` [bug#36294] [PATCH 3/3] Document use cases for NetworkManager with dnsmasq Florian Pelz
@ 2019-06-24 21:26   ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2019-06-24 21:26 UTC (permalink / raw)
  To: Florian Pelz; +Cc: 36294-done

Hi Florian,

Applied all 3 patches (I adjusted the subject line of each to have a
prefix as we usually do.)

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-24 21:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-19 16:05 [bug#36294] [PATCH 0/3] Fix and document NetworkManager + dnsmasq pelzflorian (Florian Pelz)
2019-06-19 16:08 ` [bug#36294] [PATCH 1/3] Use new upstream nomenclature in documentation of NetworkManager’s dnsmasq Florian Pelz
2019-06-19 16:09 ` [bug#36294] [PATCH 2/3] Have NetworkManager create '/var/lib/misc' directory required by dnsmasq Florian Pelz
2019-06-19 16:09 ` [bug#36294] [PATCH 3/3] Document use cases for NetworkManager with dnsmasq Florian Pelz
2019-06-24 21:26   ` bug#36294: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).