diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2018-12-18 00:27:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-18 00:27:23 +0100 |
commit | aacb2448896e6f22aff226833d719216acae1481 (patch) | |
tree | 58bc8e0b8ef4e4bf25695543fb898ba266ccdf49 /nixos/modules | |
parent | 0ceb8236bca7531128c42563981bd0b81f9fd9cd (diff) | |
parent | 656b74f021c204b4ef1ecdfedd180e3336f8cdc5 (diff) |
Merge pull request #51520 from michaelpj/imp/appstream
nixos: add AppStream module
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/config/appstream.nix | 25 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/nixos/modules/config/appstream.nix b/nixos/modules/config/appstream.nix new file mode 100644 index 0000000000000..483ac9c3cd762 --- /dev/null +++ b/nixos/modules/config/appstream.nix @@ -0,0 +1,25 @@ +{ config, lib, ... }: + +with lib; +{ + options = { + appstream.enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install files to support the + <link xlink:href="https://www.freedesktop.org/software/appstream/docs/index.html">AppStream metadata specification</link>. + ''; + }; + }; + + config = mkIf config.appstream.enable { + environment.pathsToLink = [ + # per component metadata + "/share/metainfo" + # legacy path for above + "/share/appdata" + ]; + }; + +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 5ffb0c5ab223d..09ed55c0699a5 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -11,6 +11,7 @@ ./config/xdg/icons.nix ./config/xdg/menus.nix ./config/xdg/mime.nix + ./config/appstream.nix ./config/gtk/gtk-icon-cache.nix ./config/gnu.nix ./config/i18n.nix |