diff options
author | Michael Peyton Jones <me@michaelpj.com> | 2018-12-04 19:33:05 +0000 |
---|---|---|
committer | Michael Peyton Jones <me@michaelpj.com> | 2018-12-04 20:26:25 +0000 |
commit | 656b74f021c204b4ef1ecdfedd180e3336f8cdc5 (patch) | |
tree | 13fede701224c3a7ba47fec477728ba9323ffef0 /nixos | |
parent | 7c73f53d836af32624468e8de7730be1f033667c (diff) | |
download | nixlib-656b74f021c204b4ef1ecdfedd180e3336f8cdc5.tar nixlib-656b74f021c204b4ef1ecdfedd180e3336f8cdc5.tar.gz nixlib-656b74f021c204b4ef1ecdfedd180e3336f8cdc5.tar.bz2 nixlib-656b74f021c204b4ef1ecdfedd180e3336f8cdc5.tar.lz nixlib-656b74f021c204b4ef1ecdfedd180e3336f8cdc5.tar.xz nixlib-656b74f021c204b4ef1ecdfedd180e3336f8cdc5.tar.zst nixlib-656b74f021c204b4ef1ecdfedd180e3336f8cdc5.zip |
nixos: add AppStream module
Diffstat (limited to 'nixos')
-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 000000000000..483ac9c3cd76 --- /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 e2b2666888cf..3ec55e468757 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 |