mirror of
				https://git.feal.no/felixalb/nixos-config.git
				synced 2025-11-03 22:06:24 +01:00 
			
		
		
		
	defiant: add libvirtd
This commit is contained in:
		@@ -6,6 +6,7 @@
 | 
			
		||||
      ../../base.nix
 | 
			
		||||
      ../../common/metrics-exporters.nix
 | 
			
		||||
      ./hardware-configuration.nix
 | 
			
		||||
      ./libvirt.nix
 | 
			
		||||
 | 
			
		||||
      ./services/nginx.nix
 | 
			
		||||
      ./services/pihole.nix
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								hosts/defiant/libvirt.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								hosts/defiant/libvirt.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
{ config, pkgs, lib, ... }:
 | 
			
		||||
{
 | 
			
		||||
  virtualisation.libvirtd.enable = true;
 | 
			
		||||
  programs.dconf.enable = true;
 | 
			
		||||
 | 
			
		||||
  boot.extraModprobeConfig = "options kvm_amd nested=1";
 | 
			
		||||
  boot.kernelModules = [ "kvm-amd" "kvm-intel" ];
 | 
			
		||||
 | 
			
		||||
  users.users.felixalb.extraGroups = [ "libvirtd" ];
 | 
			
		||||
 | 
			
		||||
  fileSystems."/var/lib/libvirt/images" = {
 | 
			
		||||
    device = "/tank/iso";
 | 
			
		||||
    options = [ "bind" ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  # On a gui-enabled machine, connect with:
 | 
			
		||||
  # $ virt-manager --connect "qemu+ssh://defiant/system?socket=/var/run/libvirt/libvirt-sock"
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user