diff --git a/nix/homeModules/common/sioyek.nix b/nix/homeModules/common/sioyek.nix index 6547d74d..93ee594d 100644 --- a/nix/homeModules/common/sioyek.nix +++ b/nix/homeModules/common/sioyek.nix @@ -3,6 +3,9 @@ lib, ... }: +let + cfg = config.programs.sioyek; +in { programs.sioyek = { bindings = { @@ -28,10 +31,15 @@ config.should_launch_new_window = "1"; }; - xdg.mimeApps = lib.mkIf config.programs.sioyek.enable { - enable = true; - defaultApplications = { - "application/pdf" = [ "sioyek.desktop" ]; + xdg.mimeApps = + let + associations = { + "application/pdf" = [ "sioyek.desktop" ]; + }; + in + lib.mkIf cfg.enable { + enable = true; + associations.added = associations; + defaultApplications = associations; }; - }; }