mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 02:13:55 -05:00
home: simplify mimeTypes import
This commit is contained in:
parent
b53a94c121
commit
259f3cbd17
|
@ -4,15 +4,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.ar.home.defaultApps;
|
cfg = config.ar.home.defaultApps;
|
||||||
inherit
|
mimeTypes = import ./mimeTypes.nix;
|
||||||
(import ./mimetypes.nix)
|
|
||||||
audioFiles
|
|
||||||
browserFiles
|
|
||||||
documentFiles
|
|
||||||
editorFiles
|
|
||||||
imageFiles
|
|
||||||
videoFiles
|
|
||||||
;
|
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
dconf = {
|
dconf = {
|
||||||
|
@ -50,29 +42,29 @@ in {
|
||||||
defaultApplications = let
|
defaultApplications = let
|
||||||
mkDefaults = files: desktopFile: lib.genAttrs files (_: [desktopFile]);
|
mkDefaults = files: desktopFile: lib.genAttrs files (_: [desktopFile]);
|
||||||
audioTypes =
|
audioTypes =
|
||||||
mkDefaults audioFiles
|
mkDefaults mimeTypes.audioFiles
|
||||||
"defaultAudioPlayer.desktop";
|
"defaultAudioPlayer.desktop";
|
||||||
|
|
||||||
browserTypes =
|
browserTypes =
|
||||||
mkDefaults browserFiles
|
mkDefaults mimeTypes.browserFiles
|
||||||
"defaultWebBrowser.desktop";
|
"defaultWebBrowser.desktop";
|
||||||
|
|
||||||
documentTypes =
|
documentTypes =
|
||||||
mkDefaults documentFiles
|
mkDefaults mimeTypes.documentFiles
|
||||||
"defaultPdfViewer.desktop";
|
"defaultPdfViewer.desktop";
|
||||||
|
|
||||||
editorTypes =
|
editorTypes =
|
||||||
mkDefaults editorFiles
|
mkDefaults mimeTypes.editorFiles
|
||||||
"defaultEditor.desktop";
|
"defaultEditor.desktop";
|
||||||
|
|
||||||
folderTypes = {"inode/directory" = "defaultFileManager.desktop";};
|
folderTypes = {"inode/directory" = "defaultFileManager.desktop";};
|
||||||
|
|
||||||
imageTypes =
|
imageTypes =
|
||||||
mkDefaults imageFiles
|
mkDefaults mimeTypes.imageFiles
|
||||||
"defaultImageViewer.desktop";
|
"defaultImageViewer.desktop";
|
||||||
|
|
||||||
videoTypes =
|
videoTypes =
|
||||||
mkDefaults videoFiles
|
mkDefaults mimeTypes.videoFiles
|
||||||
"defaultVideoPlayer.desktop";
|
"defaultVideoPlayer.desktop";
|
||||||
in
|
in
|
||||||
audioTypes
|
audioTypes
|
||||||
|
|
Loading…
Reference in a new issue