From e61d4b9a561893ad1cc4220fa319b1d25287048a Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Wed, 2 Sep 2026 01:13:38 +0530 Subject: feat(office/calcurse): wrapped calcurse with PAGER=nvim, todos show completed - using nvim as the pager for calcurse, seems to work better - now completed todos also appear in the todos section just at the bottom --- modules/office/calcurse/default.nix | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'modules/office/calcurse/default.nix') diff --git a/modules/office/calcurse/default.nix b/modules/office/calcurse/default.nix index 619ee23..6de00cc 100644 --- a/modules/office/calcurse/default.nix +++ b/modules/office/calcurse/default.nix @@ -5,25 +5,39 @@ pkgs, ... }: +let + calcursePackage = + if config.development.nixvim.enable then + pkgs.symlinkJoin { + name = "calcurse-wrapped"; + paths = [ pkgs.calcurse ]; + nativeBuildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/calcurse --set PAGER "nvim" + ''; + meta = pkgs.calcurse.meta // { + mainProgram = "calcurse"; + }; + } + else + pkgs.calcurse; +in { options.office.calcurse = { enable = lib.mkEnableOption "Enables calcurse."; package = lib.mkOption { type = lib.types.package; readOnly = true; - default = pkgs.calcurse; + default = calcursePackage; description = "The calcurse package to use."; }; }; - config = lib.mkIf config.office.calcurse.enable { home.packages = [ config.office.calcurse.package ]; - xdg.configFile."calcurse/conf" = { source = ./conf; force = true; }; - xdg.configFile."calcurse/keys" = { source = ./keys; force = true; -- cgit v1.2.3