Compare commits
No commits in common. "firefox" and "master" have entirely different histories.
|
@ -1,10 +1 @@
|
||||||
{
|
{}
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
./programs
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
./firefox
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.options.trivium.programs.firefox;
|
|
||||||
in {
|
|
||||||
options.options.trivium.programs.firefox = {
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
|
||||||
{
|
|
||||||
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 = "${lib.getExe pkgs.firefox}";
|
|
||||||
})
|
|
||||||
]);
|
|
||||||
}
|
|
Loading…
Reference in a new issue