From 2ddc809118dab99d60be467252b5c3c228744316 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Tue, 21 Apr 2020 00:31:15 +0300 Subject: [PATCH] Update modules/applications.nix --- modules/applications.nix | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/modules/applications.nix b/modules/applications.nix index 0105cd8..ff3a399 100755 --- a/modules/applications.nix +++ b/modules/applications.nix @@ -41,8 +41,8 @@ with import ../support.nix { inherit lib config; }; { desktop = "org.kde.ark"; }; mail = { - cmd = "${pkgs.trojita}/bin/trojita"; - desktop = "trojita"; + cmd = "${pkgs.sylpheed}/bin/sylpheed"; + desktop = "sylpheed"; }; text_processor = { cmd = "${pkgs.abiword}/bin/abiword"; @@ -53,11 +53,11 @@ with import ../support.nix { inherit lib config; }; { desktop = "gnumeric"; }; }; - home-manager.users.balsoft.xdg.configFile."mimeapps.list.home".text = + home-manager.users.balsoft.xdg.mimeApps.defaultApplications = with config.defaultApplications; - let - apps = builtins.mapAttrs (name: value: "${value.desktop}.desktop;") { + builtins.mapAttrs (name: value: + if value ? desktop then [ "${value.desktop}.desktop" ] else value) { "text/html" = browser; "image/*" = { desktop = "org.kde.gwenview"; }; "application/x-bittorrent" = torrent; @@ -81,22 +81,5 @@ with import ../support.nix { inherit lib config; }; { "text/plain" = editor; # This actually makes Emacs an editor for everything... XDG is wierd }; - in genIni { - "Default Applications" = apps; - "Added Associations" = apps; - }; - home-manager.users.balsoft.xdg.configFile."filetypesrc".text = genIni { - EmbedSettings = { - "embed-application/*" = false; - "embed-text/*" = false; - "embed-text/plain" = false; - }; - }; - home-manager.users.balsoft.home.activation.mimeapps = { - before = [ ]; - after = [ "linkGeneration" ]; - data = - "$DRY_RUN_CMD cp ~/.config/mimeapps.list.home ~/.config/mimeapps.list"; - }; }; }