forked from fabian/nix
		
	
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			762 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			762 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  config,
 | 
						|
  lib,
 | 
						|
  pkgs,
 | 
						|
  ...
 | 
						|
}:
 | 
						|
with lib; let
 | 
						|
  cfg = config.local.programs.firefox;
 | 
						|
in {
 | 
						|
  options.local.programs.firefox = {
 | 
						|
    enable = mkEnableOption "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}";
 | 
						|
  };
 | 
						|
}
 |