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