Add Noogle

Add both a bookmark and a search shortcut for noogle
This commit is contained in:
Greg Hellings
2024-10-18 09:19:58 -05:00
parent c5090d69a2
commit cd0533332d
2 changed files with 148 additions and 94 deletions
+70 -20
View File
@@ -1,11 +1,14 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
cfg = config.greg.gui;
excludes = systems: opts: (
if (builtins.all (x: pkgs.system != x) systems) then opts else [ ]
);
excludes = systems: opts: (if (builtins.all (x: pkgs.system != x) systems) then opts else [ ]);
# For now, we ignore this and don't install it
ffPkgs = pkgs.firefox.override { cfg.enableGnomeExtensions = true; };
@@ -17,9 +20,16 @@ in
{
options.greg.gui = lib.mkEnableOption "Enable GUI programs";
config = (lib.mkIf cfg {
config = (
lib.mkIf cfg {
# These packages are Linux only
home.packages = with pkgs; (excludes [ "x86_64-darwin" "aarch64-darwin" ]
home.packages =
with pkgs;
(excludes
[
"x86_64-darwin"
"aarch64-darwin"
]
[
cdrtools
element-desktop
@@ -27,10 +37,17 @@ in
qpwgraph
vlc
x265
]) ++
]
)
++
# x86_64-linux only
(excludes [ "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ]
(excludes
[
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
]
[
bitwarden
discord
@@ -40,11 +57,12 @@ in
#logseq
nextcloud-client
slack
]) ++
]
)
++
# Items that are not supported on ARM/Linux
(excludes [ "aarch64-linux" ]
[
(excludes [ "aarch64-linux" ] [
onlyoffice-bin
synology-drive-client
zoom-us
@@ -67,27 +85,58 @@ in
engines = {
Google.metaData.alias = "@g";
"Nix Packages" = {
urls = [{
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
{
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 = [{
urls = [
{
template = "https://search.nixos.org/options";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};
"Noogle" = {
urls = [
{
template = "https://noogle.dev/q";
params = [
{
name = "term";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nl" ];
};
};
};
settings = {
@@ -117,5 +166,6 @@ in
# This is supposed to be in support of Firefox, but I dunno...
programs.bash.sessionVariables = vars;
programs.xonsh.sessionVariables = vars;
});
}
);
}
+4
View File
@@ -130,6 +130,10 @@
name = "Nixpkgs functions";
url = "https://ryantm.github.io/nixpkgs/functions/library/strings/#sec-functions-library-strings";
}
{
name = "Noogle";
url = "https://noogle.dev/";
}
{
name = "NUR search";
url = "https://nur.nix-community.org/";