Add org-protocol desktop entry

This commit is contained in:
Kiana Sheibani 2024-03-01 00:26:23 -05:00
parent 1b305fa81c
commit af00fac01c
2 changed files with 25 additions and 4 deletions

View file

@ -5,10 +5,7 @@
home.stateVersion = "21.11";
imports = [ ./shell ./wayland ./password.nix ./email.nix ];
xdg.enable = true;
xdg.userDirs.enable = true;
imports = [ ./shell ./wayland ./xdg.nix ./password.nix ./email.nix ];
programs.git = {
enable = true;

24
home-manager/xdg.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs, ... }:
let
org-protocol = pkgs.writeTextDir
"/share/applications/org-protocol.desktop"
''
[Desktop Entry]
Name=Org-Protocol
Exec=emacsclient %u
Icon=emacs-icon
Type=Application
Terminal=false
MimeType=x-scheme-handler/org-protocol
'';
in {
xdg.enable = true;
xdg.userDirs.enable = true;
# Org Roam Protocol
home.packages = [ org-protocol ];
xdg.mimeApps = {
enable = true;
defaultApplications."x-scheme-handler/org-protocol" = [ "org-protocol.desktop" ];
};
}