diff --git a/hosts/Emitter.nix b/hosts/Emitter.nix index 8f12e6e..12e9958 100644 --- a/hosts/Emitter.nix +++ b/hosts/Emitter.nix @@ -3,6 +3,8 @@ imports = [ ./forgejo.nix ./tls_sni.nix + + ./labs.nix ]; boot.loader.grub.enable = true; diff --git a/hosts/labs.nix b/hosts/labs.nix new file mode 100644 index 0000000..295a337 --- /dev/null +++ b/hosts/labs.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + vagrant + ]; + + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "vagrant" + ]; + + environment.variables = { + VAGRANT_DEFAULT_PROVIDER = "libvirt"; + }; + + virtualisation.libvirtd = { + enable = true; + }; + + users.users.fruchti.extraGroups = [ + "libvirtd" + ]; + + networking.firewall.allowedTCPPorts = [ + 8000 + 8001 + 4119 + 2222 + ]; +}