Commit 95e6241eede4
Changed files (2)
machine
modules
profiles
machine/hokkaido.nix
@@ -22,7 +22,10 @@ with import ../assets/machines.nix; {
docker.enable = true;
ssh.enable = true;
syncthing.enable = true;
- virtualization.enable = true;
+ virtualization = {
+ enable = true;
+ listenTCP = true;
+ };
nix-config.buildCores = 2;
};
services = {
modules/profiles/virtualization.nix
@@ -12,11 +12,20 @@ in
description = "Enable virtualization profile";
type = types.bool;
};
+ listenTCP = mkOption {
+ default = false;
+ description = "Make libvirt listen to TCP";
+ type = types.bool;
+ };
};
};
config = mkIf cfg.enable {
virtualisation.libvirtd = {
enable = true;
+ extraConfig = mkIf cfg.listenTCP ''
+ listen_tcp = 1
+ tcp_port = "16509"
+ '';
};
environment.systemPackages = with pkgs; [
qemu