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