From 132e5c239c391f881ebc97577c94ba0252fc2515 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Mon, 21 Feb 2022 00:37:09 +0000 Subject: [PATCH] nixos/boxes/colony: Disable DHCP in dev VM --- nixos/boxes/colony.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nixos/boxes/colony.nix b/nixos/boxes/colony.nix index 6fedf28..de9040f 100644 --- a/nixos/boxes/colony.nix +++ b/nixos/boxes/colony.nix @@ -5,7 +5,10 @@ home-manager = "unstable"; docCustom = false; - configuration = { lib, pkgs, modulesPath, ... }: + configuration = { lib, pkgs, modulesPath, config, ... }: + let + inherit (lib) mkIf; + in { imports = [ "${modulesPath}/profiles/qemu-guest.nix" ]; @@ -46,7 +49,9 @@ }; networking = { - interfaces.enp1s0.useDHCP = true; + interfaces = mkIf (!config.my.build.isDevVM) { + enp1s0.useDHCP = true; + }; }; }; };