virt.nix 390 B

123456789101112131415161718192021222324
  1. { config, lib, pkgs, ... }:
  2. with lib;
  3. let
  4. cfg = config.roles.virt;
  5. in {
  6. options.roles.virt.enable = mkOption {
  7. default = false;
  8. type = types.bool;
  9. };
  10. config = mkIf cfg.enable {
  11. environment.systemPackages = with pkgs; [
  12. podman
  13. qemu
  14. virt-manager
  15. ];
  16. virtualisation = {
  17. containers.enable = true;
  18. libvirtd.enable = true;
  19. };
  20. };
  21. }