From d7bc6cb929d06372ef13ddc4f49ab6dc1d39b140 Mon Sep 17 00:00:00 2001 From: adjoly Date: Wed, 23 Jul 2025 16:04:45 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=94=A8=E3=80=8D=20fix:=20now=20t?= =?UTF-8?q?hey=20ping=20each=20other?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ p1/Vagrantfile | 11 +++++------ shell.nix | 1 + vm/flake.nix | 4 ++++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 842d9d7..16b5d5a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ .vagrant/ iot-box.qcow2 +.env + diff --git a/p1/Vagrantfile b/p1/Vagrantfile index 7488b53..229c90e 100644 --- a/p1/Vagrantfile +++ b/p1/Vagrantfile @@ -1,4 +1,4 @@ -# -*- mode: ruby -*- +#sudo systemctl stop firewalld -*- mode: ruby -*- # # vi: set ft=ruby : @@ -6,7 +6,7 @@ def environ(key, default) ENV[key] || default end -IOT_LOGIN = environ("IOT_LOGIN", "kiroussa") +IOT_LOGIN = environ("USER", "kanel") IOT_PROVIDER = environ("IOT_PROVIDER", "virtualbox") XDG_RUNTIME_DIR = environ("XDG_RUNTIME_DIR", "unknown") if XDG_RUNTIME_DIR == "unknown" @@ -25,8 +25,7 @@ end Vagrant.configure("2") do |config| config.vagrant.plugins = [] - config.vm.network "private_network", ip: "192.168.56.100" - config.vm.box = "debian/jessie64" + config.vm.box = "debian/bookworm64" config.vm.provider "#{IOT_PROVIDER}" do |provider| provider.cpus = 1 provider.memory = 1024 @@ -34,11 +33,11 @@ Vagrant.configure("2") do |config| config.vm.define "#{IOT_LOGIN}S" do |server| server.vm.hostname = "#{IOT_LOGIN}S" - server.vm.network "private_network", ip: "192.168.56.110" + server.vm.network "private_network", ip: "192.168.56.110", auto_config: true end config.vm.define "#{IOT_LOGIN}SW" do |serverworker| serverworker.vm.hostname = "#{IOT_LOGIN}SW" - serverworker.vm.network "private_network", ip: "192.168.56.111" + serverworker.vm.network "private_network", ip: "192.168.56.111", auto_config: true end end diff --git a/shell.nix b/shell.nix index 8db9779..2e5b96c 100644 --- a/shell.nix +++ b/shell.nix @@ -7,6 +7,7 @@ pkgs.mkShell { # Tools vagrant kubectl + just # Virtual Machine nixos-generators diff --git a/vm/flake.nix b/vm/flake.nix index d85305e..209a66d 100644 --- a/vm/flake.nix +++ b/vm/flake.nix @@ -57,6 +57,8 @@ script = pkgs.writeShellScriptBin "${scriptName}" '' ${selfPkgs.vm}/bin/run-${hostname}-vm \ -enable-kvm \ + -m 8G \ + -smp 4\ -virtfs local,path=$(${pkgs.coreutils}/bin/pwd)/..,mount_tag=host0,security_model=mapped-xattr,id=host0 ''; in @@ -72,6 +74,8 @@ ${selfPkgs.vm}/bin/run-${hostname}-vm \ -enable-kvm \ -nographic \ + -m 8G \ + -smp 4 \ -virtfs local,path=$(${pkgs.coreutils}/bin/pwd)/..,mount_tag=host0,security_model=mapped-xattr,id=host0 ''; in