summaryrefslogtreecommitdiff
path: root/modules/snorlax
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-02-12 14:31:16 +0100
committerJasper Ras <jras@hostnet.nl>2025-02-12 14:31:16 +0100
commit3d01a7af979804106cc1dc8a1a4fe598d93691f6 (patch)
tree0eae436129468bfaf04580b0514fc519383cbbf6 /modules/snorlax
parent7ad2810efcbb84dc8e904ba69a09d3ffddea19bc (diff)
some muvm shtuff
Diffstat (limited to 'modules/snorlax')
-rw-r--r--modules/snorlax/default.nix3
-rw-r--r--modules/snorlax/networking.nix4
-rw-r--r--modules/snorlax/uvm-guests/cpanel.nix19
3 files changed, 19 insertions, 7 deletions
diff --git a/modules/snorlax/default.nix b/modules/snorlax/default.nix
index 5266987..dac4a4a 100644
--- a/modules/snorlax/default.nix
+++ b/modules/snorlax/default.nix
@@ -16,9 +16,6 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
- networking.hostName = "snorlax";
- networking.hostId = "1d1ebf34";
-
time.timeZone = "Europe/Amsterdam";
programs.mtr.enable = true;
diff --git a/modules/snorlax/networking.nix b/modules/snorlax/networking.nix
index 81683a3..f973b8e 100644
--- a/modules/snorlax/networking.nix
+++ b/modules/snorlax/networking.nix
@@ -1,5 +1,9 @@
{ ... }:
{
+ networking.hostName = "snorlax";
+ networking.hostId = "1d1ebf34";
+ networking.useNetworkd = true;
+
systemd.network.enable = true;
systemd.network.networks."10-lan" = {
diff --git a/modules/snorlax/uvm-guests/cpanel.nix b/modules/snorlax/uvm-guests/cpanel.nix
index 51bc0d2..f59a306 100644
--- a/modules/snorlax/uvm-guests/cpanel.nix
+++ b/modules/snorlax/uvm-guests/cpanel.nix
@@ -1,20 +1,29 @@
-{ pkgs, ... }:
+{ inputs, ... }:
{
microvm.autostart = [ "cpanel" ];
microvm.vms = {
cpanel = {
# The package set to use for the microvm. This also determines the microvm's architecture.
# Defaults to the host system's package set if not given.
- pkgs = import pkgs { system = "x86_64-linux"; };
+ # pkgs = import pkgs { system = "x86_64-linux"; };
# (Optional) A set of special arguments to be passed to the MicroVM's NixOS modules.
- #specialArgs = {};
+ specialArgs = { inherit inputs; };
# The configuration for the MicroVM.
# Multiple definitions will be merged as expected.
config = {
+
networking.hostName = "cpanel";
+ imports = [
+ inputs.home-manager.nixosModules.home-manager
+ inputs.disko.nixosModules.disko
+ inputs.nixos-facter-modules.nixosModules.facter
+ ../../core
+ ];
+
+
# It is highly recommended to share the host's nix-store
# with the VMs to prevent building huge images.
microvm.shares = [{
@@ -25,7 +34,9 @@
}];
microvm.interfaces = [{
- type = "bridge";
+ type = "tap";
+ id = "cpanel";
+ mac = "02:00:00:00:00:01";
}];
# Any other configuration for your MicroVM