blob: 16cd3fd103b86c92090c308c01eeadb48b2eeb4e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
{
config,
options,
lib,
pkgs,
...
}: let
firefoxConf = config.modules.desktop.apps.browsers.firefox;
arkenfox = {
owner = "arkenfox";
repo = "user.js";
version = "117.0";
};
in
{
options.modules.desktop.apps.browsers.firefox = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf (firefoxConf.enable) {
env.MOZ_DBUS_REMOTE = "1";
home.packages = [pkgs.xdg-utils];
home.manager.programs.firefox = {
enable = true;
package = pkgs.firefox;
profiles."default" = {
extraConfig = builtins.readFile
( builtins.fetchTarball {
url = "https://github.com/${arkenfox.owner}/${arkenfox.repo}/archive/refs/tags/${arkenfox.version}.tar.gz";
sha256="1pll4fbdn2390n05902l3pkg4rizxghkakpzi1r9z1b7blmk1x4s";
} + "/user.js");
search = {
force = true;
default = "DuckDuckGo";
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
urls = [{ template = "https://wiki.nixos.org/index.php?search={searchTerms}"; }];
iconUpdateURL = "https://wiki.nixos.org/favicon.png";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@nw" ];
};
};
};
};
};
modules.desktop.defaultApplications.apps.browser = rec {
package = pkgs.firefox;
install = false;
cmd = "${package}/bin/firefox";
desktop = "firefox";
};
};
}
|