From 3c499d4334e60f4600a2ad053608a916acacf25d Mon Sep 17 00:00:00 2001 From: Jan Grosser Date: Fri, 22 Mar 2024 22:00:25 +0100 Subject: [PATCH] Basic configuration for firefox with mutliple profiles - but w/o extensions --- hosts/vbox-test/home.nix | 4 ++++ modules/home-manager/firefox.nix | 41 ++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 modules/home-manager/firefox.nix diff --git a/hosts/vbox-test/home.nix b/hosts/vbox-test/home.nix index f5a25e8..ba29deb 100644 --- a/hosts/vbox-test/home.nix +++ b/hosts/vbox-test/home.nix @@ -15,6 +15,10 @@ # release notes. home.stateVersion = "23.11"; # Please read the comment before changing. + imports = [ + ../../modules/home-manager/firefox.nix + ]; + # The home.packages option allows you to install Nix packages into your # environment. home.packages = [ diff --git a/modules/home-manager/firefox.nix b/modules/home-manager/firefox.nix new file mode 100644 index 0000000..10460e6 --- /dev/null +++ b/modules/home-manager/firefox.nix @@ -0,0 +1,41 @@ +{ config, pkgs, ... }: + +{ + programs.firefox = { + enable =true; + + profiles = { + + # Default profile + default = { + id = 0; + name = "Default profile"; + + settings = { + "dom.security.https_only_mode" = false; + }; + + search.engines = { + "Nix packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + param = [ + { name = "type"; value = "packages"; } + { name = "query"; value = "{serachTerms}"; } + ]; + }]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; + }; + }; + search.force = true; + }; + + # Another profile + testing = { + id = 1; + name = "Test profile"; + }; + }; + }; +}