1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-08-02 13:07:46 +00:00

zen: try to fix it but realize it doesn't work

This commit is contained in:
RGBCube 2025-07-31 18:46:19 +03:00
parent 91f3d03ea3
commit 4aa90bb98f
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
5 changed files with 94 additions and 58 deletions

View file

@ -11,7 +11,7 @@ inputs: self: super: let
|> filter (hasAttrByPath path)
|> map (getAttrFromPath path);
inputHomeModules = collectInputs [ "homeModules" "default" ];
inputHomeModules = collectInputs [ "homeModules" "default" ];
inputModulesLinux = collectInputs [ "nixosModules" "default" ];
inputModulesDarwin = collectInputs [ "darwinModules" "default" ];

View file

@ -1,63 +1,100 @@
{ lib, ... }: let
inherit (lib) enabled merge;
inherit (lib) enabled;
lockedAs = Value: merge {
lockedAs = Value: attrs: attrs // {
inherit Value;
Locked = true;
};
locked = merge { Locked = true; };
locked = attrs: attrs // { Locked = true; };
policies = {
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
DisableAppUpdate = true;
AppAutoUpdate = false;
BackgroundAppUpdate = false;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DisableProfileImport = true;
DisableProfileRefresh = true;
BlockAboutConfig = false;
BlockAboutProfiles = true;
BlockAboutSupport = true;
# We want it to be the default browser.
DontCheckDefaultBrowser = false;
NoDefaultBookmarks = true;
# I accept the terms of use.
SkipTermsOfUse = true;
PictureInPicture = lockedAs false {};
Homepage = locked { StartPage = "previous-session"; };
EnableTrackingProtection = lockedAs true {
Cryptomining = true;
EmailTracking = true;
Fingerprinting = true;
};
UserMessaging = locked {
ExtensionRecommendations = false;
FeatureRecommendations = false;
FirefoxLabs = false;
MoreFromMozilla = false;
SkipOnboarding = true;
};
FirefoxSuggest = locked {
ImproveSuggest = false;
SponsoredSuggestions = false;
WebSuggestions = false;
};
SearchEngines = {
Default = "Kagi";
PreventInstalls = true;
Remove = [
"Google"
"Bing"
"DuckDuckGo"
"Wikipedia (en)"
];
Add = [
{ Name = "Kagi"; Alias = "kk"; Method = "GET"; URLTemplate = "https://kagi.com/search?q={searchTerms}"; SuggestURLTemplate = "https://kagi.com/api/autosuggest?q={searchTerms}"; }
{ Name = "Google"; Alias = "gg"; Method = "GET"; URLTemplate = "https://google.com/search?q={searchTerms}"; SuggestURLTemplate = "https://google.com/complete/search?client=firefox&q={searchTerms}"; }
{ Name = "Yandex"; Alias = "yy"; Method = "GET"; URLTemplate = "https://yandex.com/search?text={searchTerms}"; SuggestURLTemplate = "https://suggest.yandex.com/suggest-ff.cgi?part={searchTerms}"; }
{ Name = "Wikipedia"; Alias = "ww"; Method = "GET"; URLTemplate = "https://en.wikipedia.org/w/index.php?title=Special:Search&search={searchTerms}"; }
{ Name = "YouTube"; Alias = "yt"; Method = "GET"; URLTemplate = "https://youtube.com/results?search_query={searchTerms}"; }
{ Name = "Sourcegraph"; Alias = "sg"; Method = "GET"; URLTemplate = "https://sourcegraph.com/search?q=context:global+{searchTerms}"; }
{ Name = "GitHub"; Alias = "gh"; Method = "GET"; URLTemplate = "https://github.com/search?type=repositories&q={searchTerms}"; }
{ Name = "Lib.rs"; Alias = "rs"; Method = "GET"; URLTemplate = "https://lib.rs/search?q={searchTerms}"; }
{ Name = "Seachix"; Alias = "sx"; Method = "GET"; URLTemplate = "https://searchix.ovh/?query={searchTerms}"; }
{ Name = "NixOS Packages"; Alias = "np"; Method = "GET"; URLTemplate = "https://search.nixos.org/packages?channel=unstable&sort=relevance&type=packages&query={searchTerms}"; }
{ Name = "NixOS Options"; Alias = "no"; Method = "GET"; URLTemplate = "https://search.nixos.org/options?channel=unstable&sort=relevance&type=options&query={searchTerms}"; }
{ Name = "Home Manager Options"; Alias = "ho"; Method = "GET"; URLTemplate = "https://home-manager-options.extranix.com/?release=master&query={searchTerms}"; }
{ Name = "Nix Darwin Options"; Alias = "do"; Method = "GET"; URLTemplate = "https://options.nix-darwin.uz/?release=master&query={searchTerms}"; }
];
};
};
in {
home-manager.sharedModules = [{
programs.zen-browser = enabled {
# package = mkIf config.isDarwin null;
policies = {
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
# We want Zen to be the default browser.
DontCheckDefaultBrowser = false;
NoDefaultBookmarks = true;
# I accept the terms of use.
SkipTermsOfUse = true;
PictureInPicture = lockedAs false;
Homepage.StartPage = "previous-session";
EnableTrackingProtection = lockedAs true {
Cryptomining = true;
EmailTracking = true;
Fingerprinting = true;
};
UserMessaging = locked {
ExtensionRecommendations = false;
FeatureRecommendations = false;
FirefoxLabs = false;
MoreFromMozilla = false;
SkipOnboarding = true;
};
FirefoxSuggest = locked {
ImproveSuggest = false;
SponsoredSuggestions = false;
WebSuggestions = false;
};
};
# policies.Preferences = {
# };
inherit policies;
};
}];
}

View file

@ -139,7 +139,7 @@ in merge <| mkIf config.isDesktop {
"SUPER+SHIFT, RETURN, exec, kitty"
"SUPER , RETURN, exec, ghostty --gtk-single-instance=true"
"SUPER , W , exec, zen-beta"
"SUPER , W , exec, zen"
"SUPER , D , exec, discord"
"SUPER , Z , exec, zulip"
"SUPER , M , exec, thunderbird"

View file

@ -35,9 +35,9 @@ in merge <| mkIf config.isDesktop {
"hyprland/window" = {
separate-outputs = true;
rewrite."(.*) - Discord" = "󰙯$1";
rewrite."(.*) - Discord" = "󰙯$1";
rewrite."(.*) Zen" = "󰖟$1";
rewrite."(.*) nu" = "$1";
rewrite."(.*) nu" = "$1";
};
modules-right = [ "tray" "pulseaudio" "backlight" "cpu" "memory" "network" "battery" "clock" ];

View file

@ -55,9 +55,8 @@ def main --wrapped [
] | append ($args_split | get 0 | where { $in != "" })
let nix_flags = [
"--option" "accept-flake-config" "true"
# "--option" "eval-cache" "false"
"--option" "extra-experimental-features" "pipe-operators"
"--accept-flake-config"
"--extra-experimental-features" "pipe-operators"
] | append ($args_split | get --ignore-errors 1 | default [])
if (uname | get kernel-name) == "Darwin" {