Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox: manage setup via home manager #1

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)