repo cleanup
I moved things around to be easier to reason
This commit is contained in:
parent
e7f14285ad
commit
1ef708bab8
3 changed files with 35 additions and 52 deletions
22
base.nix
Normal file
22
base.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
nix = {
|
||||
settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
networking = {
|
||||
firewall.enable = false;
|
||||
useDHCP = lib.mkForce true;
|
||||
hostName = "demo";
|
||||
};
|
||||
# Optional: Make sure DNS is configured
|
||||
networking = {
|
||||
nameservers = [
|
||||
"9.9.9.9"
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
# config,
|
||||
lib,
|
||||
# lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
|
@ -11,47 +11,22 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
./base.nix
|
||||
# ./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 = "";
|
||||
};
|
||||
};
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation = {
|
||||
|
||||
# Optional: Make sure DNS is configured
|
||||
networking = {
|
||||
nameservers = [
|
||||
"9.9.9.9"
|
||||
];
|
||||
# Enable networking
|
||||
# networkmanager.enable = true;
|
||||
};
|
||||
nix = {
|
||||
settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
forwardPorts = [
|
||||
{
|
||||
from = "host";
|
||||
host.port = 8888;
|
||||
guest.port = 80;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
|
@ -66,6 +41,4 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# users.mutableUsers = false;
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,10 @@
|
|||
_: {
|
||||
|
||||
virtualisation.vmVariant = {
|
||||
# virtualisation.diskImage = null;
|
||||
# Boot with tmpfs as root
|
||||
|
||||
virtualisation = {
|
||||
|
||||
forwardPorts = [
|
||||
{
|
||||
from = "host";
|
||||
host.port = 8888;
|
||||
guest.port = 80;
|
||||
}
|
||||
];
|
||||
graphics = false; # disables graphical output
|
||||
graphics = false;
|
||||
memorySize = 1024;
|
||||
diskImage = null;
|
||||
# qemu.options = [ "-M microvm,x-option-roms=off,pit=off,pic=on,isa-serial=off" ];
|
||||
};
|
||||
services.getty = {
|
||||
autologinUser = "root";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue