config.py 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #
  2. # The Qubes OS Project, https://www.qubes-os.org/
  3. #
  4. # Copyright (C) 2010-2015 Joanna Rutkowska <joanna@invisiblethingslab.com>
  5. # Copyright (C) 2014-2015 Wojtek Porczyk <woju@invisiblethingslab.com>
  6. #
  7. # This library is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU Lesser General Public
  9. # License as published by the Free Software Foundation; either
  10. # version 2.1 of the License, or (at your option) any later version.
  11. #
  12. # This library is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. # Lesser General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Lesser General Public
  18. # License along with this library; if not, see <https://www.gnu.org/licenses/>.
  19. #
  20. #
  21. # THIS FILE SHOULD BE CONFIGURED PER PRODUCT
  22. # or better, once first custom product arrives,
  23. # make a real /etc/qubes/master.conf or whatever
  24. #
  25. '''Constants which can be configured in one place'''
  26. import os.path
  27. qubes_base_dir = "/var/lib/qubes"
  28. system_path = {
  29. 'qrexec_daemon_path': '/usr/sbin/qrexec-daemon',
  30. 'qrexec_client_path': '/usr/bin/qrexec-client',
  31. 'qrexec_rpc_multiplexer': '/usr/lib/qubes/qubes-rpc-multiplexer',
  32. 'qubesdb_daemon_path': '/usr/sbin/qubesdb-daemon',
  33. # Relative to qubes_base_dir
  34. 'qubes_appvms_dir': 'appvms',
  35. 'qubes_templates_dir': 'vm-templates',
  36. 'qubes_store_filename': 'qubes.xml',
  37. 'qubes_kernels_base_dir': 'vm-kernels',
  38. # qubes_icon_dir is obsolete
  39. # use QIcon.fromTheme() where applicable
  40. 'qubes_icon_dir': '/usr/share/icons/hicolor/128x128/devices',
  41. 'dom0_services_dir': '/var/run/qubes-service',
  42. }
  43. defaults = {
  44. 'libvirt_uri': 'xen:///',
  45. 'memory': 400,
  46. 'hvm_memory': 400,
  47. 'kernelopts': "nopat",
  48. 'kernelopts_pcidevs': "nopat iommu=soft swiotlb=8192",
  49. 'kernelopts_common': ('root=/dev/mapper/dmroot ro nomodeset console=hvc0 '
  50. 'rd_NO_PLYMOUTH rd.plymouth.enable=0 plymouth.enable=0 '),
  51. 'private_img_size': 2*1024*1024*1024,
  52. 'root_img_size': 10*1024*1024*1024,
  53. 'pool_configs': {
  54. # create file(-reflink) pool even when the default one is LVM
  55. 'varlibqubes': {
  56. 'dir_path': qubes_base_dir,
  57. 'name': 'varlibqubes'
  58. },
  59. 'linux-kernel': {
  60. 'dir_path': os.path.join(qubes_base_dir,
  61. system_path['qubes_kernels_base_dir']),
  62. 'driver': 'linux-kernel',
  63. 'name': 'linux-kernel'
  64. }
  65. },
  66. }
  67. max_qid = 254
  68. max_dispid = 10000
  69. #: built-in standard labels, if creating new one, allocate them above this
  70. # number, at least until label index is removed from API
  71. max_default_label = 8
  72. #: profiles for admin.backup.* calls
  73. backup_profile_dir = '/etc/qubes/backup'
  74. #: site-local prefix for all VMs
  75. qubes_ipv6_prefix = 'fd09:24ef:4179:0000'