diff --git a/salt/profile/matrix/config.sls b/salt/profile/matrix/config.sls index 03bc4e8..dff61a8 100644 --- a/salt/profile/matrix/config.sls +++ b/salt/profile/matrix/config.sls @@ -1,5 +1,32 @@ {% set roles = salt['grains.get']('roles', []) %} +riot_dependencies: + pkg.installed: + - pkgs: + - riot-web + +riot_conf_dir: + file.directory: + - name: /etc/riot-web/ + +riot_conf_file: + file.managed: + - name: /etc/riot-web/config.json + - source: salt://profile/matrix/files/config-riot.json + - require: + - file: riot_conf_dir + +riot_custom_background_dir: + file.directory: + - name: /var/www/riot-web/themes/riot/img/backgrounds/ + +riot_custom_background: + file.managed: + - name: /var/www/riot-web/themes/riot/img/backgrounds/valley.jpg + - source: salt://profile/matrix/files/valley.jpg + - require: + - file: riot_custom_background_dir + synapse_conf_dir: file.directory: - name: /etc/matrix-synapse/ diff --git a/salt/profile/matrix/files/config-riot.json b/salt/profile/matrix/files/config-riot.json new file mode 100644 index 0000000..f5c9da2 --- /dev/null +++ b/salt/profile/matrix/files/config-riot.json @@ -0,0 +1,58 @@ +{ + "default_server_config": { + "m.homeserver": { + "base_url": "https://matrix.opensuse.org", + "server_name": "opensuse.org" + }, + "m.identity_server": { + "base_url": "https://vector.im" + } + }, + "disable_custom_urls": false, + "disable_guests": false, + "disable_login_language_selector": false, + "disable_3pid_login": false, + "brand": "Riot", + "integrations_ui_url": "https://scalar.vector.im/", + "integrations_rest_url": "https://scalar.vector.im/api", + "integrations_widgets_urls": [ + "https://scalar.vector.im/_matrix/integrations/v1", + "https://scalar.vector.im/api", + "https://scalar-staging.vector.im/_matrix/integrations/v1", + "https://scalar-staging.vector.im/api", + "https://scalar-staging.riot.im/scalar/api" + ], + "bug_report_endpoint_url": "https://riot.im/bugreports/submit", + "defaultCountryCode": "GB", + "showLabsSettings": true, + "features": { + "feature_pinning": "enable", + "feature_custom_status": "labs", + "feature_custom_tags": "labs", + "feature_state_counters": "labs" + }, + "default_federate": true, + "default_theme": "light", + "roomDirectory": { + "servers": [ + "opensuse.org" + ] + }, + "welcomeUserId": "@riot-bot:matrix.org", + "piwik": { + "url": "https://beans.opensuse.org/", + "whitelistedHSUrls": ["https://opensuse.org"], + "whitelistedISUrls": ["https://vector.im", "https://opensuse.org"], + "siteId": 1 + }, + "enable_presence_by_hs_url": { + "https://opensuse.org": false, + "https://matrix.opensuse.org": false + }, + "settingDefaults": { + "breadcrumbs": true + }, + "jitsi": { + "preferredDomain": "jitsi.opensuse.org" + } +} diff --git a/salt/profile/matrix/files/valley.jpg b/salt/profile/matrix/files/valley.jpg new file mode 100644 index 0000000..4732a29 Binary files /dev/null and b/salt/profile/matrix/files/valley.jpg differ diff --git a/salt/profile/matrix/init.sls b/salt/profile/matrix/init.sls index e0d13cf..5b22e8f 100644 --- a/salt/profile/matrix/init.sls +++ b/salt/profile/matrix/init.sls @@ -1,10 +1,5 @@ {% set roles = salt['grains.get']('roles', []) %} -riot_dependencies: - pkg.installed: - - pkgs: - - riot-web - synapse_service: service.running: - name: synapse diff --git a/salt/role/matrix.sls b/salt/role/matrix.sls index 33bc29d..7ae7418 100644 --- a/salt/role/matrix.sls +++ b/salt/role/matrix.sls @@ -3,4 +3,5 @@ include: - profile.matrix.init - profile.matrix.appservice - profile.matrix.telegram + - profile.matrix.dimension - profile.matrix.config