nixos: add AppStream module

This commit is contained in:
Michael Peyton Jones 2018-12-04 19:33:05 +00:00
parent 7c73f53d83
commit 656b74f021
No known key found for this signature in database
GPG Key ID: 86A43C24A728F66D
2 changed files with 26 additions and 0 deletions

View File

@ -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"
];
};
}

View File

@ -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