From 60e9ddc5971351f8f1318f1ebafb0b28bd477bf5 Mon Sep 17 00:00:00 2001 From: eckynde Date: Sun, 29 Mar 2026 03:49:04 +0200 Subject: [PATCH 1/3] Pre configure firefox --- states/firefox/files/policies.json | 121 +++++++++++++++++++++++++++++ states/firefox/init.sls | 4 + states/top.sls | 1 + 3 files changed, 126 insertions(+) create mode 100644 states/firefox/files/policies.json create mode 100644 states/firefox/init.sls diff --git a/states/firefox/files/policies.json b/states/firefox/files/policies.json new file mode 100644 index 0000000..4b114d1 --- /dev/null +++ b/states/firefox/files/policies.json @@ -0,0 +1,121 @@ +{ + "policies": { + "Bookmarks": [ + { + "Placement": "toolbar", + "Title": "Website", + "URL": "https://chaostreff-osnabrueck.de" + }, + { + "Placement": "toolbar", + "Title": "Status", + "URL": "https://status.chaostreff-osnabrueck.de" + }, + { + "Placement": "toolbar", + "Title": "Wiki", + "URL": "https://wiki.chaostreff-osnabrueck.de" + }, + { + "Placement": "toolbar", + "Title": "GitHub", + "URL": "https://github.com/CTreffOS/" + }, + { + "Placement": "toolbar", + "Title": "Jitsi Meet", + "URL": "https://meet.osna.social/" + }, + { + "Placement": "toolbar", + "Title": "Mastodon", + "URL": "https://osna.social" + } + ], + "DisableAccounts": true, + "DisableFirefoxStudies": true, + "DisableProfileImport": true, + "DisableTelemetry": true, + "DisplayBookmarksToolbar": "always", + "DontCheckDefaultBrowser": true, + "ExtensionSettings": { + "uBlock0@raymondhill.net": { + "default_area": "navbar", + "install_url": "https://addons.mozilla.org/firefox/downloads/file/4721638/ublock_origin-1.70.0.xpi", + "installation_mode": "normal_installed", + "private_browsing": true, + "updates_disabled": false + } + }, + "FirefoxHome": { + "Highlights": false, + "Pocket": false, + "Search": true, + "SponsoredPocket": false, + "SponsoredTopSites": false, + "TopSites": false + }, + "FirefoxSuggest": { + "ImproveSuggest": false, + "SponsoredSuggestions": false + }, + "GenerativeAI": { + "Chatbot": false, + "Enabled": false, + "LinkPreviews": false, + "TabGroups": false + }, + "HttpAllowlist": [ + "http://localhost" + ], + "NoDefaultBookmarks": true, + "OverrideFirstRunPage": "", + "OverridePostUpdatePage": "", + "PDFjs": { + "EnablePermissions": false + }, + "Permissions": { + "Autoplay": { + "Allow": [ + "https://www.youtube.com" + ] + }, + "Camera": { + "Allow": [ + "https://meet.osna.social" + ] + }, + "Location": { + "BlockNewRequests": true + }, + "Microphone": { + "Allow": [ + "https://meet.osna.social" + ] + }, + "ScreenShare": { + "Allow": [ + "https://meet.osna.social" + ] + } + }, + "Preferences": { + "pdfjs.ignoreDestinationZoom": { + "Status": "user", + "Type": "boolean", + "Value": true + } + }, + "SkipTermsOfUse": true, + "SupportMenu": { + "AccessKey": "c", + "Title": "Über Chaostreff Osnabrück e.V.", + "URL": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" + }, + "UserMessaging": { + "FirefoxLabs": false, + "MoreFromMozilla": false, + "SkipOnboarding": true + } + } +} \ No newline at end of file diff --git a/states/firefox/init.sls b/states/firefox/init.sls new file mode 100644 index 0000000..66fbdca --- /dev/null +++ b/states/firefox/init.sls @@ -0,0 +1,4 @@ +/etc/firefox/policies/policies.json: + file.managed: + - source: salt://firefox/files/policies.json + - mode: "0444" diff --git a/states/top.sls b/states/top.sls index 40e279b..cbb3cee 100644 --- a/states/top.sls +++ b/states/top.sls @@ -26,3 +26,4 @@ base: - network_manager - vscodium - workshops.pixelflut2024 + - firefox From 787d65403e18448d8a8cf7c84ea34fd38c98c4e1 Mon Sep 17 00:00:00 2001 From: eckynde Date: Sun, 29 Mar 2026 04:25:09 +0200 Subject: [PATCH 2/3] Do not hardcode versoin --- states/firefox/files/policies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/states/firefox/files/policies.json b/states/firefox/files/policies.json index 4b114d1..9bc3cdb 100644 --- a/states/firefox/files/policies.json +++ b/states/firefox/files/policies.json @@ -41,7 +41,7 @@ "ExtensionSettings": { "uBlock0@raymondhill.net": { "default_area": "navbar", - "install_url": "https://addons.mozilla.org/firefox/downloads/file/4721638/ublock_origin-1.70.0.xpi", + "install_url": "https://addons.mozilla.org/firefox/downloads/file/4721638/ublock_origin-latest.xpi", "installation_mode": "normal_installed", "private_browsing": true, "updates_disabled": false From c406d07f16941e5415b0f52010fe084d04792a1a Mon Sep 17 00:00:00 2001 From: eckynde Date: Sun, 29 Mar 2026 04:40:46 +0200 Subject: [PATCH 3/3] Add prerequisites --- states/firefox/init.sls | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/states/firefox/init.sls b/states/firefox/init.sls index 66fbdca..1d1bdcd 100644 --- a/states/firefox/init.sls +++ b/states/firefox/init.sls @@ -1,4 +1,17 @@ +firefox-esr: + pkg.installed: [] + +/etc/firefox: + file.directory: [] + +/etc/firefox/policies: + file.directory: + - require: + - file: /etc/firefox + /etc/firefox/policies/policies.json: file.managed: - source: salt://firefox/files/policies.json - mode: "0444" + - require: + - file: /etc/firefox/policies