Skip to content

Commit

Permalink
enable network in make-disk-image vm
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenzo Zolfanelli committed Mar 4, 2024
1 parent 47eb674 commit 624ee91
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/make-disk-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ let
};
dependencies = with pkgs; [
bash
iproute
coreutils
gnused
parted # for partprobe
Expand Down Expand Up @@ -59,6 +60,12 @@ let
rootPaths = [ systemToInstall.config.system.build.toplevel ];
}}/registration
# configure user network
echo $(${pkgs.iproute}/bin/ip link)
${pkgs.iproute}/bin/ip addr add 10.0.2.15/24 dev ens3
${pkgs.iproute}/bin/ip route add default via 10.0.2.2
echo 'nameserver 10.0.2.3' > /etc/resolv.conf
${systemToInstall.config.system.build.diskoScript}
'';
installer = ''
Expand Down

0 comments on commit 624ee91

Please sign in to comment.