improve firefox module
This commit is contained in:
parent
d7f1c06f40
commit
48d230a108
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.local.apps.browsers;
|
||||
in {
|
||||
options.local.apps.browsers = {
|
||||
enable = mkEnableOption "Browser home settings";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
chromium
|
||||
firefox
|
||||
];
|
||||
|
||||
# create an option for this
|
||||
xsession.windowManager.i3.config.startup = [
|
||||
{
|
||||
command = "${lib.getExe pkgs.i3-gaps} 'workspace 1; exec ${lib.getExe pkgs.firefox}'";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -10,7 +10,7 @@
|
|||
./baseline.nix
|
||||
./gaming.nix
|
||||
./yubikey.nix
|
||||
./browsers.nix
|
||||
./firefox.nix
|
||||
./gui
|
||||
./zsh
|
||||
./gpg.nix
|
||||
|
|
|
@ -13,6 +13,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
calibre
|
||||
chromium
|
||||
discord
|
||||
gwenview
|
||||
libreoffice-fresh
|
||||
|
|
29
home/modules/firefox.nix
Normal file
29
home/modules/firefox.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
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}'";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -40,8 +40,11 @@
|
|||
neovim.enable = true;
|
||||
gaming.enable = true;
|
||||
yubikey.enable = true;
|
||||
browsers.enable = true;
|
||||
defaultDesktopPack.enable = true;
|
||||
firefox = {
|
||||
enable = true;
|
||||
workspace = 1;
|
||||
};
|
||||
};
|
||||
|
||||
gui = {
|
||||
|
|
Loading…
Reference in a new issue