blob: e69ed982af8eeb376b38fb8695472c36acd11da3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
{ microvm, config, pkgs, ... }:
# let
# language ;
# in
{
microvm.vms.foolcreek.config = {
imports = [
# ./hardware-configuration.nix
../../../modules/nixos/nix-common.nix
../../../modules/nixos/environment.nix
# ../../../modules/nixos/system-packages.nix
../../../modules/users/defin.nix
../../../modules/users/root.nix
];
networking.hostName = "foolcreek";
# boot.loader.systemd-boot.enable = true;
# boot.loader.efi.canTouchEfiVariables = true;
# microvm = {
# microvm = {
# forwardPorts = [ # forward local port 2222-> 22, to ssh into the VM
# { from = "host"; host.port = 2222; guest.port = 22; }
# # forward local port 80 -> 10.1.11.100:80 in the VLAN
# { from = "guest"; host.port = 8080; guest.port = 80; # website
# # guest.address = "10.1.11.101"; guest.port = 80;
# # host.address = "127.0.0.1"; host.port = 80;
# }
# ];
microvm.shares = [{
source = "/nix/store";
mountPoint = "/nix/.ro-store";
tag = "ro-store";
proto = "9p";
}];
microvm.interfaces =[
{
type = "tap";
id = "vm-fc";
mac = "02:00:00:00:00:01";
}
# { type = "user"; }
];
microvm.vcpu = 24;
# microvm.mem = 2048;
# };
systemd.network = {
enable = true;
networks."20-lan" = {
matchConfig.Type = "ether";
networkConfig = {
Address = ["10.1.15.102/24" "2001:db8::b/64"];
Gateway = "10.1.15.254";
DNS = ["8.8.8.8"];
IPv6AcceptRA = true;
DHCP = "no";
};
};
};
# services.wordpress.sites."localhost" = {
# # languages = [ pkgs.wordpressPackages.languages. ]
# };
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
services.openssh = {
enable = true;
ports = [22];
};
environment.systemPackages = with pkgs; [
cowsay
lolcat
btop
];
# nixpkgs.hostPlatform = "x86_64-linux";
system.stateVersion = "25.11";
};
}
|