mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: add microvm module to simplify setup
This commit is contained in:
parent
72a34cac01
commit
d842d25eb9
8 changed files with 99 additions and 28 deletions
|
@ -11,6 +11,7 @@
|
|||
./xdg.nix
|
||||
|
||||
../../../modules/wireguard.nix
|
||||
../../../modules/microvms.nix
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
inputs,
|
||||
lib,
|
||||
nodeName,
|
||||
nodePath,
|
||||
...
|
||||
}: {
|
||||
# IP address math library
|
||||
|
@ -30,7 +31,7 @@
|
|||
# current system due to yubikey availability.
|
||||
forceRekeyOnSystem = builtins.extraBuiltins.unsafeCurrentSystem;
|
||||
hostPubkey = let
|
||||
pubkeyPath = ../.. + "/${nodeName}/secrets/host.pub";
|
||||
pubkeyPath = "${nodePath}/secrets/host.pub";
|
||||
in
|
||||
lib.mkIf (lib.pathExists pubkeyPath || lib.trace "Missing pubkey for ${nodeName}: ${toString pubkeyPath} not found, using dummy replacement key for now." false)
|
||||
pubkeyPath;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
config,
|
||||
inputs,
|
||||
lib,
|
||||
microvm,
|
||||
nixos-hardware,
|
||||
pkgs,
|
||||
...
|
||||
|
@ -11,8 +10,6 @@
|
|||
nixos-hardware.common-cpu-intel
|
||||
nixos-hardware.common-pc-ssd
|
||||
|
||||
microvm.host
|
||||
|
||||
../common/core
|
||||
../common/hardware/intel.nix
|
||||
../common/hardware/physical.nix
|
||||
|
@ -28,21 +25,7 @@
|
|||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" "r8169"];
|
||||
|
||||
microvm.vms = {
|
||||
test = let
|
||||
node =
|
||||
(import ../../nix/generate-node.nix inputs)
|
||||
"ward-microvm-test" {
|
||||
system = "x86_64-linux";
|
||||
config = ./microvms/test;
|
||||
};
|
||||
in {
|
||||
inherit (node) pkgs specialArgs;
|
||||
config = {
|
||||
inherit (node) imports;
|
||||
};
|
||||
};
|
||||
};
|
||||
extra.microvms.test.system = "x86_64-linux";
|
||||
|
||||
#services.authelia.instances.main = {
|
||||
# enable = true;
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
...
|
||||
}: {
|
||||
imports = [
|
||||
microvm.microvm
|
||||
|
||||
../../../common/core
|
||||
|
||||
../../../../users/root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue