feat: Added vagrant module.

This commit is contained in:
Spencer Brower
2022-09-02 15:12:45 -04:00
commit 1ebbb4667c
4 changed files with 57 additions and 0 deletions

25
nixosModules/vagrant.nix Normal file
View File

@@ -0,0 +1,25 @@
{ config, ... }: {
config = {
virtualisation.virtualbox.guest.enable = true;
# Mount a VirtualBox shared folder.
fileSystems."/vagrant" = {
fsType = "vboxsf";
device = "vagrant";
options = [ "rw,uid=1001,gid=60,_netdev" ]; # mount as vagrant:nginx
};
users.users.root.password = "vagrant";
users.users."vagrant" = {
isNormalUser = true;
password = "vagrant";
extraGroups = [
"nginx"
"wheel"
# Allow mounting of shared folders.
"vboxsf"
];
};
services.openssh.enable = true;
}