From 3873ab7296915cc54f8d3689c38b5ad8a16a56dd Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 7 Apr 2025 16:35:52 -0400 Subject: [PATCH] move syncnotes to nix --- .../nmasur/presets/programs/notes/default.nix | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/platforms/home-manager/modules/nmasur/presets/programs/notes/default.nix b/platforms/home-manager/modules/nmasur/presets/programs/notes/default.nix index 4b33656..198b3cc 100644 --- a/platforms/home-manager/modules/nmasur/presets/programs/notes/default.nix +++ b/platforms/home-manager/modules/nmasur/presets/programs/notes/default.nix @@ -44,16 +44,17 @@ in programs.fish.functions = { syncnotes = { description = "Full git commit on notes"; - body = lib.getExe ( - pkgs.writers.writeFishBin "syncnotes" { - makeWrapperArgs = [ - "--prefix" - "PATH" - ":" - "${lib.makeBinPath [ pkgs.git ]}" - ]; - } (builtins.readFile ./syncnotes.fish) - ); + body = + let + git = lib.getExe pkgs.git; + in + # fish + '' + ${git} -C ${cfg.path} pull + ${git} -C ${cfg.path} add -A + ${git} -C ${cfg.path} commit -m autosync + ${git} -C ${cfg.path} push + ''; }; note = { description = "Edit or create a note";