Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle mimetypes for sd-app, sd-viewer and sd-devices in private volume #605

Merged
merged 1 commit into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions dom0/sd-mime-handling.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :

##
# sd-mime-handling
# =====================
#
# Overrides mimetype handling for certain VMs. Instead of relying on the
# /usr/share/applications (system volume), we instead use /home/user/.local/share/
# (private volume). The various mimeapps.list files linked are provided by the
# securedrop-workstation-config package in /opt/, and are symlinked here in their
# respective AppVMs.
##

{% if grains['id'] in ["sd-viewer", "sd-app", "sd-devices-dvm"] %}

sd-private-volume-mimeapps-handling:
file.symlink:
- name: /home/user/.local/share/applications/mimeapps.list
- target: /opt/sdw/mimeapps.list.{{ grains['id'] }}
- makedirs: True

{% endif %}
5 changes: 5 additions & 0 deletions dom0/sd-workstation.top
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ base:
- sd-proxy-template-files
sd-app:
- sd-app-config
- sd-mime-handling
sd-viewer-buster-template:
- sd-viewer-files
sd-app-buster-template:
Expand All @@ -49,6 +50,10 @@ base:
- sd-logging-setup
sd-log:
- sd-logging-setup
sd-viewer:
- sd-mime-handling
sd-devices-dvm:
- sd-mime-handling

# "Placeholder" config to trigger TemplateVM boots,
# so upgrades can be applied automatically via cron.
Expand Down