config.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #!/usr/bin/python2
  2. # -*- coding: utf-8 -*-
  3. #
  4. # The Qubes OS Project, http://www.qubes-os.org
  5. #
  6. # Copyright (C) 2010 Joanna Rutkowska <joanna@invisiblethingslab.com>
  7. # Copyright (C) 2014 Wojtek Porczyk <joanna@invisiblethingslab.com>
  8. #
  9. # This program is free software; you can redistribute it and/or
  10. # modify it under the terms of the GNU General Public License
  11. # as published by the Free Software Foundation; either version 2
  12. # of the License, or (at your option) any later version.
  13. #
  14. # This program is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License
  20. # along with this program; if not, write to the Free Software
  21. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  22. #
  23. #
  24. qubes_base_dir = "/var/lib/qubes"
  25. system_path = {
  26. 'qubes_guid_path': '/usr/bin/qubes-guid',
  27. 'qrexec_daemon_path': '/usr/lib/qubes/qrexec-daemon',
  28. 'qrexec_client_path': '/usr/lib/qubes/qrexec-client',
  29. 'qubesdb_daemon_path': '/usr/sbin/qubesdb-daemon',
  30. 'qubes_base_dir': qubes_base_dir,
  31. # Relative to qubes_base_dir
  32. 'qubes_appvms_dir': 'appvms',
  33. 'qubes_templates_dir': 'vm-templates',
  34. 'qubes_servicevms_dir': 'servicevms',
  35. 'qubes_store_filename': 'qubes.xml',
  36. 'qubes_kernels_base_dir': 'vm-kernels',
  37. # qubes_icon_dir is obsolete
  38. # use QIcon.fromTheme() where applicable
  39. 'qubes_icon_dir': '/usr/share/icons/hicolor/128x128/devices',
  40. 'qrexec_policy_dir': '/etc/qubes-rpc/policy',
  41. 'config_template_pv': '/usr/share/qubes/vm-template.xml',
  42. 'qubes_pciback_cmd': '/usr/lib/qubes/unbind-pci-device.sh',
  43. 'prepare_volatile_img_cmd': '/usr/lib/qubes/prepare-volatile-img.sh',
  44. 'monitor_layout_notify_cmd': '/usr/bin/qubes-monitor-layout-notify',
  45. }
  46. vm_files = {
  47. 'root_img': 'root.img',
  48. 'rootcow_img': 'root-cow.img',
  49. 'volatile_img': 'volatile.img',
  50. 'clean_volatile_img': 'clean-volatile.img.tar',
  51. 'private_img': 'private.img',
  52. 'kernels_subdir': 'kernels',
  53. 'firewall_conf': 'firewall.xml',
  54. 'whitelisted_appmenus': 'whitelisted-appmenus.list',
  55. 'updates_stat_file': 'updates.stat',
  56. }
  57. defaults = {
  58. 'libvirt_uri': 'xen:///',
  59. 'memory': 400,
  60. 'kernelopts': "nopat",
  61. 'kernelopts_pcidevs': "nopat iommu=soft swiotlb=4096",
  62. 'dom0_update_check_interval': 6*3600,
  63. 'private_img_size': 2*1024*1024*1024,
  64. 'root_img_size': 10*1024*1024*1024,
  65. 'storage_class': None,
  66. # how long (in sec) to wait for VMs to shutdown,
  67. # before killing them (when used qvm-run with --wait option),
  68. 'shutdown_counter_max': 60,
  69. 'vm_default_netmask': "255.255.255.0",
  70. # Set later
  71. 'appvm_label': None,
  72. 'template_label': None,
  73. 'servicevm_label': None,
  74. }
  75. max_qid = 254
  76. max_netid = 254