mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
25 lines
741 B
Nix
25 lines
741 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
|
||
|
|
||
|
'';
|
||
|
};
|
||
|
}
|