update firefox module

This commit is contained in:
Fabian Montero 2025-01-31 08:28:46 -06:00
parent 7854100358
commit 86cf517738
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
3 changed files with 14 additions and 4 deletions

View file

@ -5,9 +5,9 @@
...
}:
with lib; let
cfg = config.local.apps.browsers;
cfg = config.local.apps.firefox;
in {
options.local.apps.browsers = {
options.local.apps.firefox = {
enable = mkEnableOption "firefox settings";
workspace = mkOption {
@ -22,6 +22,17 @@ in {
config = mkIf cfg.enable {
programs.firefox.enable = true;
xdg = {
mimeApps = {
enable = true;
defaultApplications = {
"text/uri-list" = with pkgs; ["firefox"];
"x-scheme-handler/http" = with pkgs; ["firefox"];
"x-scheme-handler/https" = with pkgs; ["firefox"];
};
};
};
xsession.windowManager.i3.config.startup = optional (cfg.workspace != null) {
command = "${lib.getExe pkgs.i3-gaps} 'workspace ${cfg.workspace}; exec ${lib.getExe pkgs.firefox}'";
};

View file

@ -120,7 +120,6 @@ in {
enable = true;
defaultApplications = {
"application/pdf" = with pkgs; ["qpdfview"];
"text/uri-list" = with pkgs; ["firefox"];
"x-scheme-handler/file" = with pkgs; ["kitty"];
};
};

View file

@ -43,7 +43,7 @@
defaultDesktopPack.enable = true;
firefox = {
enable = true;
workspace = 1;
workspace = "1"; #make this an int later
};
};