mirror of
https://github.com/unman/shaker.git
synced 2024-12-25 23:39:30 -05:00
Merge branch 'sys-usb'
This commit is contained in:
commit
0da0a45ffd
9
sys-usb/clone.sls
Normal file
9
sys-usb/clone.sls
Normal file
@ -0,0 +1,9 @@
|
||||
include:
|
||||
- template-debian-10-minimal
|
||||
|
||||
qvm-clone-id:
|
||||
qvm.clone:
|
||||
- require:
|
||||
- sls: template-debian-10-minimal
|
||||
- name: template-sys-usb
|
||||
- source: debian-10-minimal
|
4
sys-usb/clone.top
Normal file
4
sys-usb/clone.top
Normal file
@ -0,0 +1,4 @@
|
||||
base:
|
||||
dom0:
|
||||
- match: nodegroup
|
||||
- sys-usb.clone
|
72
sys-usb/create.sls
Normal file
72
sys-usb/create.sls
Normal file
@ -0,0 +1,72 @@
|
||||
include:
|
||||
- sys-usb.clone
|
||||
|
||||
remove:
|
||||
qvm.absent:
|
||||
- names:
|
||||
- sys-usb
|
||||
- sys-usb-dock
|
||||
- sys-usb-left
|
||||
- sys-usb-dvm
|
||||
|
||||
sys-usb-dvm:
|
||||
qvm.present:
|
||||
- name: sys-usb-dvm
|
||||
- template: template-sys-usb
|
||||
- label: red
|
||||
|
||||
qvm-prefs-id:
|
||||
qvm.prefs:
|
||||
- name: sys-usb-dvm
|
||||
- netvm: none
|
||||
- memory: 300
|
||||
- vcpus: 2
|
||||
- virt_mode: hvm
|
||||
- autostart: False
|
||||
- template_for_dispvms: True
|
||||
- include_in_backups: false
|
||||
|
||||
{% set usbs = ['sys-usb','sys-usb-dock','sys-usb-left'] %}
|
||||
{% for usb in usbs %}
|
||||
{{usb}}:
|
||||
qvm.present:
|
||||
- name:
|
||||
- {{usb}}
|
||||
- template: sys-usb-dvm
|
||||
- class: DispVM
|
||||
- label: red
|
||||
|
||||
{{usb}}-prefs:
|
||||
qvm.prefs:
|
||||
- name: {{usb}}
|
||||
- autostart: false
|
||||
- include_in_backups: false
|
||||
- pci_strictreset: False
|
||||
{% if usb == 'sys-usb' %}
|
||||
- pcidevs: [ '00:1a.0' ]
|
||||
{% elif usb == 'sys-usb-left' %}
|
||||
- pcidevs: [ '00:14.0' ]
|
||||
{% elif usb == 'sys-usb-dock' %}
|
||||
- pcidevs: [ '00:1d.0' ]
|
||||
{% endif %}
|
||||
|
||||
{{usb}}-features:
|
||||
qvm.features:
|
||||
- name: {{usb}}
|
||||
- disable:
|
||||
- service.cups
|
||||
- service.cups-browsed
|
||||
- service.meminfo-writer
|
||||
- service.cups-browsed
|
||||
- service.qubes-updates-proxy
|
||||
|
||||
{% endfor%}
|
||||
|
||||
update_file:
|
||||
file.prepend:
|
||||
- names:
|
||||
- /etc/qubes-rpc/policy/qubes.InputMouse
|
||||
- /etc/qubes-rpc/policy/qubes.InputKeyboard
|
||||
- text: sys-usb dom0 allow,user=root
|
||||
- text: sys-usb-dock dom0 allow,user=root
|
||||
|
4
sys-usb/create.top
Normal file
4
sys-usb/create.top
Normal file
@ -0,0 +1,4 @@
|
||||
base:
|
||||
dom0:
|
||||
- match: nodegroup
|
||||
- sys-usb.create
|
25
sys-usb/install.sls
Normal file
25
sys-usb/install.sls
Normal file
@ -0,0 +1,25 @@
|
||||
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
|
||||
|
||||
/etc/apt/sources.list:
|
||||
file.replace:
|
||||
- pattern: 'https:'
|
||||
- repl: 'http://HTTPS/'
|
||||
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
||||
|
||||
/etc/apt/sources.list.d/qubes-r4.list:
|
||||
file.replace:
|
||||
- pattern: 'https:'
|
||||
- repl: 'http://HTTPS/'
|
||||
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
||||
|
||||
allow-testing:
|
||||
file.uncomment:
|
||||
- name: /etc/apt/sources.list.d/qubes-r4.list
|
||||
- regex: ^deb\s.*qubes-os.org.*-testing
|
||||
- backup: false
|
||||
|
||||
installed:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
- qubes-input-proxy-sender
|
||||
- qubes-usb-proxy
|
5
sys-usb/install.top
Normal file
5
sys-usb/install.top
Normal file
@ -0,0 +1,5 @@
|
||||
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
|
||||
|
||||
base:
|
||||
template-sys-usb:
|
||||
- sys-usb.install
|
Loading…
Reference in New Issue
Block a user