30 lines
674 B
Nix
30 lines
674 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.local.apps.browsers;
|
|
in {
|
|
options.local.apps.browsers = {
|
|
enable = mkEnableOption "firefox settings";
|
|
|
|
workspace = mkOption {
|
|
type = types.nullOr types.str;
|
|
default = null;
|
|
description = ''
|
|
Workspace in which Firefox should open. If not set, Firefox will not open at startup.
|
|
'';
|
|
};
|
|
};
|
|
|
|
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}'";
|
|
};
|
|
};
|
|
}
|