This commit is contained in:
Jermeiah S 2025-07-10 01:25:45 -04:00
commit dc5069e9b2
No known key found for this signature in database
7 changed files with 323 additions and 0 deletions

71
configuration.nix Normal file
View file

@ -0,0 +1,71 @@
{
config,
lib,
pkgs,
...
}:
let
indexHtml = pkgs.writeText "index.html" ''
hello mofo
'';
in
{
imports = [
./microvm.nix
./vm-variant.nix
];
networking = {
firewall.enable = false;
useDHCP = lib.mkForce true;
hostName = "demo";
};
services.avahi = {
enable = true;
nssmdns = true;
publish = {
enable = true;
addresses = true;
workstation = true;
};
};
# boot = {
# # loader.grub.device = "nodev";
# kernelParams = [ "console=ttyS0" ];
# };
users.users = {
root = {
password = "";
};
};
# Optional: Make sure DNS is configured
networking = {
nameservers = [
"9.9.9.9"
];
# Enable networking
# networkmanager.enable = true;
};
nix = {
settings.experimental-features = [
"nix-command"
"flakes"
];
};
services.nginx = {
enable = true;
virtualHosts."localhost" = {
root = "${pkgs.runCommand "nginx-root" { } ''
mkdir -p $out
cp ${indexHtml} $out/index.html
''}";
locations."/" = {
index = "index.html";
};
};
};
# users.mutableUsers = false;
system.stateVersion = "25.05";
}