firefox: less home-manager stuff
This commit is contained in:
parent
37fd176a0a
commit
b94ce0aa40
3 changed files with 177 additions and 287 deletions
|
@ -372,16 +372,17 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722321190,
|
||||
"narHash": "sha256-WeVWVRqkgrbLzmk6FfJoloJ7Xe7HWD27Pv950IUG2kI=",
|
||||
"lastModified": 1722202622,
|
||||
"narHash": "sha256-AOe1F9EbQpcluAP+mq+i8T3/OfMu7ALiQtSdF+oAJRE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "4fcd54df7cbb1d79cbe81209909ee8514d6b17a4",
|
||||
"rev": "587fcca66e9d11c8e2357053c096a8a727c120ab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "587fcca66e9d11c8e2357053c096a8a727c120ab",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
url = "github:nix-community/home-manager?rev=587fcca66e9d11c8e2357053c096a8a727c120ab";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,21 +1,7 @@
|
|||
{ pkgs, config, secret, ... }:
|
||||
{ pkgs, config, lib, secret, ... }:
|
||||
|
||||
let
|
||||
profileName = "daniel";
|
||||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
package = null;
|
||||
|
||||
nativeMessagingHosts = with pkgs; [
|
||||
tridactyl-native
|
||||
];
|
||||
|
||||
profiles = {
|
||||
"${profileName}" = {
|
||||
id = 0;
|
||||
|
||||
settings = {
|
||||
# Arkenfox
|
||||
|
@ -79,6 +65,7 @@ in
|
|||
"browser.urlbar.mdn.featureGate" = false;
|
||||
"browser.urlbar.pocket.featureGate" = false;
|
||||
"browser.urlbar.weather.featureGate" = false;
|
||||
"browser.urlbar.yelp.featureGate" = false;
|
||||
"browser.formfill.enable" = false;
|
||||
|
||||
"browser.search.separatePrivateDefault" = true;
|
||||
|
@ -118,13 +105,20 @@ in
|
|||
|
||||
"privacy.sanitize.sanitizeOnShutdown" = true;
|
||||
"privacy.clearOnShutdown.cache" = true;
|
||||
"privacy.clearOnShutdown_v2.cache" = true;
|
||||
"privacy.clearOnShutdown.downloads" = true;
|
||||
"privacy.clearOnShutdown.formdata" = true;
|
||||
"privacy.clearOnShutdown.history" = true;
|
||||
"privacy.clearOnShutdown_v2.historyFormDataAndDownloads" = true;
|
||||
"privacy.clearOnShutdown.sessions" = true;
|
||||
"privacy.clearOnShutdown.cookies" = false;
|
||||
"privacy.clearOnShutdown.offlineApps" = false;
|
||||
|
||||
"privacy.clearSiteData.cache" = true;
|
||||
"privacy.clearSiteData.historyFormDataAndDownloads" = true;
|
||||
|
||||
"privacy.clearHistory.historyFormDataAndDownloads" = true;
|
||||
|
||||
"browser.messaging-system.whatsNewPanel.enabled" = false;
|
||||
"browser.urlbar.showSearchTerms.enabled" = false;
|
||||
|
||||
|
@ -158,142 +152,37 @@ in
|
|||
"browser.compactmode.show" = true;
|
||||
"layout.css.prefers-color-scheme.content-override" = 2;
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
search = {
|
||||
force = true;
|
||||
package = null;
|
||||
|
||||
default = "Kagi";
|
||||
privateDefault = "DuckDuckGo";
|
||||
|
||||
order = [
|
||||
"Kagi"
|
||||
"DuckDuckGo"
|
||||
"Nix Packages"
|
||||
"NixOS Options"
|
||||
"GitHub"
|
||||
"Hex"
|
||||
"Google"
|
||||
"Brave"
|
||||
nativeMessagingHosts = with pkgs; [
|
||||
tridactyl-native
|
||||
];
|
||||
|
||||
engines = {
|
||||
"DuckDuckGo".metaData.alias = "!d";
|
||||
"Google".metaData.alias = "!g";
|
||||
|
||||
"Bing".metaData.hidden = true;
|
||||
"eBay".metaData.hidden = true;
|
||||
"Ecosia".metaData.hidden = true;
|
||||
"LEO Eng-Deu".metaData.hidden = true;
|
||||
|
||||
"Kagi" = {
|
||||
urls = [{
|
||||
template = "https://kagi.com/search";
|
||||
params = [
|
||||
{ name = "q"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
|
||||
iconUpdateURL = "https://assets.kagi.com/v1/favicon-32x32.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "!k" ];
|
||||
};
|
||||
|
||||
"Brave" = {
|
||||
urls = [{
|
||||
template = "https://search.brave.com/search";
|
||||
params = [
|
||||
{ name = "q"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
home.file =
|
||||
let
|
||||
fullProfilePath = "Library/Application Support/Firefox/Profiles/${profileName}";
|
||||
|
||||
iconUpdateURL = "https://cdn.search.brave.com/serp/v1/static/brand/eebf5f2ce06b0b0ee6bbd72d7e18621d4618b9663471d42463c692d019068072-brave-lion-favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "!b" ];
|
||||
};
|
||||
userPrefValue = pref:
|
||||
builtins.toJSON (if lib.isBool pref || lib.isInt pref || lib.isString pref then
|
||||
pref
|
||||
else
|
||||
builtins.toJSON pref);
|
||||
|
||||
"GitHub" = {
|
||||
urls = [{
|
||||
template = "https://github.com/search";
|
||||
params = [
|
||||
{ name = "type"; value = "repositories"; }
|
||||
{ name = "q"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
|
||||
iconUpdateURL = "https://github.githubassets.com/favicons/favicon.svg";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "!gh" ];
|
||||
};
|
||||
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{ name = "type"; value = "packages"; }
|
||||
{ name = "channel"; value = "unstable"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
|
||||
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "!nix" ];
|
||||
};
|
||||
|
||||
"NixOS Options" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/options";
|
||||
params = [
|
||||
{ name = "type"; value = "packages"; }
|
||||
{ name = "channel"; value = "unstable"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
|
||||
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "!nixopt" ];
|
||||
};
|
||||
|
||||
"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 = [ "!nfn" ];
|
||||
};
|
||||
|
||||
"Hex" = {
|
||||
urls = [{
|
||||
template = "https://hex.pm/packages";
|
||||
params = [
|
||||
{ name = "search"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
|
||||
iconUpdateURL = "https://hex.pm/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "!hex" ];
|
||||
};
|
||||
|
||||
"Emojipedia" = {
|
||||
urls = [{
|
||||
template = "https://emojipedia.org/search";
|
||||
params = [
|
||||
{ name = "q"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
|
||||
iconUpdateURL = "https://emojipedia.org/images/favicon-32x32.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "!emoji" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
mkUserJs = prefs:
|
||||
''
|
||||
${lib.concatStrings (lib.mapAttrsToList (name: value: ''
|
||||
user_pref("${name}", ${userPrefValue value});
|
||||
'') prefs)}
|
||||
'';
|
||||
in
|
||||
{
|
||||
"${fullProfilePath}/user.js".text = mkUserJs settings;
|
||||
};
|
||||
|
||||
xdg.configFile."tridactyl/tridactylrc".text =
|
||||
|
|
Loading…
Reference in a new issue