mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-08 02:31:12 +00:00
move syncnotes to nix
This commit is contained in:
parent
7b32216684
commit
3873ab7296
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user