1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-08-03 21:47:46 +00:00

zen-browser: init

This commit is contained in:
RGBCube 2025-07-31 17:53:16 +03:00
parent d84249b3f2
commit 48fedaa89f
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
6 changed files with 109 additions and 5 deletions

26
flake.lock generated
View file

@ -525,7 +525,8 @@
"nix-homebrew": "nix-homebrew", "nix-homebrew": "nix-homebrew",
"nixos-mailserver": "nixos-mailserver", "nixos-mailserver": "nixos-mailserver",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_4",
"themes": "themes" "themes": "themes",
"zen-browser": "zen-browser"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
@ -604,6 +605,29 @@
"repo": "ThemeNix", "repo": "ThemeNix",
"type": "github" "type": "github"
} }
},
"zen-browser": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1753933355,
"narHash": "sha256-4QxMcKS6oc+cG8efwwAin4M+YOokBak1dVS8u5P3b5M=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "fa795a139a8c92b140bc21f11f61da1c97ad5b1d",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -62,6 +62,13 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
agenix = { agenix = {
url = "github:ryantm/agenix"; url = "github:ryantm/agenix";
@ -118,7 +125,7 @@
|> map ({ name, value }: nameValuePair name value.config) |> map ({ name, value }: nameValuePair name value.config)
|> listToAttrs; |> listToAttrs;
in hostsByType // hostConfigs // { in hostsByType // hostConfigs // {
inherit lib; inherit inputs lib;
herculesCI = { ... }: { herculesCI = { ... }: {
ciSystems = [ "aarch64-linux" "x86_64-linux" ]; ciSystems = [ "aarch64-linux" "x86_64-linux" ];

View file

@ -11,6 +11,7 @@ inputs: self: super: let
|> filter (hasAttrByPath path) |> filter (hasAttrByPath path)
|> map (getAttrFromPath path); |> map (getAttrFromPath path);
inputHomeModules = collectInputs [ "homeModules" "default" ];
inputModulesLinux = collectInputs [ "nixosModules" "default" ]; inputModulesLinux = collectInputs [ "nixosModules" "default" ];
inputModulesDarwin = collectInputs [ "darwinModules" "default" ]; inputModulesDarwin = collectInputs [ "darwinModules" "default" ];
@ -30,6 +31,10 @@ in {
modules = [ modules = [
module module
overlayModule overlayModule
{
home-manager.sharedModules = inputHomeModules;
}
] ++ modulesCommon ] ++ modulesCommon
++ modulesLinux ++ modulesLinux
++ inputModulesLinux; ++ inputModulesLinux;
@ -41,6 +46,10 @@ in {
modules = [ modules = [
module module
overlayModule overlayModule
{
home-manager.sharedModules = inputHomeModules;
}
] ++ modulesCommon ] ++ modulesCommon
++ modulesDarwin ++ modulesDarwin
++ inputModulesDarwin; ++ inputModulesDarwin;

View file

@ -0,0 +1,63 @@
{ lib, ... }: let
inherit (lib) enabled merge;
lockedAs = Value: merge {
inherit Value;
Locked = true;
};
locked = merge { Locked = true; };
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 = {
# };
};
}];
}

View file

@ -1,4 +1,4 @@
{ { config, ... }: {
system.defaults.dock = { system.defaults.dock = {
autohide = true; autohide = true;
showhidden = true; # Translucent. showhidden = true; # Translucent.
@ -14,7 +14,8 @@
enable-spring-load-actions-on-all-items = true; enable-spring-load-actions-on-all-items = true;
persistent-apps = [ persistent-apps = [
{ app = "/Applications/Zen.app"; } { app = "${config.home-manager.users.${config.system.primaryUser}
.programs.zen-browser.package}/Applications/Zen Browser (Beta).app"; }
{ app = "/Applications/Ghostty.app"; } { app = "/Applications/Ghostty.app"; }
]; ];
}; };

View file

@ -225,7 +225,7 @@ in {
hs.hotkey.bind(super, "f", PaperWM.actions.toggle_floating) hs.hotkey.bind(super, "f", PaperWM.actions.toggle_floating)
-- APPLICATIONS -- APPLICATIONS
hs.hotkey.bind(super, "w", function() hs.application.launchOrFocus("Zen") end) hs.hotkey.bind(super, "w", function() hs.application.launchOrFocus("Zen Browser (Beta)") end)
hs.hotkey.bind(super, "return", function() hs.application.launchOrFocus("Ghostty") end) hs.hotkey.bind(super, "return", function() hs.application.launchOrFocus("Ghostty") end)
hs.hotkey.bind(super, "t", function() hs.application.launchOrFocus("Finder") end) hs.hotkey.bind(super, "t", function() hs.application.launchOrFocus("Finder") end)