From 656b74f021c204b4ef1ecdfedd180e3336f8cdc5 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Tue, 4 Dec 2018 19:33:05 +0000 Subject: [PATCH] nixos: add AppStream module --- nixos/modules/config/appstream.nix | 25 +++++++++++++++++++++++++ nixos/modules/module-list.nix | 1 + 2 files changed, 26 insertions(+) create mode 100644 nixos/modules/config/appstream.nix 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 + AppStream metadata specification. + ''; + }; + }; + + 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