This commit is contained in:
muon 2025-10-19 17:41:52 +00:00
parent 01c2d74965
commit 7722a877e6
6 changed files with 315 additions and 23 deletions

View file

@ -3,6 +3,8 @@
lib,
config,
osConfig,
system,
inputs,
...
}: let
color = config.lib.stylix.colors.withHashtag;
@ -11,6 +13,12 @@ in
options.mods.desktop.productivity.enable =
lib.mkEnableOption "enables gui productivity tools";
imports = [
inputs.zen-browser.homeModules.beta
# or inputs.zen-browser.homeModules.twilight
# or inputs.zen-browser.homeModules.twilight-official
];
config = lib.mkIf config.mods.desktop.productivity.enable {
home.packages = with pkgs; [
# ISO downloader
@ -23,8 +31,7 @@ in
thunderbird
# webgl
chromium
mullvad-browser
# mullvad-browser
# password manager
bitwarden-desktop
@ -34,7 +41,7 @@ in
libsForQt5.qt5ct
# documents
texliveFull
# texliveFull
# texstudio
# 3D
@ -79,8 +86,237 @@ in
};
};
# programs.qutebrowser = {
# enable = true;
# };
stylix.targets.zen-browser.profileNames = [];
programs.zen-browser = {
enable = true;
policies = let
mkLockedAttrs = builtins.mapAttrs (_: value: {
Value = value;
Status = "locked";
});
mkPluginUrl = id: "https://addons.mozilla.org/firefox/downloads/latest/${id}/latest.xpi";
mkExtensionEntry = {
id,
pinned ? false,
}: let
base = {
install_url = mkPluginUrl id;
installation_mode = "force_installed";
};
in
if pinned
then base // {default_area = "navbar";}
else base;
mkExtensionSettings = builtins.mapAttrs (_: entry:
if builtins.isAttrs entry
then entry
else mkExtensionEntry {id = entry;});
in {
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DontCheckDefaultBrowser = true;
OfferToSaveLogins = false;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
ExtensionSettings = mkExtensionSettings {
"uBlock0@raymondhill.net" = mkExtensionEntry {
id = "ublock-origin";
pinned = true;
};
"{85860b32-02a8-431a-b2b1-40fbd64c9c69}" = "github-file-icons";
"{74145f27-f039-47ce-a470-a662b129930a}" = "clearurls";
"github-no-more@ihatereality.space" = "github-no-more";
"github-repository-size@pranavmangal" = "gh-repo-size";
"@searchengineadremover" = "searchengineadremover";
"jid1-BoFifL9Vbdl2zQ@jetpack" = "decentraleyes";
"{d7742d87-e61d-4b78-b8a1-b469842139fa}" = "vimium-ff";
};
Preferences = mkLockedAttrs {
"browser.aboutConfig.showWarning" = false;
"browser.tabs.warnOnClose" = false;
"media.videocontrols.picture-in-picture.video-toggle.enabled" = true;
# Disable swipe gestures (Browser:BackOrBackDuplicate, Browser:ForwardOrForwardDuplicate)
"browser.gesture.swipe.left" = "";
"browser.gesture.swipe.right" = "";
"browser.tabs.hoverPreview.enabled" = true;
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.topsites.contile.enabled" = false;
"privacy.resistFingerprinting" = true;
"privacy.firstparty.isolate" = true;
"network.cookie.cookieBehavior" = 5;
"dom.battery.enabled" = false;
"gfx.webrender.all" = true;
"network.http.http3.enabled" = true;
};
};
profiles.default = rec {
settings = {
"zen.workspaces.continue-where-left-off" = true;
"zen.workspaces.natural-scroll" = true;
"zen.view.compact.hide-tabbar" = true;
"zen.view.compact.hide-toolbar" = true;
"zen.view.compact.animate-sidebar" = false;
"zen.welcome-screen.seen" = true;
};
bookmarks = {
force = true;
settings = [
{
name = "Nix sites";
toolbar = true;
bookmarks = [
{
name = "homepage";
url = "https://nixos.org/";
}
{
name = "wiki";
tags = ["wiki" "nix"];
url = "https://wiki.nixos.org/";
}
];
}
];
};
pinsForce = true;
pins = {
"GitHub" = {
id = "48e8a119-5a14-4826-9545-91c8e8dd3bf6";
workspace = spaces."Work".id;
url = "https://github.com";
position = 101;
isEssential = false;
};
};
containersForce = true;
containers = {
Work = {
color = "blue";
icon = "briefcase";
id = 2;
};
};
spacesForce = true;
spaces = {
"Personal" = {
id = "572910e1-4468-4832-a869-0b3a93e2f165";
# icon = "";
position = 1000;
};
"Work" = {
id = "ec287d7f-d910-4860-b400-513f269dee77";
# icon = "briefcase";
position = 1001;
container = containers."Work".id;
};
};
search = {
force = true;
default = "searx";
engines = let
nixSnowflakeIcon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
in {
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = nixSnowflakeIcon;
definedAliases = ["np"];
};
"Nix Options" = {
urls = [
{
template = "https://search.nixos.org/options";
params = [
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = nixSnowflakeIcon;
definedAliases = ["nop"];
};
"Home Manager Options" = {
urls = [
{
template = "https://home-manager-options.extranix.com/";
params = [
{
name = "query";
value = "{searchTerms}";
}
{
name = "release";
value = "master"; # unstable
}
];
}
];
icon = nixSnowflakeIcon;
definedAliases = ["hm"];
};
"searx" = {
urls = [
{
template = "https://search.muon.host/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
icon = "magnifying-glass";
definedAliases = ["srx"];
};
bing.metaData.hidden = "true";
};
};
};
};
};
}