From 73d801d7acf53d82f341f738c655fb6a2fcdcd70 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 14 Dec 2024 02:24:56 +0000 Subject: [PATCH] Add Nick Janetakis' `notes` script https://github.com/nickjj/notes https://nickjanetakis.com/blog/organize-your-text-based-notes-from-the-command-line-with-this-script --- .../home-manager/features/cli/default.nix | 1 + .../home-manager/features/cli/notes.nix | 5 +++++ nix/pkgs/default.nix | 1 + nix/pkgs/notes.nix | 21 +++++++++++++++++++ 4 files changed, 28 insertions(+) create mode 100644 nix/modules/home-manager/features/cli/notes.nix create mode 100644 nix/pkgs/notes.nix diff --git a/nix/modules/home-manager/features/cli/default.nix b/nix/modules/home-manager/features/cli/default.nix index ccb0764..3e52355 100644 --- a/nix/modules/home-manager/features/cli/default.nix +++ b/nix/modules/home-manager/features/cli/default.nix @@ -36,6 +36,7 @@ ./git.nix ./htop.nix ./lsd.nix + ./notes.nix ./pet.nix ./phpactor.nix ./ripgrep.nix diff --git a/nix/modules/home-manager/features/cli/notes.nix b/nix/modules/home-manager/features/cli/notes.nix new file mode 100644 index 0000000..1c64186 --- /dev/null +++ b/nix/modules/home-manager/features/cli/notes.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ notes ]; +} diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index 3325e49..fd069a2 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -6,6 +6,7 @@ in { build-glove80 = callPackage ./build-glove80.nix { }; custom-tmux-sessionizer = callPackage ./tmux-sessionizer.nix { }; + notes = callPackage ./notes.nix { }; notify-battery = callPackage ./notify-battery.nix { }; vimPlugins = prev.vimPlugins // { diff --git a/nix/pkgs/notes.nix b/nix/pkgs/notes.nix new file mode 100644 index 0000000..1548982 --- /dev/null +++ b/nix/pkgs/notes.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: + +pkgs.stdenv.mkDerivation rec { + pname = "notes"; + version = "0.3.0"; + + src = pkgs.fetchFromGitHub { + owner = "nickjj"; + repo = "notes"; + rev = "v${version}"; + sha256 = "gyrsTWPT8w4DsRim3jlbjvpXwX/y+7SwLaM+3LVOJdU="; + }; + + buildInputs = with pkgs; [ bash ]; + + installPhase = '' + mkdir -p $out/bin + cp $src/notes $out/bin/notes + chmod +x $out/bin/notes + ''; +}