mirror of
https://codeberg.org/muon/home.git
synced 2026-03-08 03:25:16 +00:00
Extract zen
This commit is contained in:
parent
74900b3734
commit
9821ddee7b
4 changed files with 264 additions and 241 deletions
|
|
@ -20,6 +20,7 @@ in {
|
||||||
mods.terminal.tools.enable = true;
|
mods.terminal.tools.enable = true;
|
||||||
mods.desktop.development.enable = true;
|
mods.desktop.development.enable = true;
|
||||||
mods.desktop.productivity.enable = false;
|
mods.desktop.productivity.enable = false;
|
||||||
|
mods.zen.enable = true;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
pulseaudio
|
pulseaudio
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
{ pkgs, lib, osConfig, ... }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
lib,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
cfg = osConfig.mods.desktop;
|
cfg = osConfig.mods.desktop;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -9,6 +13,7 @@ in {
|
||||||
./development.nix
|
./development.nix
|
||||||
./productivity.nix
|
./productivity.nix
|
||||||
./media.nix
|
./media.nix
|
||||||
|
./zen.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
mods.hyprland.enable = lib.mkIf cfg.wayland.enable true;
|
mods.hyprland.enable = lib.mkIf cfg.wayland.enable true;
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,6 @@ in
|
||||||
options.mods.desktop.productivity.enable =
|
options.mods.desktop.productivity.enable =
|
||||||
lib.mkEnableOption "enables gui productivity tools";
|
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 {
|
config = lib.mkIf config.mods.desktop.productivity.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# ISO downloader
|
# ISO downloader
|
||||||
|
|
@ -85,238 +79,5 @@ in
|
||||||
exec = "${pkgs.mullvad-browser}/bin/mullvad-browser -p i2p";
|
exec = "${pkgs.mullvad-browser}/bin/mullvad-browser -p i2p";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
256
modules/home/desktop/zen.nix
Normal file
256
modules/home/desktop/zen.nix
Normal file
|
|
@ -0,0 +1,256 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
osConfig,
|
||||||
|
system,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
color = config.lib.stylix.colors.withHashtag;
|
||||||
|
in
|
||||||
|
with lib; {
|
||||||
|
options.mods.zen.enable =
|
||||||
|
lib.mkEnableOption "enables zen browser";
|
||||||
|
|
||||||
|
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 {
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue