modularize firefox

This commit is contained in:
John Bowdre 2023-07-28 21:44:49 -05:00
parent 34355b6c1a
commit 2d560a7374
4 changed files with 94 additions and 1 deletions

View file

@ -1,5 +1,43 @@
{
"nodes": {
"firefox-addons": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1690516944,
"narHash": "sha256-MfrIP2efvDhGZHhkgcMwMygqK2USpwiO8I9EEFPYn/c=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "8c2d969a614c21e8d6f2fade01e31bd89dcb4d1d",
"type": "gitlab"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"flake-utils": {
"locked": {
"lastModified": 1629284811,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"hardware": {
"locked": {
"lastModified": 1690200740,
@ -70,6 +108,7 @@
},
"root": {
"inputs": {
"firefox-addons": "firefox-addons",
"hardware": "hardware",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",

View file

@ -20,6 +20,12 @@
# Hardware
hardware.url = "github:nixos/nixos-hardware";
# Firefox add-ons
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... } @ inputs:

View file

@ -1,11 +1,11 @@
{ pkgs, ... }: {
# Common GUI apps
imports = [
./firefox.nix
./vscode.nix
];
home.packages = with pkgs; [
firefox-esr
obsidian
qFlipper
];

View file

@ -0,0 +1,48 @@
{ pkgs, lib, inputs, ... }:
let
addons = inputs.firefox-addons.packages.${pkgs.system};
in
{
programs.firefox = {
enable = true;
profiles.john = {
bookmarks = { };
# extensions = with addons; [
# bitwarden-password-manager
# privacy-badger17
# raindropio
# ];
bookmarks = { };
settings = {
"app.update.auto" = false;
"browser.disableResetPrompt" = true;
"browser.download.panel.shown" = true;
"browser.download.useDownloadDir" = true;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.shell.defaultBrowserCheckCount" = 1;
"browser.startup.homepage" = "https://kagi.com/";
"dom.security.https_only_mode" = true;
"extensions.pocket.enabled" = false;
"identity.fxaccounts.enabled" = true;
"privacy.trackingprotection.enabled" = true;
"signon.rememberSignons" = false;
};
};
};
home = {
sessionVariables = {
# https://github.com/NixOS/nixpkgs/issues/238025
TZ = "/etc/localtime";
};
};
xdg.mimeApps.defaultApplications = {
"text/html" = [ "firefox.desktop" ];
"text/xml" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
};
}