Relocating Firefox

This commit is contained in:
James Patrick 2022-07-23 15:00:49 -04:00
parent 4e9b865e33
commit 5d698370c0
3 changed files with 42 additions and 16 deletions

View File

@ -3,7 +3,6 @@
./1password.nix
./dunst.nix
./emacs.nix
./firefox.nix
./gammastep.nix
./gnome-common.nix
./kdeconnect.nix
@ -14,5 +13,6 @@
./zeal.nix
./i3
./firefox
];
}

View File

@ -3,11 +3,16 @@ let
cfg = config.this.application.firefox;
graphical = config.this.graphical;
in with lib; {
options = {
this.application.firefox.enable = mkOption {
imports = [ ./tridactyl.nix ];
options.this.application.firefox = {
enable = mkOption {
default = graphical.enable;
type = with types; bool;
description = "";
};
pkg = mkOption {
default =
pkgs.firefox.override { cfg = { enableTridactylNative = true; }; };
type = with types; package;
};
};
@ -17,14 +22,12 @@ in with lib; {
home-manager.users.james = {
programs.firefox = {
enable = true;
package =
pkgs.firefox.override { cfg = { enableTridactylNative = true; }; };
package = cfg.pkg;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
https-everywhere
onepassword-password-manager
simple-tab-groups
tridactyl
ublock-origin
];
@ -59,15 +62,6 @@ in with lib; {
};
};
};
home.packages = with pkgs; [ tridactyl-native ];
# This is a bit silly as this is currently managed by my make dot config.
xdg.configFile."tridactyl/tridactylrc".source = pkgs.fetchurl {
url =
"https://git.jpatrick.io/james/dotfiles/raw/branch/master/tridactyl/tridactylrc";
sha256 = "sha256-iOBd/yEvQP/Gn3+lS2Ztu9oslllZU4G7VnM4pTck+Tg=";
};
};
};
}

View File

@ -0,0 +1,32 @@
{ config, pkgs, lib, ... }:
let
cfg = config.this.application.firefox.tridactyl;
firefox = config.this.application.firefox;
in with lib; {
options = {
this.application.firefox.tridactyl.enable = mkOption {
default = firefox.enable;
type = with types; bool;
description = "";
};
};
config = mkIf cfg.enable {
# firefox.pkg =
# pkgs.firefox.override { cfg = { enableTridactylNative = true; }; };
home-manager.users.james = {
programs.firefox = {
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ tridactyl ];
};
home.packages = with pkgs; [ tridactyl-native ];
# This is a bit silly as this is currently managed by my make dot config.
xdg.configFile."tridactyl/tridactylrc".source = pkgs.fetchurl {
url =
"https://git.jpatrick.io/james/dotfiles/raw/branch/master/tridactyl/tridactylrc";
sha256 = "sha256-iOBd/yEvQP/Gn3+lS2Ztu9oslllZU4G7VnM4pTck+Tg=";
};
};
};
}