1{ config, lib, ... }:
2{
3 meta = {
4 maintainers = lib.teams.freedesktop.members;
5 };
6
7 options = {
8 xdg.menus.enable = lib.mkOption {
9 type = lib.types.bool;
10 default = true;
11 description = ''
12 Whether to install files to support the
13 [XDG Desktop Menu specification](https://specifications.freedesktop.org/menu-spec/latest).
14 '';
15 };
16 };
17
18 config = lib.mkIf config.xdg.menus.enable {
19 environment.pathsToLink = [
20 "/share/applications"
21 "/share/desktop-directories"
22 "/etc/xdg/menus"
23 "/etc/xdg/menus/applications-merged"
24 ];
25 };
26
27}