summaryrefslogtreecommitdiff
path: root/modules/virtualization.nix
blob: e68fdb9ace0daac4a74a3b730a1e2788a99f9373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ config, pkgs, inputs, ... }:
let
  overlay-qemu_full-stable = final: prev: {
    qemu_full = inputs.nixpkgs-stable.legacyPackages."x86_64-linux".qemu_full;
  };
in
{
  nixpkgs.overlays = [ overlay-qemu_full-stable ];
  environment.systemPackages = with pkgs; [
    virt-manager
    bridge-utils
  ];

  boot.binfmt.emulatedSystems = [ "aarch64-linux" ];

  # virtualization
  virtualisation = {
    libvirtd = {
      enable = true;
      qemu.runAsRoot = true;
      qemu.package = pkgs.qemu_full;
    };
    podman = {
      enable = true;
      dockerCompat = true;
    };
  };
}