Skip to content

Commit

Permalink
feat: add Firefox browser from Mozilla repository
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-grande committed May 24, 2024
1 parent c8b9bb3 commit cbf61e6
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 9 deletions.
11 changes: 10 additions & 1 deletion salt/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,27 @@ to install:
```sh
sudo qubesctl --skip-dom0 --targets=tpl-browser state.apply browser.install-chromium
```

- Chrome:
```sh
sudo qubesctl --skip-dom0 --targets=tpl-browser state.apply browser.install-chrome
```
- Firefox-ESR:

- Firefox:
```sh
sudo qubesctl --skip-dom0 --targets=tpl-browser state.apply browser.install-firefox
```

- Firefox-ESR:
```sh
sudo qubesctl --skip-dom0 --targets=tpl-browser state.apply browser.install-firefox-esr
```

- W3M:
```sh
sudo qubesctl --skip-dom0 --targets=tpl-browser state.apply browser.install-w3m
```

- Lynx:
```sh
sudo qubesctl --skip-dom0 --targets=tpl-browser state.apply browser.install-lynx
Expand Down
9 changes: 6 additions & 3 deletions salt/browser/create.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ prefs:
- maxmem: 2000
features:
- set:
- default-menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop"
- menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop"
- default-menu-items: "firefox.desktop firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-open-file-manager.desktop qubes-start.desktop" # noqa: 204
- menu-items: "firefox.desktop firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-open-file-manager.desktop hqubes-start.desktop" # noqa: 204
- disable:
- service.tracker
- service.evolution-data-server
{%- endload %}
{{ load(defaults) }}
Expand Down Expand Up @@ -49,6 +52,6 @@ features:
- service.tracker
- service.evolution-data-server
- set:
- menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop"
- menu-items: "firefox.desktop firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-open-file-manager.desktop qubes-start.desktop" # noqa: 204
{%- endload %}
{{ load(defaults) }}
19 changes: 19 additions & 0 deletions salt/browser/files/repo/mozilla.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

xsBNBGCRt7MBCADkYJHHQQoL6tKrW/LbmfR9ljz7ib2aWno4JO3VKQvLwjyUMPpq
/SXXMOnx8jXwgWizpPxQYDRJ0SQXS9ULJ1hXRL/OgMnZAYvYDeV2jBnKsAIEdiG/
e1qm8P4W9qpWJc+hNq7FOT13RzGWRx57SdLWSXo0KeY38r9lvjjOmT/cuOcmjwlD
T9XYf/RSO+yJ/AsyMdAr+ZbDeQUd9HYJiPdI04lGaGM02MjDMnx+monc+y54t+Z+
ry1WtQdzoQt9dHlIPlV1tR+xV5DHHsejCZxu9TWzzSlL5wfBBeEz7R/OIzivGJpW
QdJzd+2QDXSRg9q2XYWP5ZVtSgjVVJjNlb6ZABEBAAHNVEFydGlmYWN0IFJlZ2lz
dHJ5IFJlcG9zaXRvcnkgU2lnbmVyIDxhcnRpZmFjdC1yZWdpc3RyeS1yZXBvc2l0
b3J5LXNpZ25lckBnb29nbGUuY29tPsLAjgQTAQoAOBYhBDW6oLM+nrOW9ZyoOMC6
XObcYxWjBQJgkbezAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEMC6XObc
YxWj+igIAMFh6DrAYMeq9sbZ1ZG6oAMrinUheGQbEqe76nIDQNsZnhDwZ2wWqgVC
7DgOMqlhQmOmzm7M6Nzmq2dvPwq3xC2OeI9fQyzjT72deBTzLP7PJok9PJFOMdLf
ILSsUnmMsheQt4DUO0jYAX2KUuWOIXXJaZ319QyoRNBPYa5qz7qXS7wHLOY89IDq
fHt6Aud8ER5zhyOyhytcYMeaGC1g1IKWmgewnhEq02FantMJGlmmFi2eA0EPD02G
C3742QGqRxLwjWsm5/TpyuU24EYKRGCRm7QdVIo3ugFSetKrn0byOxWGBvtu4fH8
XWvZkRT+u+yzH1s5yFYBqc2JTrrJvRU=
=QnvN
-----END PGP PUBLIC KEY BLOCK-----
2 changes: 2 additions & 0 deletions salt/browser/files/repo/mozilla.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deb [signed-by=/usr/share/keyrings/mozilla.asc] https://packages.mozilla.org/apt mozilla main
# vim:ft=debsources
6 changes: 6 additions & 0 deletions salt/browser/files/repo/mozilla.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Types: deb
URIs: https://packages.mozilla.org/apt
Suites: mozilla
Components: main
Signed-by: /usr/share/keyrings/mozilla.asc
# vim:ft=debsources
21 changes: 21 additions & 0 deletions salt/browser/install-firefox-esr.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>

SPDX-License-Identifier: AGPL-3.0-or-later
#}

{% if grains['nodename'] != 'dom0' -%}

include:
- .install-common

"{{ slsdotpath }}-installed-firefox-esr":
pkg.installed:
- require:
- sls: {{ slsdotpath }}.install-common
- install_recommends: False
- skip_suggestions: True
- pkgs:
- firefox-esr

{% endif -%}
9 changes: 9 additions & 0 deletions salt/browser/install-firefox-esr.top
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>

SPDX-License-Identifier: AGPL-3.0-or-later
#}

base:
'tpl-browser':
- browser.install-firefox-esr
12 changes: 12 additions & 0 deletions salt/browser/install-firefox-repo.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>

SPDX-License-Identifier: AGPL-3.0-or-later
#}

{% if grains['nodename'] != 'dom0' -%}

{% from 'utils/macros/install-repo.sls' import install_repo -%}
{{ install_repo(sls_path, 'mozilla') }}
{% endif -%}
9 changes: 9 additions & 0 deletions salt/browser/install-firefox-repo.top
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>

SPDX-License-Identifier: AGPL-3.0-or-later
#}

base:
'tpl-browser':
- browser.install-firefox-repo
5 changes: 2 additions & 3 deletions salt/browser/install-firefox.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ SPDX-License-Identifier: AGPL-3.0-or-later
{% if grains['nodename'] != 'dom0' -%}

include:
- .install-firefox-repo
- .install-common

"{{ slsdotpath }}-installed-firefox":
pkg.installed:
- require:
- sls: {{ slsdotpath }}.install-common
- install_recommends: False
- skip_suggestions: True
- pkgs:
- firefox-esr
- firefox

{% endif -%}
2 changes: 1 addition & 1 deletion salt/browser/install-firefox.top
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>

SPDX-License-Identifier: AGPL-3.0-or-later
#}
Expand Down
2 changes: 1 addition & 1 deletion salt/utils/macros/install-repo.sls
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ If sls_path is 'browser', then this would install the repo from:
{% endif -%}
{% if salt['cmd.shell']('command -v apt-cacher-ng-repo >/dev/null') -%}
{% if salt['cmd.retcode']('command -v apt-cacher-ng-repo >/dev/null') == 0 -%}
"{{ name }}-run-apt-cacher-ng-repo":
cmd.run:
- name: apt-cacher-ng-repo
Expand Down

0 comments on commit cbf61e6

Please sign in to comment.