readme: add bonus section with xdg mime associations (#109)

This commit is contained in:
Luis Quiñones
2025-09-03 06:26:29 -05:00
committed by GitHub
parent e47cbd7de7
commit 05372738e7

44
.github/README.md vendored
View File

@@ -225,7 +225,7 @@ To setup your own extensions you should:
- `profiles.*.spaces` (attrsOf submodule): Declare profile's \[work\]spaces.
- `name` (string) Name of space, defaults to submodule/attribute name.
- `id` (string) **Required.** UUID v4 of space. **Changing this after a rebuild will re-create the space as
- `id` (string) **Required.** UUID v4 of space. **Changing this after a rebuild will re-create the space as
a new one,** losing opened tabs, groups, etc. If `spacesForce` is true, the space with the previous UUID will be deleted.
- `position` (unsigned integer) Position/order of space in the left bar.
- `icon` (null or (string or path)) Emoji, URI or file path for icon to be used as space icon.
@@ -333,6 +333,46 @@ Check the [Home Manager Reference](#home-manager-reference).
}
```
## Bonus
### XDG MIME Associations
To set Zen Browser as the default application for various file types and URL schemes, you can add the following configuration to your Home Manager setup:
```nix
{
xdg.mimeApps = let
value = let
zen-browser = inputs.zen-browser.packages.${system}.beta; # or twilight
in
zen-browser.meta.desktopFileName;
associations = builtins.listToAttrs (map (name: {
inherit name value;
}) [
"application/x-extension-shtml"
"application/x-extension-xhtml"
"application/x-extension-html"
"application/x-extension-xht"
"application/x-extension-htm"
"x-scheme-handler/unknown"
"x-scheme-handler/mailto"
"x-scheme-handler/chrome"
"x-scheme-handler/about"
"x-scheme-handler/https"
"x-scheme-handler/http"
"application/xhtml+xml"
"application/json"
"text/plain"
"text/html"
]);
in {
associations.added = associations;
defaultApplications = associations;
};
}
```
## Troubleshooting
#### Zen not seeing my GPU
@@ -344,7 +384,7 @@ Check [No WebGL context](https://github.com/0xc000022070/zen-browser-flake/issue
#### 1Password constantly requires password
You may want to set `policies.DisableAppUpdate = false;` in your policies.json file. See <https://github.com/0xc000022070/zen-browser-flake/issues/48>.
You may want to set `policies.DisableAppUpdate = false;` in your policies.json file. See <https://github.com/0xc000022070/zen-browser-flake/issues/48>.
## Contributing