Compare commits
No commits in common. "6b2163c050a3ea243929d11d7aa6a2ac3cb739e7" and "d7ea1577618966b5f7c85d38802145b495fc1fa8" have entirely different histories.
6b2163c050
...
d7ea157761
|
@ -5,53 +5,25 @@
|
|||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.local.apps.firefox;
|
||||
cfg = config.local.apps.browsers;
|
||||
in {
|
||||
options.local.apps.firefox = {
|
||||
options.local.apps.browsers = {
|
||||
enable = mkEnableOption "firefox settings";
|
||||
|
||||
workspace = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
i3 Workspace in which Firefox should open. If not set, Firefox will not open at startup
|
||||
'';
|
||||
};
|
||||
|
||||
makeDefaultBrowser = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Take a guess
|
||||
Workspace in which Firefox should open. If not set, Firefox will not open at startup.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
programs.firefox.enable = true;
|
||||
|
||||
xsession.windowManager.i3.config.startup = optional (cfg.workspace != null) {
|
||||
command = "${lib.getExe pkgs.i3-gaps} 'workspace ${cfg.workspace}; exec ${lib.getExe pkgs.firefox}'";
|
||||
};
|
||||
}
|
||||
|
||||
(mkIf cfg.makeDefaultBrowser {
|
||||
xdg = {
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"text/html" = ["firefox"];
|
||||
"text/uri-list" = ["firefox"];
|
||||
"x-scheme-handler/http" = ["firefox"];
|
||||
"x-scheme-handler/https" = ["firefox"];
|
||||
"x-scheme-handler/about" = ["firefox"];
|
||||
"x-scheme-handler/unknown" = ["firefox"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables.DEFAULT_BROWSER = mkIf cfg.makeDefaultBrowser "${lib.getExe pkgs.firefox}";
|
||||
})
|
||||
]);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ in {
|
|||
enable = true;
|
||||
defaultApplications = {
|
||||
"application/pdf" = with pkgs; ["qpdfview"];
|
||||
"text/uri-list" = with pkgs; ["firefox"];
|
||||
"x-scheme-handler/file" = with pkgs; ["kitty"];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
defaultDesktopPack.enable = true;
|
||||
firefox = {
|
||||
enable = true;
|
||||
workspace = "1"; #make this an int later
|
||||
workspace = 1;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
fail2ban = {
|
||||
enable = true;
|
||||
bantime = "10m";
|
||||
|
|
Loading…
Reference in a new issue