From a7db2ad818382496bbd0006528751c2959f80ac6 Mon Sep 17 00:00:00 2001 From: ob7 Date: Wed, 30 Oct 2024 15:00:33 +0000 Subject: [PATCH 1/3] add appliance for NixOS --- appliances/nixos.gns3a | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 appliances/nixos.gns3a diff --git a/appliances/nixos.gns3a b/appliances/nixos.gns3a new file mode 100644 index 00000000..18aaa855 --- /dev/null +++ b/appliances/nixos.gns3a @@ -0,0 +1,52 @@ +{ + "appliance_id": "00714342-14b2-4281-aa20-9043ca8dc26e", + "name": "NixOS", + "category": "guest", + "description": "NixOS QEMU Appliance for images created with nixos-generator. Automatically sets hostname based on vmname.", + "vendor_name": "NixOS", + "vendor_url": "https://nixos.org/", + "vendor_logo_url": "https://avatars.githubusercontent.com/u/487568", + "documentation_url": "https://github.com/ob7/gns3-nixos-appliance", + "product_name": "NixOS", + "product_url": "https://github.com/NixOS/nixpkgs", + "registry_version": 5, + "status": "experimental", + "availability": "free", + "maintainer": "ob7dev", + "maintainer_email": "dev@ob7.us", + "usage": "For custom NixOS images, create qcow2 VM with: nixos-generate -f qcow -c ./server.nix Import it into GNS3 as image. VM name is passed into QEMU guest with Advanced Options field entry: -fw_cfg name=opt/vm_hostname,string=%vm-name%", + "symbol": ":/symbols/affinity/circle/gray/template.svg", + "first_port_name": "eth0", + "port_name_format": "eth{0}", + "qemu": { + "adapter_type": "e1000", + "adapters": 4, + "ram": 256, + "cpus": 1, + "hda_disk_interface": "ide", + "arch": "x86_64", + "console_type": "telnet", + "kvm": "allow", + "options": "-fw_cfg name=opt/vm_hostname,string=%vm-name%", + "on_close": "power_off" + }, + "images": [ + { + "filename": "nixos.qcow2", + "version": "24.11", + "md5sum": "2459f05136836dd430402d75cba0f205", + "download_url": "https://github.com/nix-community/nixos-generators", + "filesize": 1749483520, + "download_url": "https://f.ob7.us/gns3/", + "direct_download_url": "http://ob7.us/nixos.qcow2" + } + ], + "versions": [ + { + "name": "24.11", + "images": { + "hda_disk_image": "nixos.qcow2" + } + } + ] +} From f71cc900da74f71feff675eea42e7ef4df689c0a Mon Sep 17 00:00:00 2001 From: ob7 Date: Wed, 30 Oct 2024 15:13:37 +0000 Subject: [PATCH 2/3] make image name unique --- appliances/nixos.gns3a | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appliances/nixos.gns3a b/appliances/nixos.gns3a index 18aaa855..33f3a535 100644 --- a/appliances/nixos.gns3a +++ b/appliances/nixos.gns3a @@ -32,20 +32,20 @@ }, "images": [ { - "filename": "nixos.qcow2", + "filename": "nixos-24-11.qcow2", "version": "24.11", "md5sum": "2459f05136836dd430402d75cba0f205", "download_url": "https://github.com/nix-community/nixos-generators", "filesize": 1749483520, "download_url": "https://f.ob7.us/gns3/", - "direct_download_url": "http://ob7.us/nixos.qcow2" + "direct_download_url": "http://ob7.us/nixos-24-11.qcow2" } ], "versions": [ { "name": "24.11", "images": { - "hda_disk_image": "nixos.qcow2" + "hda_disk_image": "nixos-24-11.qcow2" } } ] From d326d4e5076ea4b5f810a7e0c54da97631e8116c Mon Sep 17 00:00:00 2001 From: ob7 Date: Wed, 30 Oct 2024 15:16:12 +0000 Subject: [PATCH 3/3] set version to lowest compatibility --- appliances/nixos.gns3a | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appliances/nixos.gns3a b/appliances/nixos.gns3a index 33f3a535..32d3b609 100644 --- a/appliances/nixos.gns3a +++ b/appliances/nixos.gns3a @@ -9,7 +9,7 @@ "documentation_url": "https://github.com/ob7/gns3-nixos-appliance", "product_name": "NixOS", "product_url": "https://github.com/NixOS/nixpkgs", - "registry_version": 5, + "registry_version": 4, "status": "experimental", "availability": "free", "maintainer": "ob7dev",