summaryrefslogtreecommitdiff
path: root/machines/vm/foolcreek/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'machines/vm/foolcreek/default.nix')
-rw-r--r--machines/vm/foolcreek/default.nix68
1 files changed, 39 insertions, 29 deletions
diff --git a/machines/vm/foolcreek/default.nix b/machines/vm/foolcreek/default.nix
index ad3fc92..e69ed98 100644
--- a/machines/vm/foolcreek/default.nix
+++ b/machines/vm/foolcreek/default.nix
@@ -1,31 +1,26 @@
-{ config, pkgs, ... }:
+{ 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/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;
- # virtualisation.vmVariant = {
- # virtualisation = {
- # memorySize = 2048; # Use 2048 MiB memory.
- # cores = 1;
- # graphics = false;
- # };
- # };
- microvm = {
+
+ # microvm = {
+ # microvm = {
# forwardPorts = [ # forward local port 2222-> 22, to ssh into the VM
# { from = "host"; host.port = 2222; guest.port = 22; }
@@ -35,23 +30,33 @@
# # host.address = "127.0.0.1"; host.port = 80;
# }
# ];
- # interfaces =[
- # {
- # type = "tap";
- # id = "vm-foolcreek";
- # mac = "02:00:00:00:00:01";
- # }
- # { type = "user"; }
- # ];
- };
+ 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.11.101/24" "2001:db8::b/64"];
- Gateway = "10.1.11.254";
+ Address = ["10.1.15.102/24" "2001:db8::b/64"];
+ Gateway = "10.1.15.254";
DNS = ["8.8.8.8"];
IPv6AcceptRA = true;
DHCP = "no";
@@ -59,18 +64,23 @@
};
};
- services.wordpress.sites."localhost" = {
- # languages = [ pkgs.wordpressPackages.languages. ]
+ # services.wordpress.sites."localhost" = {
+ # # languages = [ pkgs.wordpressPackages.languages. ]
- };
-
- networking.firewall.allowedTCPPorts = [ 22 80 443];
+ # };
+ 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 = "24.11";
+ # nixpkgs.hostPlatform = "x86_64-linux";
+ system.stateVersion = "25.11";
+ };
}