home-manager/tests/modules/misc/xdg/mime-apps-basics.nix

29 lines
638 B
Nix
Raw Normal View History

2019-09-05 09:25:31 +00:00
{ config, lib, pkgs, ... }:
with lib;
{
config = {
xdg.mimeApps = {
enable = true;
associations = {
added = {
"mimetype1" = [ "foo1.desktop" "foo2.desktop" "foo3.desktop" ];
"mimetype2" = "foo4.desktop";
};
2020-02-01 23:39:17 +00:00
removed = { mimetype1 = "foo5.desktop"; };
2019-09-05 09:25:31 +00:00
};
defaultApplications = {
"mimetype1" = [ "default1.desktop" "default2.desktop" ];
};
};
nmt.script = ''
assertFileExists home-files/.config/mimeapps.list
assertFileContent \
home-files/.config/mimeapps.list \
${./mime-apps-basics-expected.ini}
'';
};
}