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 = {
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";