Split the 1,409-line modules/config.nix into 9 focused modules: - lib/helpers.nix: Pure utility functions (CIDR, MAC generation, PCI helpers) - assertions.nix: All validation assertions - pci.nix: PCI isolation (vfio-pci, udev rules, activation script) - networking.nix: TAP interfaces, NAT, vm-switch activation - services.nix: Systemd units (sockets, services, tmpfiles, polkit) - scripts.nix: VM launcher and user scripts (vm-run, vm-start, etc.) - desktop.nix: Desktop integration (.desktop files, bash completion) - overlay.nix: KWin window decoration patches - package.nix: Package assembly and environment config Each module imports lib/helpers.nix for shared functions and computes its own derived values from cfg, keeping modules independent. Added internal options (_internal.vmScripts, proxyScripts, userScripts, desktopFilesPackage, bashCompletionScript) for inter-module communication. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
21 lines
263 B
Nix
21 lines
263 B
Nix
# NixOS module entry point for vmsilo
|
|
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [
|
|
./options.nix
|
|
./assertions.nix
|
|
./pci.nix
|
|
./networking.nix
|
|
./services.nix
|
|
./scripts.nix
|
|
./desktop.nix
|
|
./overlay.nix
|
|
./package.nix
|
|
];
|
|
}
|