Skip to content

Commit 698e1b8

Browse files
committed
readme: release programs.zen-browser.setAsDefaultBrowser
1 parent 3ac6ea2 commit 698e1b8

File tree

1 file changed

+6
-42
lines changed

1 file changed

+6
-42
lines changed

.github/README.md

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ inputs = {
5656
# or inputs.zen-browser.homeModules.twilight-official
5757
];
5858
59-
programs.zen-browser.enable = true;
59+
programs.zen-browser = {
60+
enable = true;
61+
setAsDefaultBrowser = true;
62+
};
6063
}
6164
```
6265

@@ -123,6 +126,8 @@ further documentation.
123126

124127
- `enable` (_boolean_): Enable the Home Manager config.
125128

129+
- `setAsDefaultBrowser` (_boolean_): Whether to set Zen Browser as the default application for various file types and URL schemes.
130+
126131
- `nativeMessagingHosts` (listOf package): To
127132
[enable communication between the browser and native applications](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging).
128133

@@ -678,47 +683,6 @@ Check the [Home Manager Reference](#home-manager-reference).
678683
}
679684
```
680685

681-
## Bonus
682-
683-
### XDG MIME Associations
684-
685-
To set Zen Browser as the default application for various file types and URL
686-
schemes, you can add the following configuration to your Home Manager setup:
687-
688-
```nix
689-
{
690-
xdg.mimeApps = let
691-
value = let
692-
zen-browser = inputs.zen-browser.packages.${system}.beta; # or twilight
693-
in
694-
zen-browser.meta.desktopFileName;
695-
696-
associations = builtins.listToAttrs (map (name: {
697-
inherit name value;
698-
}) [
699-
"application/x-extension-shtml"
700-
"application/x-extension-xhtml"
701-
"application/x-extension-html"
702-
"application/x-extension-xht"
703-
"application/x-extension-htm"
704-
"x-scheme-handler/unknown"
705-
"x-scheme-handler/mailto"
706-
"x-scheme-handler/chrome"
707-
"x-scheme-handler/about"
708-
"x-scheme-handler/https"
709-
"x-scheme-handler/http"
710-
"application/xhtml+xml"
711-
"application/json"
712-
"text/plain"
713-
"text/html"
714-
]);
715-
in {
716-
associations.added = associations;
717-
defaultApplications = associations;
718-
};
719-
}
720-
```
721-
722686
## Troubleshooting
723687

724688
### Missing configuration after update

0 commit comments

Comments
 (0)