diff options
author | Michael Peyton Jones <me@michaelpj.com> | 2018-08-15 09:55:35 +0100 |
---|---|---|
committer | Michael Peyton Jones <me@michaelpj.com> | 2018-08-16 21:23:34 +0100 |
commit | 13e2e19158bcd2b4d53e452d82f62817194100ef (patch) | |
tree | 71a13eecf2ba743d8df7a57c3dc577dd4ae9d630 /nixos/modules/config/xdg/mime.nix | |
parent | 52e7817aa2c33b8569b6fdc884f98a34fbf6f61e (diff) |
xdg: add modules for supporting various XDG specs
Diffstat (limited to 'nixos/modules/config/xdg/mime.nix')
-rw-r--r-- | nixos/modules/config/xdg/mime.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/modules/config/xdg/mime.nix b/nixos/modules/config/xdg/mime.nix new file mode 100644 index 000000000000..db3e7c6d4c53 --- /dev/null +++ b/nixos/modules/config/xdg/mime.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +with lib; +{ + options = { + xdg.mime.enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install files to support the + <link xlink:href="https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html">XDG Shared MIME-info specification</link> and the + <link xlink:href="https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html">XDG MIME Applications specification</link>. + ''; + }; + }; + + config = mkIf config.xdg.mime.enable { + environment.pathsToLink = [ "/share/mime" ]; + + environment.systemPackages = [ + # this package also installs some useful data, as well as its utilities + pkgs.shared-mime-info + ]; + }; + +} |