checkpoint

This commit is contained in:
BOTAlex 2026-01-26 21:39:43 +01:00
parent 376912c631
commit 38d26110e1
13 changed files with 547 additions and 82 deletions

View file

@ -12,9 +12,16 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKyZOZlcQBmqSPxjaGgE2tP+K7LYziqjFUo3EX12rGtf botlap@nixos"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBLSUXsao6rjC3FDtRHhh7z6wqMtA/mqL50e1Dj9a2wE botserver@botserver"
];
shell = pkgs.fish;
};
programs.fish = { enable = true; };
documentation.man.generateCaches = false;
services.openssh = { enable = true; };
imports = [ ./../../modules/getNvim.nix ];
imports = [ ./../../modules/getNvim.nix ./kubernetes.nix ];
environment.systemPackages = with pkgs; [
neovim
git
@ -30,6 +37,8 @@
btop
openssh
ripgrep
dig
argocd
];
# --- MicroVM Specific Settings ---
@ -39,15 +48,9 @@
# Create a tap interface or user networking
interfaces = [{
type = "user"; # 'user' networking is easiest for testing (slirp)
id = "eth0";
mac = "02:00:00:00:00:01";
}];
forwardPorts = [{
from = "host";
host.port = 2222;
guest.port = 22;
type = "tap";
id = "microvm-tap2"; # Matches the host's second tap
mac = "02:00:00:00:00:02";
}];
# Mount the host's /nix/store explicitly (read-only)
@ -66,5 +69,38 @@
}];
};
boot.kernelModules = [ "br_netfilter" ];
networking = {
hostName = "kube-vm";
useNetworkd = true;
firewall.enable = false;
# 1. Define the interface explicitly
interfaces.enp0s4.ipv4.addresses = [{
address = "10.0.0.3";
prefixLength = 24;
}];
# 2. Fix: Specify both address AND interface for the gateway
defaultGateway = {
address = "10.0.0.1";
interface = "enp0s4";
};
nameservers = [ "1.1.1.1" "8.8.8.8" ];
};
# Allow passwordless root login for testing (Do not use in production!)
services.getty.autologinUser = "root";
users.users.root.password = "";
systemd.network.enable = true;
systemd.network.networks."11-microvm" = {
matchConfig.Name = "vm-*";
# Attach to the bridge that was configured above
networkConfig.Bridge = "microvm";
};
system.stateVersion = "24.11";
}