{ description = "journal"; outputs = { self, nixpkgs }: let pkgs = nixpkgs.legacyPackages.x86_64-linux; f = "%Y/%m"; in { packages.x86_64-linux.default = # starts nvim with 2 months of journal entries ahead and behing # nvim --cmd 'source .nvimrc' -O 2023/10 2023/11 2023/12 2024/01 pkgs.writeScriptBin "journal" '' nvim --cmd 'source .nvimrc' -O $( ${pkgs.dateutils}/bin/dateseq \ "$(date --date "2 months ago" +${f})" \ "$(date --date "2 months" +${f})" \ -i ${f} \ -f ${f} ) ''; devShell.x86_64-linux = pkgs.mkShell { nativeBuildInputs = [ self.packages.x86_64-linux.default ]; }; }; }