move syncnotes to nix

This commit is contained in:
Noah Masur 2025-04-07 16:35:52 -04:00
parent 7b32216684
commit 3873ab7296
No known key found for this signature in database

View File

@ -44,16 +44,17 @@ in
programs.fish.functions = { programs.fish.functions = {
syncnotes = { syncnotes = {
description = "Full git commit on notes"; description = "Full git commit on notes";
body = lib.getExe ( body =
pkgs.writers.writeFishBin "syncnotes" { let
makeWrapperArgs = [ git = lib.getExe pkgs.git;
"--prefix" in
"PATH" # fish
":" ''
"${lib.makeBinPath [ pkgs.git ]}" ${git} -C ${cfg.path} pull
]; ${git} -C ${cfg.path} add -A
} (builtins.readFile ./syncnotes.fish) ${git} -C ${cfg.path} commit -m autosync
); ${git} -C ${cfg.path} push
'';
}; };
note = { note = {
description = "Edit or create a note"; description = "Edit or create a note";