From ff5624d98c1fd0fa57f7a16233a11aeada5005d0 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Tue, 15 Mar 2022 08:20:18 +0100 Subject: [PATCH] feat: xdg as a separate file --- home/nixos-common.nix | 32 +------------------------------- home/xdg/default.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 31 deletions(-) create mode 100644 home/xdg/default.nix diff --git a/home/nixos-common.nix b/home/nixos-common.nix index 0863dcf..5c47e7b 100644 --- a/home/nixos-common.nix +++ b/home/nixos-common.nix @@ -38,6 +38,7 @@ ./tmux ./vitetris ./wallets + ./xdg ./zsh ]; @@ -178,37 +179,6 @@ services.network-manager-applet.enable = true; - xdg.mimeApps = { - enable = true; - defaultApplications = { - "x-scheme-handler/http" = "firefox.desktop"; - "x-scheme-handler/https" = " 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"; - "x-scheme-handler/tg" = "userapp-Telegram Desktop.desktop"; - }; - associations.added = { - "x-scheme-handler/http" = "firefox.desktop"; - "x-scheme-handler/https" = " 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"; - "x-scheme-handler/tg" = "userapp-Telegram Desktop.desktop"; - - }; - }; - dconf.settings = { "org/virt-manager/virt-manager/connections" = { "autoconnect" = [ "qemu:///system" ]; diff --git a/home/xdg/default.nix b/home/xdg/default.nix new file mode 100644 index 0000000..9bd321c --- /dev/null +++ b/home/xdg/default.nix @@ -0,0 +1,43 @@ +{ config, pkgs, ... }: + +{ + xdg.mimeApps = { + enable = true; + # desktopEntries = {}; + defaultApplications = { + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = " 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"; + + "x-scheme-handler/tg" = "userapp-Telegram Desktop.desktop"; + + "text/english" = "nvim.desktop"; + "text/plain" = "nvim.desktop"; + "text/x-makefile" = "nvim.desktop"; + "text/x-c++hdr" = "nvim.desktop"; + "text/x-c++src" = "nvim.desktop"; + "text/x-chdr" = "nvim.desktop"; + "text/x-csrc" = "nvim.desktop"; + "text/x-java" = "nvim.desktop"; + "text/x-moc" = "nvim.desktop"; + "text/x-pascal" = "nvim.desktop"; + "text/x-tcl" = "nvim.desktop"; + "text/x-tex" = "nvim.desktop"; + "application/x-shellscript" = "nvim.desktop"; + "text/x-c" = "nvim.desktop"; + "text/x-c++" = "nvim.desktop"; + + }; + associations.added = { + "x-scheme-handler/tg" = "userapp-Telegram Desktop.desktop"; + + }; + }; +}