mirror of
https://github.com/sbrow/nix.git
synced 2026-02-27 13:21:45 -05:00
feat: Added defaults to vagrant.
This commit is contained in:
@@ -1,47 +1,52 @@
|
|||||||
{ config, hostName ? "nixos", ... }: {
|
{ config, hostName ? "nixos", ... }: {
|
||||||
config = {
|
config = mkMerge [
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
{
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
virtualisation.virtualbox.guest.enable = true;
|
virtualisation.virtualbox.guest.enable = true;
|
||||||
|
|
||||||
# Mount a VirtualBox shared folder.
|
# Mount a VirtualBox shared folder.
|
||||||
fileSystems."/vagrant" = {
|
fileSystems."/vagrant" = {
|
||||||
fsType = "vboxsf";
|
fsType = "vboxsf";
|
||||||
device = "vagrant";
|
device = "vagrant";
|
||||||
options = [ "rw,uid=1001,gid=60,_netdev" ]; # mount as vagrant:nginx
|
options = [ "rw,uid=1001,gid=60,_netdev" ]; # mount as vagrant:nginx
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = hostName;
|
|
||||||
networking.extraHosts = ''
|
|
||||||
127.0.0.1 ${config.networking.hostName}.local
|
|
||||||
'';
|
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
services.avahi = {
|
|
||||||
enable = true;
|
|
||||||
publish = {
|
|
||||||
enable = true;
|
|
||||||
addresses = true;
|
|
||||||
workstation = false;
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
} /*// (mkIf services.laravel.enable {
|
networking.hostName = hostName;
|
||||||
services.laravel.root = mkDefault /vagrant;
|
networking.extraHosts = ''
|
||||||
services.laravel.domain = mkDefault (config.networking.hostName + ".local");
|
127.0.0.1 ${config.networking.hostName}.local
|
||||||
})*/;
|
'';
|
||||||
|
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
publish = {
|
||||||
|
enable = true;
|
||||||
|
addresses = true;
|
||||||
|
workstation = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
mkIf
|
||||||
|
services.laravel.enable
|
||||||
|
{
|
||||||
|
services.laravel.root = mkDefault /vagrant;
|
||||||
|
services.laravel.domain = mkDefault (config.networking.hostName + ".local");
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user