summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix17
-rw-r--r--machines/doretta/default.nix16
-rw-r--r--machines/vm/foolcreekwireless/default.nix16
3 files changed, 44 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index f45b418..a46e310 100644
--- a/flake.nix
+++ b/flake.nix
@@ -25,6 +25,12 @@
inputs.nixpkgs.follows = "nixpkgs";
};
+ # for hyprvisoring
+ microvm = {
+ url = "github:astro/microvm.nix";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
# modern window compositor
hyprland = {
url = "github:hyprwm/Hyprland";
@@ -258,6 +264,17 @@
home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; }
];
};
+ microvm-test = lib.nixosSystem { # test
+ system = "x86_64-linux";
+ modules = minimalHomeManagerSettings ++ [
+ microvm.nixosModules.microvm
+ home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; }
+ {
+ networking.hostName = "microvm-test";
+ microvm.hyprvisor = "cloud-hyprvisor";
+ }
+ ];
+ };
# foolcreekwireless = lib.nixosSystem { # vm for website
# modules = minimalHomeManagerSettings ++ [ ./machines/vm/foolcreekwireless
# home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; }
diff --git a/machines/doretta/default.nix b/machines/doretta/default.nix
index 2b79a99..d673851 100644
--- a/machines/doretta/default.nix
+++ b/machines/doretta/default.nix
@@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
-{ config, pkgs, ... }:
+{ microvm, config, pkgs, ... }:
{
imports =
@@ -13,6 +13,7 @@
../../modules/nixos/environment.nix
../../modules/nixos/tailscale.nix
../../modules/nixos/system-packages.nix
+ microvm.host
../../modules/users/defin.nix
../../modules/users/git.nix
@@ -33,6 +34,19 @@
};
programs.virt-manager.enable = true;
+ microvm.vms = {
+ microvm-test = {
+ config = {
+ microvm.shares = [{
+ source = "/nix/store";
+ mountPoint = "/nix/.ro-store";
+ tag = "ro-store";
+ proto = "virtiofs";
+ }];
+ };
+ };
+ };
+
# Set your time zone.
time.timeZone = "US/Mountain";
diff --git a/machines/vm/foolcreekwireless/default.nix b/machines/vm/foolcreekwireless/default.nix
index 3cd4a91..a2adcf1 100644
--- a/machines/vm/foolcreekwireless/default.nix
+++ b/machines/vm/foolcreekwireless/default.nix
@@ -1,4 +1,8 @@
-{ config, pkgs, ... }:{
+{ config, pkgs, ... }:
+# let
+# language ;
+# in
+{
imports = [
# ./hardware-configuration.nix
@@ -13,15 +17,19 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
virtualisation.vmVariant = {
- # following configuration is added only when building VM with build-vm
virtualisation = {
memorySize = 2048; # Use 2048 MiB memory.
- cores = 3;
+ cores = 1;
graphics = false;
};
};
- networking.firewall.allowedTCPPorts = [ 22 2200 ];
+ services.wordpress.sites."localhost" = {
+ # languages = [ pkgs.wordpressPackages.languages. ]
+
+ };
+
+ networking.firewall.allowedTCPPorts = [ 22 ];
environment.systemPackages = with pkgs; [
cowsay