Surface-Nixos/virtualisation-configuration.nix

44 lines
790 B
Nix

{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
podman-compose
docker-compose
];
virtualisation = {
podman = {
enable = true;
defaultNetwork.settings.dns_enabled = true;
};
docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
# enable libvirt
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
ovmf = {
enable = true;
packages = [(pkgs.OVMF.override {
secureBoot = true;
tpmSupport = true;
}).fd];
};
};
};
};
users.users.caleb = {
extraGroups = [ "libvirtd" "docker" ];
};
}