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,
|
# config,
|
||||||
lib,
|
# lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -11,47 +11,22 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./base.nix
|
||||||
# ./microvm.nix
|
# ./microvm.nix
|
||||||
./vm-variant.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 = {
|
virtualisation.vmVariant = {
|
||||||
root = {
|
virtualisation = {
|
||||||
password = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Optional: Make sure DNS is configured
|
forwardPorts = [
|
||||||
networking = {
|
{
|
||||||
nameservers = [
|
from = "host";
|
||||||
"9.9.9.9"
|
host.port = 8888;
|
||||||
];
|
guest.port = 80;
|
||||||
# Enable networking
|
}
|
||||||
# networkmanager.enable = true;
|
];
|
||||||
};
|
};
|
||||||
nix = {
|
|
||||||
settings.experimental-features = [
|
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -66,6 +41,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# users.mutableUsers = false;
|
|
||||||
system.stateVersion = "25.05";
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,10 @@
|
||||||
_: {
|
_: {
|
||||||
|
|
||||||
virtualisation.vmVariant = {
|
virtualisation.vmVariant = {
|
||||||
# virtualisation.diskImage = null;
|
|
||||||
# Boot with tmpfs as root
|
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
|
graphics = false;
|
||||||
forwardPorts = [
|
|
||||||
{
|
|
||||||
from = "host";
|
|
||||||
host.port = 8888;
|
|
||||||
guest.port = 80;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
graphics = false; # disables graphical output
|
|
||||||
memorySize = 1024;
|
memorySize = 1024;
|
||||||
diskImage = null;
|
diskImage = null;
|
||||||
# qemu.options = [ "-M microvm,x-option-roms=off,pit=off,pic=on,isa-serial=off" ];
|
|
||||||
};
|
};
|
||||||
services.getty = {
|
services.getty = {
|
||||||
autologinUser = "root";
|
autologinUser = "root";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue