From d6cf6c5a416f2b30c9c3151d135413d67f0e8c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Sat, 12 Sep 2026 20:53:03 +0200 Subject: [PATCH] add compute1-vm --- devices.nix | 3 ++ flake.lock | 52 +++++++++++++++++--- flake.nix | 4 ++ homeConfigurations/muede/ssh.nix | 4 ++ nixosConfigurations/compute1-vm/default.nix | 18 +++++++ nixosConfigurations/hetzner-vpn2/default.nix | 1 - 6 files changed, 74 insertions(+), 8 deletions(-) create mode 100644 nixosConfigurations/compute1-vm/default.nix diff --git a/devices.nix b/devices.nix index 6cd509f..fc47287 100644 --- a/devices.nix +++ b/devices.nix @@ -15,6 +15,9 @@ in # system = "aarch64-linux"; # nixosSystem = nixos-raspberrypi.lib.nixosInstaller; # }; + compute1-vm = { + system = "x86_64-linux"; + }; epimetheus = { system = "aarch64-linux"; }; diff --git a/flake.lock b/flake.lock index 4201036..e9d1c5d 100644 --- a/flake.lock +++ b/flake.lock @@ -373,11 +373,11 @@ ] }, "locked": { - "lastModified": 1789162365, - "narHash": "sha256-0EXUjmLSay0sjS0SmXD5DMPpxvMRyaN0rkadKLgVG+8=", + "lastModified": 1789229958, + "narHash": "sha256-/RQjL9iTDNXB5x/eARV3D50q1BSV4I6dUO1cCyjdpYU=", "ref": "refs/heads/main", - "rev": "1fb9e068eef964f5188c404aeb395bce0eeb5556", - "revCount": 4459, + "rev": "2a02c76ad53ee7e324628335bedbb7a71e7abc42", + "revCount": 4497, "type": "git", "url": "https://forge.darkest.space/hyperhive/hyperhive.git" }, @@ -436,6 +436,27 @@ "type": "github" } }, + "microvm": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "spectrum": "spectrum" + }, + "locked": { + "lastModified": 1789237993, + "narHash": "sha256-RAdzfDzSYSN9l51H+XrbEwWHQ6rq/zqCvQJXtMXmBEM=", + "owner": "astro", + "repo": "microvm.nix", + "rev": "c344219b88c8f630efff501a53ce4ef54ad73f76", + "type": "github" + }, + "original": { + "owner": "astro", + "repo": "microvm.nix", + "type": "github" + } + }, "niri": { "inputs": { "niri-stable": "niri-stable", @@ -742,6 +763,7 @@ "hyperhive": "hyperhive", "hyperhive-website": "hyperhive-website", "lanzaboote": "lanzaboote", + "microvm": "microvm", "niri": "niri", "nix-vscode-extensions": "nix-vscode-extensions", "nixos-generators": "nixos-generators", @@ -846,6 +868,22 @@ "url": "https://forge.darkest.space/servicepoint/servicepoint-tanks.git" } }, + "spectrum": { + "flake": false, + "locked": { + "lastModified": 1786032750, + "narHash": "sha256-+Ba/kIn5BjvV7PN8bWOo7RoqgTY/Yv2M7qeMf3wS2Ag=", + "ref": "refs/heads/main", + "rev": "77d2389874bb092b8dbf05ecc5b1030372e80e98", + "revCount": 1417, + "type": "git", + "url": "https://spectrum-os.org/git/spectrum" + }, + "original": { + "type": "git", + "url": "https://spectrum-os.org/git/spectrum" + } + }, "stylix": { "inputs": { "base16": "base16", @@ -1019,11 +1057,11 @@ ] }, "locked": { - "lastModified": 1789158872, - "narHash": "sha256-t+pbC+A3e3T5+WXxHu2WjUxTGUXPLXD7DL5cwHy+1+0=", + "lastModified": 1789232649, + "narHash": "sha256-0IP5Zluyh3pjvlzFAnCJ+dOXESxvVxB5vCIYWtVx+AE=", "owner": "vibec0re", "repo": "trollshell", - "rev": "bac323829673c48ad529e22f56386804fc9cef35", + "rev": "9eab2211b4aed1b7e601a23363baf2e8ad4350d4", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c992c9e..b386e1f 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,10 @@ url = "github:nix-community/lanzaboote/v1.0.0"; inputs.nixpkgs.follows = "nixpkgs"; }; + microvm = { + url = "github:astro/microvm.nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; niri = { url = "github:sodiboo/niri-flake"; inputs = { diff --git a/homeConfigurations/muede/ssh.nix b/homeConfigurations/muede/ssh.nix index aff53ca..4d0339f 100644 --- a/homeConfigurations/muede/ssh.nix +++ b/homeConfigurations/muede/ssh.nix @@ -59,6 +59,10 @@ HostName = "hyperforge.darkest.space"; User = "root"; }; + "compute1.netcup.dfdx.de" = { + User = "mara"; + Port = 17562; + }; }; }; } diff --git a/nixosConfigurations/compute1-vm/default.nix b/nixosConfigurations/compute1-vm/default.nix new file mode 100644 index 0000000..ac42ecc --- /dev/null +++ b/nixosConfigurations/compute1-vm/default.nix @@ -0,0 +1,18 @@ +{ + microvm, + lib, + ... +}: +{ + imports = [ microvm.nixosModules.microvm ]; + + config = { + microvm.hypervisor = "qemu"; + + # microvm boots the kernel directly; there is no ESP to install a bootloader onto + boot.loader.systemd-boot.enable = lib.mkForce false; + + # store optimisation is unsafe on microvm's virtiofs/block-backed store + nix.optimise.automatic = lib.mkForce false; + }; +} diff --git a/nixosConfigurations/hetzner-vpn2/default.nix b/nixosConfigurations/hetzner-vpn2/default.nix index 34a83c5..2d5d3a8 100644 --- a/nixosConfigurations/hetzner-vpn2/default.nix +++ b/nixosConfigurations/hetzner-vpn2/default.nix @@ -13,4 +13,3 @@ ]; }; } -