From 308cf4d7f011fb89a7fab4d1b4844b834454c4b9 Mon Sep 17 00:00:00 2001 From: dadada Date: Sat, 25 Apr 2020 12:44:08 +0200 Subject: [PATCH] Add mime app associations to shared config --- common.nix | 1 + gtk.nix | 5 ++++- metis.nix | 21 +++++++-------------- xdg.nix | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 xdg.nix diff --git a/common.nix b/common.nix index f35992b..42a5a25 100644 --- a/common.nix +++ b/common.nix @@ -13,5 +13,6 @@ ./ssh.nix ./git.nix ./gtk.nix + ./xdg.nix ]; } diff --git a/gtk.nix b/gtk.nix index eac1e48..1286deb 100644 --- a/gtk.nix +++ b/gtk.nix @@ -12,5 +12,8 @@ dconf.settings."org/gnome/desktop/interface" = { enable-animations = false; }; - qt.platformTheme = true; + qt = { + enable = true; + platformTheme = "gnome"; + }; } diff --git a/metis.nix b/metis.nix index f20c60a..56c5f55 100644 --- a/metis.nix +++ b/metis.nix @@ -8,6 +8,7 @@ let NOTMUCH_CONFIG = "\$HOME/.config/notmuch/config"; GDK_BACKEND= "wayland"; MOZ_ENABLE_WAYLAND= "1"; + SSH_ASKPASS = "${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass"; }; unstable = import {}; in @@ -24,6 +25,10 @@ in systemd.user.sessionVariables = userEnv; home.packages = with pkgs; [ + slurp + grim + jq + lxqt.lxqt-openssh-askpass xdg_utils pwgen mkpasswd @@ -44,7 +49,6 @@ in inkscape inotify-tools jmtpfs - keepassxc ldns libreoffice mblaze @@ -79,6 +83,8 @@ in ] ++ (with unstable; [ python38Packages.managesieve android-studio + cachix + keepassxc ]); #wayland.windowManager.sway = { @@ -99,19 +105,6 @@ in xdg = { enable = true; - mimeApps = { - enable = false; - associations.added = { - "text/html" = "firefox.desktop"; - "text/plain" = "vim.desktop"; - "application/plain" = "zathura.desktop"; - }; - defaultApplications = { - "text/html" = "firefox.desktop"; - "text/plain" = "vim.desktop"; - "application/plain" = "zathura.desktop"; - }; - }; userDirs = { download ="\$HOME/tmp"; music = "\$HOME/lib/music"; diff --git a/xdg.nix b/xdg.nix new file mode 100644 index 0000000..75b4698 --- /dev/null +++ b/xdg.nix @@ -0,0 +1,34 @@ +{ config, pkgs, lib, ... }: +let + apps = { + "x-scheme-handler/mailto" = "userapp-Thunderbird-PB7NI0.desktop"; + "message/rfc822" = "userapp-Thunderbird-PB7NI0.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "x-scheme-handler/ftp" = "firefox.desktop"; + "x-scheme-handler/chrome" = "firefox.desktop"; + "text/html" = "firefox.desktop"; + "application/x-extension-htm" = "firefox.desktop"; + "application/x-extension-html" = "firefox.desktop"; + "application/x-extension-shtml" = "firefox.desktop"; + "application/xhtml+xml" = "firefox.desktop"; + "application/x-extension-xhtml" = "firefox.desktop"; + "application/x-extension-xht" = "firefox.desktop"; + "text/plain" = "vim.desktop"; + "application/pdf" = "org.pwmt.zathura.desktop"; + }; +in { + xdg = { + enable = true; + mimeApps = { + enable = true; + associations.added = apps; + defaultApplications = apps; + }; + }; + home.packages = with pkgs; [ + firefox-bin + xdg_utils + zathura + ]; +}