config.py 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #!/usr/bin/python2 -O
  2. # vim: fileencoding=utf-8
  3. #
  4. # The Qubes OS Project, https://www.qubes-os.org/
  5. #
  6. # Copyright (C) 2010-2015 Joanna Rutkowska <joanna@invisiblethingslab.com>
  7. # Copyright (C) 2014-2015 Wojtek Porczyk <woju@invisiblethingslab.com>
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; either version 2 of the License, or
  12. # (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 along
  20. # with this program; if not, write to the Free Software Foundation, Inc.,
  21. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  22. #
  23. #
  24. # THIS FILE SHOULD BE CONFIGURED PER PRODUCT
  25. # or better, once first custom product arrives,
  26. # make a real /etc/qubes/master.conf or whatever
  27. #
  28. '''Constants which can be configured in one place'''
  29. qubes_base_dir = "/var/lib/qubes"
  30. system_path = {
  31. 'qubes_guid_path': '/usr/bin/qubes-guid',
  32. 'qrexec_daemon_path': '/usr/lib/qubes/qrexec-daemon',
  33. 'qrexec_client_path': '/usr/lib/qubes/qrexec-client',
  34. 'qubesdb_daemon_path': '/usr/sbin/qubesdb-daemon',
  35. 'qubes_base_dir': qubes_base_dir,
  36. # Relative to qubes_base_dir
  37. 'qubes_appvms_dir': 'appvms',
  38. 'qubes_templates_dir': 'vm-templates',
  39. 'qubes_servicevms_dir': 'servicevms',
  40. 'qubes_store_filename': 'qubes.xml',
  41. 'qubes_kernels_base_dir': 'vm-kernels',
  42. # qubes_icon_dir is obsolete
  43. # use QIcon.fromTheme() where applicable
  44. 'qubes_icon_dir': '/usr/share/icons/hicolor/128x128/devices',
  45. 'qrexec_policy_dir': '/etc/qubes-rpc/policy',
  46. 'config_template_pv': '/usr/share/qubes/vm-template.xml',
  47. 'qubes_pciback_cmd': '/usr/lib/qubes/unbind-pci-device.sh',
  48. 'prepare_volatile_img_cmd': '/usr/lib/qubes/prepare-volatile-img.sh',
  49. 'monitor_layout_notify_cmd': '/usr/bin/qubes-monitor-layout-notify',
  50. }
  51. vm_files = {
  52. 'root_img': 'root.img',
  53. 'rootcow_img': 'root-cow.img',
  54. 'volatile_img': 'volatile.img',
  55. 'clean_volatile_img': 'clean-volatile.img.tar',
  56. 'private_img': 'private.img',
  57. 'kernels_subdir': 'kernels',
  58. 'firewall_conf': 'firewall.xml',
  59. 'whitelisted_appmenus': 'whitelisted-appmenus.list',
  60. 'updates_stat_file': 'updates.stat',
  61. }
  62. defaults = {
  63. 'libvirt_uri': 'xen:///',
  64. 'memory': 400,
  65. 'kernelopts': "nopat",
  66. 'kernelopts_pcidevs': "nopat iommu=soft swiotlb=8192",
  67. 'dom0_update_check_interval': 6*3600,
  68. 'private_img_size': 2*1024*1024*1024,
  69. 'root_img_size': 10*1024*1024*1024,
  70. 'storage_class': 'qubes.storage.xen.XenStorage',
  71. 'pool_drivers': {'xen': 'qubes.storage.xen.XenPool'},
  72. 'pool_config': {'dir_path': '/var/lib/qubes'},
  73. # how long (in sec) to wait for VMs to shutdown,
  74. # before killing them (when used qvm-run with --wait option),
  75. 'shutdown_counter_max': 60,
  76. 'vm_default_netmask': "255.255.255.0",
  77. # Set later
  78. 'appvm_label': None,
  79. 'template_label': None,
  80. 'servicevm_label': None,
  81. }
  82. max_qid = 254
  83. max_netid = 254