hungtr@bao: ungoogled vimium
parent
b2412b25dd
commit
89a41c6ad7
|
@ -35,9 +35,57 @@
|
|||
# lib = (import ../lib { inherit pkgs; lib = pkgs.lib; });
|
||||
base = import ./base;
|
||||
inherit (base) mkModuleArgs;
|
||||
private_chromium = {config, pkgs, lib, ...}: let cfg = config.base.private_chromium;
|
||||
in {
|
||||
options.base.private_chromium = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
Enable extremely lightweight chromium with vimium plugin
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
# home.packages = [pkgs.ungoogled-chromium];
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
extensions =
|
||||
let
|
||||
mkChromiumExtForVersion = browserVersion: {id, sha256, extVersion,...}:
|
||||
{
|
||||
inherit id;
|
||||
crxPath = builtins.fetchurl {
|
||||
url = "https://clients2.google.com/service/update2/crx"+
|
||||
"?response=redirect"+
|
||||
"&acceptformat=crx2,crx3"+
|
||||
"&prodversion=${browserVersion}"+
|
||||
"&x=id%3D${id}%26installsource%3Dondemand%26uc";
|
||||
name = "${id}.crx";
|
||||
inherit sha256;
|
||||
};
|
||||
version = extVersion;
|
||||
};
|
||||
mkChromiumExt = mkChromiumExtForVersion (lib.versions.major pkgs.ungoogled-chromium.version);
|
||||
in
|
||||
[
|
||||
# vimium
|
||||
(mkChromiumExt {
|
||||
id = "dbepggeogbaibhgnhhndojpepiihcmeb";
|
||||
sha256 = "00qhbs41gx71q026xaflgwzzridfw1sx3i9yah45cyawv8q7ziic";
|
||||
extVersion = "1.67.4";
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
kde_module = {config, pkgs, ...}: {
|
||||
fonts.fontconfig.enable = true;
|
||||
home.packages = [(pkgs.nerdfonts.override {fonts = ["DroidSansMono"];})];
|
||||
home.packages = [
|
||||
(pkgs.nerdfonts.override {fonts = ["DroidSansMono"];})
|
||||
];
|
||||
# For some reasons, Windows es in the font name as DroidSansMono NF
|
||||
# so we need to override this
|
||||
base.alacritty.font.family = "DroidSansMono Nerd Font";
|
||||
|
@ -73,6 +121,7 @@
|
|||
modules = base.modules ++ [
|
||||
./home.nix
|
||||
kde_module
|
||||
private_chromium
|
||||
];
|
||||
# optionally pass inarguments to module
|
||||
# we migrate this from in-place modules to allow flexibility
|
||||
|
|
|
@ -57,6 +57,9 @@ in
|
|||
# pkgs.nixops_unstable # nixops v2 # insecure for now
|
||||
pkgs.lynx # Web browser at your local terminal
|
||||
|
||||
# Personal management
|
||||
pkgs.keepass
|
||||
|
||||
# pkgs.tailscale # VPC;; This should be installed in system-nix
|
||||
pkgs.python310 # dev packages should be in project
|
||||
# pkgs.python310.numpy
|
||||
|
|
Loading…
Reference in New Issue