refactor: use a function to reduce repitition in zen configuration
This commit is contained in:
@@ -58,6 +58,13 @@ let
|
|||||||
userChromeText = replaceWithStylixColours "${catppuccinUserChrome}/themes/Mocha/Mauve/userChrome.css";
|
userChromeText = replaceWithStylixColours "${catppuccinUserChrome}/themes/Mocha/Mauve/userChrome.css";
|
||||||
userContentText = replaceWithStylixColours "${catppuccinUserChrome}/themes/Mocha/Mauve/userContent.css";
|
userContentText = replaceWithStylixColours "${catppuccinUserChrome}/themes/Mocha/Mauve/userContent.css";
|
||||||
|
|
||||||
|
installExtension = name: {
|
||||||
|
inherit name;
|
||||||
|
value = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.file.".zen/default/chrome/userChrome.css".text = userChromeText;
|
home.file.".zen/default/chrome/userChrome.css".text = userChromeText;
|
||||||
@@ -81,49 +88,29 @@ in
|
|||||||
OverridePostUpdatePage = "";
|
OverridePostUpdatePage = "";
|
||||||
DontCheckDefaultBrowser = true;
|
DontCheckDefaultBrowser = true;
|
||||||
DisplayBookmarksToolbar = "never";
|
DisplayBookmarksToolbar = "never";
|
||||||
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
|
DisplayMenuBar = "default-off";
|
||||||
SearchBar = "unified"; # alternative: "separate"
|
SearchBar = "unified";
|
||||||
ExtensionSettings = {
|
ExtensionSettings = builtins.listToAttrs (
|
||||||
# uBlock Origin:
|
builtins.map (name: installExtension name) [
|
||||||
"uBlock0@raymondhill.net" = {
|
# uBlock Origin:
|
||||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
"uBlock0@raymondhill.net"
|
||||||
installation_mode = "force_installed";
|
|
||||||
};
|
|
||||||
|
|
||||||
"sponsorBlocker@ajay.app" = {
|
# SponsorBlocker
|
||||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorBlocker@ajay.app/latest.xpi";
|
"sponsorBlocker@ajay.app"
|
||||||
installation_mode = "force_installed";
|
|
||||||
};
|
|
||||||
|
|
||||||
# "languagetool-webextension@languagetool.org" = {
|
# Return dislikes to YouTube
|
||||||
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/languagetool-webextension@languagetool.org/latest.xpi";
|
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}"
|
||||||
# installation_mode = "force_installed";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Return dislikes to YouTube
|
# Catppuccin Mocha Mauve
|
||||||
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = {
|
"{76aabc99-c1a8-4c1e-832b-d4f2941d5a7a}"
|
||||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/{762f9885-5a13-4abd-9c77-433dcd38b8fd}/latest.xpi";
|
|
||||||
installation_mode = "force_installed";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Catppuccin Mocha Mauve
|
# Dark Reader
|
||||||
"{76aabc99-c1a8-4c1e-832b-d4f2941d5a7a}" = {
|
"addon@darkreader.org"
|
||||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/catppuccin-mocha-mauve-git/latest.xpi";
|
|
||||||
installation_mode = "force_installed";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Vimium C
|
# BitWarden
|
||||||
# "vimium-c@gdh1995.cn" = {
|
"{446900e4-71c2-419f-a6a7-df9c091e268b}"
|
||||||
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/vimium-c@gdh1995.cn/latest.xpi";
|
]
|
||||||
# installation_mode = "force_installed";
|
);
|
||||||
# };
|
|
||||||
|
|
||||||
# Dark Reader
|
|
||||||
"addon@darkreader.org" = {
|
|
||||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/addon@darkreader.org/latest.xpi";
|
|
||||||
installation_mode = "force_installed";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
profiles.default = {
|
profiles.default = {
|
||||||
|
|||||||
Reference in New Issue
Block a user