Advertisement
Guest User

Untitled

a guest
Apr 29th, 2019
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. { config, lib, pkgs, ... }:
  2.  
  3. {
  4. imports = [
  5. <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
  6. ];
  7.  
  8. networking.hostName = "xen-testing";
  9. system.stateVersion = "19.09";
  10.  
  11. virtualisation.xen = {
  12. enable = true;
  13. package = pkgs.xenPackages.xen_4_10-light;
  14. package-qemu = pkgs.qemu_xen_4_10-light;
  15. domain0MemorySize = 0;
  16.  
  17. bootParams = [
  18. "noreboot" "console=com1,vga" "com1=115200,8n1"
  19. ];
  20.  
  21. trace = true;
  22. };
  23.  
  24. boot.kernelParams = [
  25. "console=hvc0" "loglevel=8" "initcall_debug"
  26. ];
  27.  
  28. boot.loader = {
  29. efi.canTouchEfiVariables = true;
  30. timeout = 3;
  31. grub = {
  32. enable = true;
  33. device = "nodev";
  34. efiSupport = true;
  35. extraConfig = ''
  36. serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
  37. '';
  38. };
  39. };
  40.  
  41. boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
  42. boot.kernelModules = [ "kvm-amd" ];
  43. boot.extraModulePackages = [ ];
  44.  
  45. fileSystems."/" =
  46. { label = "xen-root";
  47. fsType = "ext4";
  48. };
  49.  
  50. fileSystems."/boot" =
  51. { label = "xen-sys";
  52. fsType = "vfat";
  53. };
  54.  
  55. swapDevices =
  56. [ { label = "xen-swap"; }
  57. ];
  58.  
  59. nix.maxJobs = lib.mkDefault 2;
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement