diff --git a/flake.lock b/flake.lock index efce862..167bba0 100644 --- a/flake.lock +++ b/flake.lock @@ -243,6 +243,27 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "zen-browser", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1752603129, + "narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "impermanence": { "locked": { "lastModified": 1737831083, @@ -457,7 +478,8 @@ "nvf": "nvf", "sops-nix": "sops-nix", "stylix": "stylix", - "valheim-server": "valheim-server" + "valheim-server": "valheim-server", + "zen-browser": "zen-browser" } }, "sops-nix": { @@ -679,6 +701,27 @@ "repo": "valheim-server-flake", "type": "github" } + }, + "zen-browser": { + "inputs": { + "home-manager": "home-manager_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1760843785, + "narHash": "sha256-lp6xctqGBNKZ3pmRlALX1puVG7EKQa4xAq+2leThDKw=", + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "rev": "a36f9da8a234b59dd5fc4484e37dadae2aa75b80", + "type": "github" + }, + "original": { + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c0b5a1e..24547ee 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + zen-browser = { + url = "github:0xc000022070/zen-browser-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nix-minecraft.url = "git+https://codeberg.org/nix-astral/nix-minecraft.git"; # nix-minecraft.url = "github:Infinidoge/nix-minecraft"; valheim-server.url = "github:kmjayadeep/valheim-server-flake"; diff --git a/hosts/muon/configuration.nix b/hosts/muon/configuration.nix index e26d427..e670a63 100644 --- a/hosts/muon/configuration.nix +++ b/hosts/muon/configuration.nix @@ -12,15 +12,18 @@ in { # Hardware imports = [./hardware-configuration.nix ./openrgb.nix]; - environment.systemPackages = with inputs.nix-alien.packages.${system}; [ + environment.systemPackages = with inputs.nix-alien.packages.${system}; + with pkgs; [ nix-alien - pkgs.r2modman - pkgs.lutris - pkgs.godot - pkgs.rustdesk-flutter - pkgs.motion - pkgs.qmk - pkgs.gnumeric + r2modman + lutris + godot + rustdesk-flutter + motion + qmk + gnumeric + opensnitch + opensnitch-ui ]; # System diff --git a/modules/home/desktop/development.nix b/modules/home/desktop/development.nix index cfa91fc..f3d4373 100644 --- a/modules/home/desktop/development.nix +++ b/modules/home/desktop/development.nix @@ -11,7 +11,7 @@ # home.packages = with pkgs; [ i3-swallow ]; programs.nyxt = { - enable = true; + enable = false; config = '' (in-package #:nyxt-user) diff --git a/modules/home/desktop/productivity.nix b/modules/home/desktop/productivity.nix index 08ccaed..e23e21a 100644 --- a/modules/home/desktop/productivity.nix +++ b/modules/home/desktop/productivity.nix @@ -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"; + }; + }; + }; + }; }; } diff --git a/modules/home/xdg.nix b/modules/home/xdg.nix index f0395cb..3215032 100644 --- a/modules/home/xdg.nix +++ b/modules/home/xdg.nix @@ -1,9 +1,14 @@ -{ pkgs, lib, config, ... }: { +{ + pkgs, + lib, + config, + ... +}: { options.mods.xdg.enable = lib.mkEnableOption "enables xdg settings"; config = lib.mkIf config.mods.xdg.enable { xdg = let - browser = [ "librewolf.desktop" ]; + browser = ["qutebrowser.desktop"]; associations = { "text/html" = browser; "x-scheme-handler/http" = browser; @@ -18,13 +23,13 @@ "application/x-extension-xhtml" = browser; "application/x-extension-xht" = browser; - "audio/*" = [ "mpv.desktop" ]; - "video/*" = [ "mpv.dekstop" ]; - "image/*" = [ "imv.desktop" ]; + "audio/*" = ["mpv.desktop"]; + "video/*" = ["mpv.dekstop"]; + "image/*" = ["imv.desktop"]; "application/json" = browser; # "application/pdf" = ["org.pwmt.zathura.desktop.desktop"]; - "x-scheme-handler/tg" = [ "kotatogram-desktop.desktop" ]; - "x-scheme-handler/discord" = [ "vesktop.desktop" ]; + "x-scheme-handler/tg" = ["kotatogram-desktop.desktop"]; + "x-scheme-handler/discord" = ["vesktop.desktop"]; }; in { enable = true;