Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
dd7ad60710
|
|||
|
fd18ae4a78
|
|||
|
d7deaa187c
|
|||
|
c6d66902bb
|
|||
|
4704a887fa
|
|||
|
eaaffcc289
|
|||
|
d4d560c30f
|
+2
-2
@@ -7,8 +7,8 @@
|
|||||||
memorySize = 4096;
|
memorySize = 4096;
|
||||||
|
|
||||||
qemu.networkingOptions = lib.mkForce [
|
qemu.networkingOptions = lib.mkForce [
|
||||||
"-net nic,netdev=user.0,model=virtio"
|
"-nic bridge,br=virbr0,id=hn0,model=virt-net-pci,helper=\${QEMU_BRIDGE_HELPER_PATH}"
|
||||||
"-netdev user,id=user.0,\${QEMU_NET_OPTS:+,$QEMU_NET_OPTS}"
|
"-device virtio-net-pci,netdev=hn0,id=nic1,\${QEMU_NET_OPTS:+,$QEMU_NET_OPTS}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,24 @@
|
|||||||
{
|
{
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
name = "configuration.nix";
|
name = "configuration.nix";
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
for path in \
|
||||||
|
/usr/lib/qemu/qemu-bridge-helper \
|
||||||
|
/run/wrappers/bin/qemu-bridge-helper
|
||||||
|
do
|
||||||
|
if [ -x "$path" ]; then
|
||||||
|
export QEMU_BRIDGE_HELPER_PATH="$path"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$QEMU_BRIDGE_HELPER_PATH" ]; then
|
||||||
|
printf "\033[1;33m%s\033[0m\n" \
|
||||||
|
"WARN: 'qemu-bridge-helper' not found, make sure it is installed and the nix shell hook is looking for it" >&2
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
bat
|
bat
|
||||||
cachix
|
cachix
|
||||||
|
|||||||
Reference in New Issue
Block a user