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 ./1password.nix
./dunst.nix ./dunst.nix
./emacs.nix ./emacs.nix
./firefox.nix
./gammastep.nix ./gammastep.nix
./gnome-common.nix ./gnome-common.nix
./kdeconnect.nix ./kdeconnect.nix
@ -14,5 +13,6 @@
./zeal.nix ./zeal.nix
./i3 ./i3
./firefox
]; ];
} }

View File

@ -3,11 +3,16 @@ let
cfg = config.this.application.firefox; cfg = config.this.application.firefox;
graphical = config.this.graphical; graphical = config.this.graphical;
in with lib; { in with lib; {
options = { imports = [ ./tridactyl.nix ];
this.application.firefox.enable = mkOption { options.this.application.firefox = {
enable = mkOption {
default = graphical.enable; default = graphical.enable;
type = with types; bool; 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 = { home-manager.users.james = {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = package = cfg.pkg;
pkgs.firefox.override { cfg = { enableTridactylNative = true; }; };
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
https-everywhere https-everywhere
onepassword-password-manager onepassword-password-manager
simple-tab-groups simple-tab-groups
tridactyl
ublock-origin 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=";
};
};
};
}