1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-08-03 05:27: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

@ -1,28 +1,33 @@
{ lib, ... }: let { lib, ... }: let
inherit (lib) enabled merge; inherit (lib) enabled;
lockedAs = Value: merge { lockedAs = Value: attrs: attrs // {
inherit Value; inherit Value;
Locked = true; Locked = true;
}; };
locked = merge { Locked = true; }; locked = attrs: attrs // { Locked = true; };
in {
home-manager.sharedModules = [{
programs.zen-browser = enabled {
# package = mkIf config.isDarwin null;
policies = { policies = {
AutofillAddressEnabled = false; AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false; AutofillCreditCardEnabled = false;
DisableAppUpdate = true; DisableAppUpdate = true;
AppAutoUpdate = false;
BackgroundAppUpdate = false;
DisableFeedbackCommands = true; DisableFeedbackCommands = true;
DisableFirefoxStudies = true; DisableFirefoxStudies = true;
DisablePocket = true; DisablePocket = true;
DisableTelemetry = true; DisableTelemetry = true;
DisableProfileImport = true;
DisableProfileRefresh = true;
# We want Zen to be the default browser. BlockAboutConfig = false;
BlockAboutProfiles = true;
BlockAboutSupport = true;
# We want it to be the default browser.
DontCheckDefaultBrowser = false; DontCheckDefaultBrowser = false;
NoDefaultBookmarks = true; NoDefaultBookmarks = true;
@ -30,9 +35,9 @@ in {
# I accept the terms of use. # I accept the terms of use.
SkipTermsOfUse = true; SkipTermsOfUse = true;
PictureInPicture = lockedAs false; PictureInPicture = lockedAs false {};
Homepage.StartPage = "previous-session"; Homepage = locked { StartPage = "previous-session"; };
EnableTrackingProtection = lockedAs true { EnableTrackingProtection = lockedAs true {
Cryptomining = true; Cryptomining = true;
@ -53,11 +58,43 @@ in {
SponsoredSuggestions = false; SponsoredSuggestions = false;
WebSuggestions = 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}"; }
];
}; };
};
# policies.Preferences = { in {
home-manager.sharedModules = [{
# }; programs.zen-browser = enabled {
inherit policies;
}; };
}]; }];
} }

View file

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

View file

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