80 lines
No EOL
1.6 KiB
Nix
Executable file
80 lines
No EOL
1.6 KiB
Nix
Executable file
{ config, lib, pkgs, modulesPath, microvm, inputs, ... }:
|
|
|
|
{
|
|
# =============================================================================
|
|
# IMPORTS
|
|
# =============================================================================
|
|
imports = [
|
|
# Common modules shared across hosts
|
|
../../common/system.nix
|
|
../../common/users.nix
|
|
../../common/services.nix
|
|
];
|
|
|
|
system.stateVersion = "25.05";
|
|
networking.hostName = "gameservers";
|
|
|
|
virtualisation.docker = {
|
|
enable = true;
|
|
enableOnBoot = true;
|
|
};
|
|
|
|
systemd.network.networks."20-lan" = {
|
|
matchConfig.Type = "ether";
|
|
networkConfig = {
|
|
Address = [
|
|
"10.0.0.31/24"
|
|
"2601:5c2:8400:26c0::31/64"
|
|
];
|
|
Gateway = "10.0.0.1";
|
|
DNS = [
|
|
"10.0.0.210"
|
|
"1.1.1.1"
|
|
"1.0.0.1"
|
|
];
|
|
IPv6AcceptRA = true;
|
|
DHCP = "no";
|
|
};
|
|
};
|
|
|
|
systemd.network.networks."19-docker" = {
|
|
matchConfig.Name = "veth*";
|
|
linkConfig = {
|
|
Unmanaged = true;
|
|
};
|
|
};
|
|
|
|
microvm = {
|
|
interfaces = [
|
|
{
|
|
type = "tap";
|
|
id = "vm-test1";
|
|
mac = "02:00:00:00:00:01";
|
|
}
|
|
];
|
|
|
|
shares = [
|
|
{
|
|
source = "/nix/store";
|
|
mountPoint = "/nix/.ro-store";
|
|
tag = "ro-store";
|
|
proto = "virtiofs";
|
|
}
|
|
{
|
|
source = "/etc/ssh";
|
|
mountPoint = "/etc/ssh";
|
|
tag = "ssh";
|
|
proto = "virtiofs";
|
|
}
|
|
{
|
|
source = "/home/regent/gamedata";
|
|
mountPoint = "/root/gamedata";
|
|
tag = "gamedata";
|
|
proto = "virtiofs";
|
|
}
|
|
];
|
|
|
|
vcpu = 4;
|
|
mem = 8192;
|
|
};
|
|
} |