From d8d4727e9b6417948f21376e8293c755fa10c0f1 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sun, 26 Jul 2026 12:25:13 +0530 Subject: feat: using xdg.desktopEntries inplace of lib.makeDesktopItem --- modules/security/enteauth/default.nix | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'modules/security/enteauth/default.nix') diff --git a/modules/security/enteauth/default.nix b/modules/security/enteauth/default.nix index 064f697..a883d1a 100644 --- a/modules/security/enteauth/default.nix +++ b/modules/security/enteauth/default.nix @@ -20,25 +20,8 @@ let } \ --run "echo 'password' | ${pkgs.gnome-keyring}/bin/gnome-keyring-daemon --unlock --components=secrets" - rm -rf $out/share/applications/* - - ln -s ${customDesktopItem}/share/applications/* $out/share/applications/ ''; }; - - customDesktopItem = pkgs.makeDesktopItem { - name = "enteauth"; - exec = "enteauth"; - icon = "io.ente.auth"; - comment = "End-to-end encrypted 2FA authenticator"; - desktopName = "Ente Auth"; - genericName = "2FA Authenticator"; - categories = [ - "Utility" - "Security" - ]; - terminal = false; - }; in { options.security.enteauth = { @@ -53,6 +36,20 @@ in config = lib.mkIf config.security.enteauth.enable { home.packages = [ config.security.enteauth.package ]; + xdg.desktopEntries."enteauth" = { + name = "Ente Auth"; + exec = "enteauth"; + icon = "io.ente.auth"; + comment = "End-to-end encrypted 2FA authenticator"; + genericName = "2FA Authenticator"; + categories = [ + "Utility" + "Security" + ]; + terminal = false; + type = "Application"; + }; + xdg.mimeApps.defaultApplications = { "x-scheme-handler/enteauth" = "enteauth.desktop"; }; -- cgit v1.2.3