From 9e57cd52df1c44097053e87bc0241851f01b605c Mon Sep 17 00:00:00 2001 From: Christian Harke Date: Fri, 20 Oct 2023 11:22:40 +0200 Subject: [PATCH] Add scripts for quick notes sync --- home/users/christian/mobile/default.nix | 11 +++++++++++ home/users/christian/mobile/scripts/pull-notes-home | 2 ++ home/users/christian/mobile/scripts/push-notes-home | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 home/users/christian/mobile/scripts/pull-notes-home create mode 100644 home/users/christian/mobile/scripts/push-notes-home diff --git a/home/users/christian/mobile/default.nix b/home/users/christian/mobile/default.nix index 9817b65d..213b50e0 100644 --- a/home/users/christian/mobile/default.nix +++ b/home/users/christian/mobile/default.nix @@ -25,5 +25,16 @@ in identities = [ logseqSshKey logseqSshPubKey ]; }; }; + + home.file = { + "bin/pull-notes-home" = { + source = ./scripts/pull-notes-home; + executable = true; + }; + "bin/push-notes-home" = { + source = ./scripts/push-notes-home; + executable = true; + }; + }; }; } diff --git a/home/users/christian/mobile/scripts/pull-notes-home b/home/users/christian/mobile/scripts/pull-notes-home new file mode 100644 index 00000000..3b727108 --- /dev/null +++ b/home/users/christian/mobile/scripts/pull-notes-home @@ -0,0 +1,2 @@ +#!/bin/sh +git pull diff --git a/home/users/christian/mobile/scripts/push-notes-home b/home/users/christian/mobile/scripts/push-notes-home new file mode 100644 index 00000000..d992f289 --- /dev/null +++ b/home/users/christian/mobile/scripts/push-notes-home @@ -0,0 +1,5 @@ +#!/bin/sh +cd ~/Documents/notes/home +git add -A +git commit -m "Sync from mobile" +git push