xdg: fix typo in settings which prevented default apps from being set
This commit is contained in:
		
							parent
							
								
									f598491ab3
								
							
						
					
					
						commit
						286fcc67d2
					
				
					 2 changed files with 17 additions and 31 deletions
				
			
		|  | @ -9,37 +9,23 @@ with lib; let | |||
| in { | ||||
|   options.local.apps.firefox = { | ||||
|     enable = mkEnableOption "firefox settings"; | ||||
| 
 | ||||
|     makeDefaultBrowser = mkOption { | ||||
|       type = types.bool; | ||||
|       default = true; | ||||
|       description = '' | ||||
|         Take a guess | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable (mkMerge [ | ||||
|     { | ||||
|       programs.firefox.enable = true; | ||||
|     } | ||||
| 
 | ||||
|     (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"]; | ||||
|           }; | ||||
|   config = mkIf cfg.enable { | ||||
|     programs.firefox.enable = true; | ||||
|     xdg = { | ||||
|       mimeApps = { | ||||
|         enable = true; | ||||
|         defaultApplications = { | ||||
|           "text/html" = ["firefox.desktop"]; | ||||
|           "text/uri-list" = ["firefox.desktop"]; | ||||
|           "x-scheme-handler/http" = ["firefox.desktop"]; | ||||
|           "x-scheme-handler/https" = ["firefox.desktop"]; | ||||
|           "x-scheme-handler/about" = ["firefox.desktop"]; | ||||
|           "x-scheme-handler/unknown" = ["firefox.desktop"]; | ||||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       home.sessionVariables.DEFAULT_BROWSER = "${lib.getExe pkgs.firefox}"; | ||||
|     }) | ||||
|   ]); | ||||
|     }; | ||||
|     home.sessionVariables.DEFAULT_BROWSER = "${lib.getExe pkgs.firefox}"; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -61,8 +61,8 @@ in { | |||
|       mimeApps = { | ||||
|         enable = true; | ||||
|         defaultApplications = { | ||||
|           "application/pdf" = with pkgs; ["qpdfview"]; | ||||
|           "x-scheme-handler/file" = with pkgs; ["foot"]; | ||||
|           "application/pdf" = with pkgs; ["qpdfview.desktop"]; | ||||
|           "x-scheme-handler/file" = with pkgs; ["foot.desktop"]; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue