Skip to content

Conversation

@ajaxbits
Copy link

@ajaxbits ajaxbits commented Nov 16, 2025

Adds an option at microvm.vms.*.extraModules which allows users to pass in a list of NixOS Modules that will be merged into microvm.vms.*.config, enabling fully-declarative MicroVM setups to use existing NixOS Modules from other projects.

This is achieved by passing the extraModules option through as an argument to lib/eval-config.nix.

Fixes #197.

Alex Jackson added 2 commits November 16, 2025 13:36
Adds an `extraModules` option for `microvm.vms`, allowing users to pass
in a list of NixOS Modules that will be merged into the `config` option
specified in `microvm.vms`.

This enables fully-declarative MicroVM setups to use existing NixOS
Modules from other projects.
};

extraModules = mkOption {
type = types.listOf types.deferredModule;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeking feedback on the typing of this option. deferredModule seemed correct, but I am not a SME on module definitions like these.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find -- I could totally see that being the way to go. I'll let astro weigh in if they have an opinion before I change anything

@ajaxbits ajaxbits changed the title feat: implement extraModules for microvm.vms feat: implement microvm.vms.*.extraModules Nov 16, 2025
@ajaxbits ajaxbits changed the title feat: implement microvm.vms.*.extraModules feat: implement microvm.vms.*.extraModules Nov 16, 2025
Copilot finished reviewing on behalf of SuperSandro2000 November 17, 2025 13:32

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pass additional NixOS modules to VM

2 participants