Skip to content

Commit

Permalink
Firefox: manage setup via home manager (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
britter authored Jun 9, 2024
1 parent 4fb9b50 commit 9a75f64
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 1 deletion.
16 changes: 16 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
inputs.nixpkgs.follows = "nixpkgs";
};

nur.url = "github:nix-community/NUR";

catppuccin.url = "github:catppuccin/nix";

disko = {
Expand Down Expand Up @@ -47,6 +49,7 @@
overlays = import ./overlays {
inherit pkgs-unstable;
inherit my-pkgs;
inherit (inputs) nur;
};
})
// {
Expand Down
108 changes: 107 additions & 1 deletion home/firefox/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.my.home.desktop.firefox;
Expand All @@ -10,6 +11,111 @@ in {
};

config = lib.mkIf cfg.enable {
programs.firefox.enable = true;
programs.firefox = {
enable = true;
# see https://mozilla.github.io/policy-templates/
policies = {
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DisableFirefoxAccounts = false;
DisplayBookmarksToolbar = "newtab";
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false;
PasswordManagerEnabled = false;
FirefoxHome = {
Search = true;
Pocket = false;
Snippets = false;
TopSites = false;
Highlights = false;
};
};
profiles.bene = {
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
clearurls
consent-o-matic
decentraleyes
duckduckgo-privacy-essentials
ghostery
onepassword-password-manager
privacy-badger
ublock-origin
];
bookmarks = [
{
name = "Bookmarks Toolbar";
toolbar = true;
bookmarks = [
{
name = "Google Mail";
url = "https://mail.google.com";
}
{
name = "Google Calendar";
url = "https://calendar.google.com";
}
{
name = "Goole Drive";
url = "https://drive.google.com";
}
{
name = "GitHub";
url = "https://github.com/notifications";
}
{
name = "Mastodon";
url = "https://chaos.social";
}
{
name = "Komoot";
url = "https://www.komoot.de";
}
{
name = "Tmux Cheat Sheet";
url = "https://tmuxcheatsheet.com";
}
];
}
];
search = {
force = true;
default = "DuckDuckGo";
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"];
};
"NixOS Wiki" = {
urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = ["@nw"];
};
"Wikipedia (de)".metaData.alias = "@wiki";
"Google".metaData.hidden = true;
"Amazon.com".metaData.hidden = true;
"Bing".metaData.hidden = true;
"eBay".metaData.hidden = true;
};
};
};
};
};
}
2 changes: 2 additions & 0 deletions modules/my-user/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ in {
# unfree packages used in home-manager configuration
my.modules.allowedUnfreePkgs = [
"terraform"
# Firefox browser extension
"onepassword-password-manager"
];
};
}
2 changes: 2 additions & 0 deletions overlays/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
pkgs-unstable,
my-pkgs,
nur,
}: _final: _prev:
{
inherit (pkgs-unstable) jetbrains;
}
// my-pkgs
// (nur.overlay _final _prev)

0 comments on commit 9a75f64

Please sign in to comment.