mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 19:00:14 +00:00
add vmvariant as preset
This commit is contained in:
31
platforms/nixos/modules/nmasur/presets/vm.nix
Normal file
31
platforms/nixos/modules/nmasur/presets/vm.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.nmasur.presets.vm;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options.nmasur.presets.vm.enable = lib.mkEnableOption "VM-specific settings for testing";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Settings for testing in a VM
|
||||
virtualisation.vmVariant = {
|
||||
home-manager.users."noah".programs.nix-index.enable = false;
|
||||
nmasur.presets.services.openssh.enable = true;
|
||||
virtualisation.forwardPorts = [
|
||||
{
|
||||
from = "host";
|
||||
host.port = 2222;
|
||||
guest.port = 22;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user