Refactor gui module
This commit is contained in:
parent
edfe0e5bf9
commit
e65183b4a4
36 changed files with 236 additions and 309 deletions
182
home/david/modules/programs/firefox.nix
Normal file
182
home/david/modules/programs/firefox.nix
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
{
|
||||
pkgs,
|
||||
outputs,
|
||||
system,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.david.programs.firefox;
|
||||
in {
|
||||
options = {
|
||||
david.programs.firefox = {
|
||||
enable = lib.mkEnableOption "firefox";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
stylix.targets.firefox.profileNames = [
|
||||
"default"
|
||||
];
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
betterfox = {
|
||||
enable = true;
|
||||
};
|
||||
languagePacks = [
|
||||
"zh-CN"
|
||||
"en-US"
|
||||
];
|
||||
profiles.default = {
|
||||
betterfox = {
|
||||
enable = true;
|
||||
enableAllSections = true;
|
||||
};
|
||||
name = "default";
|
||||
isDefault = true;
|
||||
extensions = {
|
||||
# settings = {
|
||||
# "redirector@einaregilsson.com" = {
|
||||
# settings = {
|
||||
# redirects = [
|
||||
# {
|
||||
# description = "NixOS Wiki";
|
||||
# exampleUrl = "http://nixos.wiki/wiki/Main_Page";
|
||||
# exampleResult = "http://wiki.nixos.org/wiki/Main_Page";
|
||||
# error = null;
|
||||
# includePattern = "http(s?)://nixos.wiki/wiki/(.*)";
|
||||
# excludePattern = "";
|
||||
# patternDesc = "";
|
||||
# redirectUrl = "http$1://wiki.nixos.org/wiki/$2";
|
||||
# patternType = "R";
|
||||
# processMatches = "noProcessing";
|
||||
# disabled = false;
|
||||
# grouped = false;
|
||||
# appliesTo = [
|
||||
# "main_frame"
|
||||
# ];
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
packages = with outputs.packages."${system}"; [
|
||||
immersive-translate
|
||||
tridactyl
|
||||
redirector
|
||||
];
|
||||
};
|
||||
settings = {
|
||||
"sidebar.verticalTabs" = true;
|
||||
"sidebar.visibility" = "expand-on-hover";
|
||||
"sidebar.main.tools" = "syncedtabs,history,bookmarks,aichat";
|
||||
"sidebar.animation.expand-on-hover.duration-ms" = 150;
|
||||
"sidebar.revamp" = true;
|
||||
"browser.tabs.closeTabByDblclick" = true;
|
||||
};
|
||||
search = {
|
||||
force = true;
|
||||
default = "ddg";
|
||||
engines = {
|
||||
"Nix Packages" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@np"];
|
||||
};
|
||||
"Nix Options" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/options";
|
||||
params = [
|
||||
{
|
||||
name = "channel";
|
||||
value = "unstable";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@no"];
|
||||
};
|
||||
"Home Manager Options" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com";
|
||||
params = [
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
{
|
||||
name = "release";
|
||||
value = "master";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["hm"];
|
||||
};
|
||||
"NUR Packages" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://nur.nix-community.org/";
|
||||
}
|
||||
];
|
||||
definedAliases = ["nu"];
|
||||
};
|
||||
"Nix Flakes" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/flakes";
|
||||
params = [
|
||||
{
|
||||
name = "channel";
|
||||
value = "unstable";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["nf"];
|
||||
};
|
||||
"NixOS Wiki" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://nixos.wiki/index.php";
|
||||
params = [
|
||||
{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["nw"];
|
||||
};
|
||||
"bing".metaData.hidden = true;
|
||||
"google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue