forked from fabian/nix
		
	improve firefox module
This commit is contained in:
		
							parent
							
								
									d7f1c06f40
								
							
						
					
					
						commit
						48d230a108
					
				
					 5 changed files with 35 additions and 28 deletions
				
			
		|  | @ -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}'"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue