feat(browser): move to zen

This commit is contained in:
2025-06-02 16:35:53 +08:00
parent 2d85716642
commit 2fdf5aa8fe
8 changed files with 88 additions and 12 deletions

View File

@@ -107,7 +107,7 @@
enable = true;
defaultApplications =
let
browser = [ "chromium-browser.desktop" ];
browser = [ "zen-beta.desktop" ];
editor = [ "codium.desktop" ];
imageviewer = [ "org.gnome.Shotwell-Viewer.desktop" ];
in
@@ -193,7 +193,6 @@
".config/dconf"
".config/gh"
".config/pulse"
".config/chromium"
".config/go-musicfox/db"
".config/tmux/plugins"
".config/pip"

45
flake.lock generated
View File

@@ -557,6 +557,27 @@
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"zen",
"nixpkgs"
]
},
"locked": {
"lastModified": 1743604125,
"narHash": "sha256-ZD61DNbsBt1mQbinAaaEqKaJk2RFo9R/j+eYWeGMx7A=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "180fd43eea296e62ae68e079fcf56aba268b9a1a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1737831083,
@@ -1006,7 +1027,8 @@
"omz": "omz",
"quickshell": "quickshell",
"sops-nix": "sops-nix",
"stylix": "stylix"
"stylix": "stylix",
"zen": "zen"
}
},
"rust-analyzer-src": {
@@ -1284,6 +1306,27 @@
"repo": "xwayland-satellite",
"type": "github"
}
},
"zen": {
"inputs": {
"home-manager": "home-manager_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1748749284,
"narHash": "sha256-g5+9fY/6tDj7tUiRXuQJRPA/AB/aKguxN2B+nMGQh4A=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "ad1b6dcc9916993179a287fc06c3dc32c995a24f",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
}
},
"root": "root",

View File

@@ -23,10 +23,6 @@
# NUR
nur.url = "github:nix-community/NUR";
# NeoVim nightly
# neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
# neovim-nightly.inputs.nixpkgs.follows = "nixpkgs";
# OMZ
omz.url = "github:imxyy1soope1/omz/master";
omz.inputs.nixpkgs.follows = "nixpkgs";
@@ -56,6 +52,9 @@
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
zen.url = "github:0xc000022070/zen-browser-flake";
zen.inputs.nixpkgs.follows = "nixpkgs";
infuse.url = "git+https://codeberg.org/amjoseph/infuse.nix";
infuse.flake = false;
};
@@ -145,6 +144,7 @@
inputs.sops-nix.homeManagerModules.sops
inputs.impermanence.nixosModules.home-manager.impermanence
inputs.stylix.homeModules.stylix
inputs.zen.homeModules.beta
# workaround for annoying stylix
(
{ lib, ... }:

View File

@@ -12,6 +12,7 @@ lib.my.makeSwitch {
firefox.enable = true;
librewolf.enable = true;
chromium.enable = true;
zen.enable = true;
};
};
}

View File

@@ -50,5 +50,8 @@ lib.my.makeHomeProgramConfig {
"--wayland-text-input-version=3"
];
};
my.persist.homeDirs = [
".config/chromium"
];
};
}

View File

@@ -4,5 +4,6 @@
./firefox.nix
./librewolf.nix
./chromium.nix
./zen.nix
];
}

View File

@@ -0,0 +1,29 @@
{
config,
lib,
pkgs,
...
}:
lib.my.makeHomeProgramConfig {
inherit config;
programName = "zen-browser";
optionPath = [
"desktop"
"browser"
"zen"
];
extraConfig = {
my.home.programs.zen-browser = {
enable = true;
nativeMessagingHosts = [ pkgs.firefoxpwa ];
policies = {
# find more options here: https://mozilla.github.io/policy-templates/
DisableAppUpdate = true;
DisableTelemetry = true;
};
};
my.persist.homeDirs = [
".zen"
];
};
}

View File

@@ -66,7 +66,7 @@
draw-border-with-background = false;
}
{
matches = [ { app-id = "kitty|foot|Alacritty|ghostty|chromium-browser|wofi"; } ];
matches = [ { app-id = "kitty|foot|Alacritty|ghostty|chromium-browser|zen-beta|wofi"; } ];
opacity = 0.8;
}
{
@@ -125,7 +125,7 @@
"kitty"
"-1"
];
"Mod+G".action.spawn = [ "chromium" ];
"Mod+G".action.spawn = [ "zen-beta" ];
"Mod+E".action.spawn = [ "nemo" ];
"Mod+R".action.spawn = [
"sh"
@@ -159,7 +159,7 @@
action.spawn = [
"playerctl"
"-i"
"firefox,chromium"
"firefox,chromium,zen"
"play-pause"
];
};
@@ -168,7 +168,7 @@
action.spawn = [
"playerctl"
"-i"
"firefox,chromium"
"firefox,chromium,zen"
"next"
];
};
@@ -177,7 +177,7 @@
action.spawn = [
"playerctl"
"-i"
"firefox,chromium"
"firefox,chromium,zen"
"previous"
];
};