From 20776327cdda5d6bb2334ebdfde4b9e4f70713ef Mon Sep 17 00:00:00 2001 From: catvayor Date: Fri, 13 Sep 2024 14:08:14 +0200 Subject: [PATCH] feat(example-qemu): enable dhcpc on wan interface --- examples/hello-from-qemu.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/hello-from-qemu.nix b/examples/hello-from-qemu.nix index 78c4422..4888724 100644 --- a/examples/hello-from-qemu.nix +++ b/examples/hello-from-qemu.nix @@ -18,6 +18,14 @@ in rec { family = "inet"; address ="10.3.0.1"; prefixLength = 16; }; + services.dhcpc = svc.network.dhcp.client.build { + interface = config.hardware.networkInterfaces.wan; + + # don't start DHCP until the hostname is configured, + # so it can identify itself to the DHCP server + dependencies = [ config.services.hostname ]; + }; + services.sshd = svc.ssh.build { }; users.root = {