Alter notes to create daily notes
Alter notes to create daily notes instead of monthly notes.
This commit is contained in:
parent
09663f6b90
commit
3e9a27874a
|
@ -7,7 +7,7 @@ let
|
|||
in
|
||||
{
|
||||
build-glove80 = callPackage ./build-glove80.nix { };
|
||||
notes = callPackage ./notes.nix { };
|
||||
notes = callPackage ./notes { };
|
||||
i3-battery-popup = callPackage ./i3-battery-popup.nix { };
|
||||
tmux-sessionizer = callPackage ./tmux-sessionizer { };
|
||||
upload-to-files = callPackage ./upload-to-files.nix { };
|
||||
|
|
13
nix/pkgs/notes/create-daily-notes.patch
Normal file
13
nix/pkgs/notes/create-daily-notes.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/notes b/notes
|
||||
index 3351903..34364bf 100755
|
||||
--- a/notes
|
||||
+++ b/notes
|
||||
@@ -14,7 +14,7 @@ set -e
|
||||
readonly NOTES_DIRECTORY="${NOTES_DIRECTORY:-${HOME}/notes}"
|
||||
readonly NOTES_EDITOR="${EDITOR}"
|
||||
|
||||
-readonly NOTES_FILE="$(date +%Y-%m).txt"
|
||||
+readonly NOTES_FILE="$(date +%Y-%m-%d).txt"
|
||||
readonly NOTES_PATH="${NOTES_DIRECTORY}/${NOTES_FILE}"
|
||||
|
||||
if [ ! -d "${NOTES_DIRECTORY}" ]; then
|
|
@ -15,9 +15,13 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [ bash ];
|
||||
|
||||
patches = [
|
||||
./create-daily-notes.patch
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $src/notes $out/bin/notes
|
||||
cp notes $out/bin/notes
|
||||
chmod +x $out/bin/notes
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue