1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-02 15:11:03 +01:00
home-manager/tests/modules/misc/xdg/mime.nix
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00

29 lines
777 B
Nix

{ ... }:
{
config = {
xdg.mime.enable = true;
xdg.desktopEntries = {
mime-test = {
# mime info test
name = "mime-test";
mimeType = [
"text/html"
"text/xml"
];
};
};
nmt.script = ''
assertFileExists home-path/share/applications/mimeinfo.cache # Check that update-desktop-database created file
# Check that update-desktop-database file matches expected
assertFileContent \
home-path/share/applications/mimeinfo.cache \
${./mime-expected.cache}
assertDirectoryExists home-path/share/mime # Check that update-mime-database created directory
assertDirectoryNotEmpty home-path/share/mime # Check that update-mime-database created files
'';
};
}