From 9f860ee6f25dbca55fe5bf2374d280932f06b4c2 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 13 Aug 2024 12:00:00 +0100 Subject: [PATCH] Experiment with `pet` for snippets https://github.com/knqyf263/pet Seen on https://youtu.be/fU8HB1cvG9w?si=-lPdL1csAB_4D6tL&t=653. --- lib/shared/home-manager.nix | 1 + lib/shared/modules/pet.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 lib/shared/modules/pet.nix diff --git a/lib/shared/home-manager.nix b/lib/shared/home-manager.nix index 9fbf147..caaa68c 100644 --- a/lib/shared/home-manager.nix +++ b/lib/shared/home-manager.nix @@ -23,6 +23,7 @@ in ./modules/direnv.nix ./modules/fzf.nix ./modules/lsd.nix + ./modules/pet.nix ./modules/phpactor.nix ./modules/ripgrep.nix ./modules/syncthing.nix diff --git a/lib/shared/modules/pet.nix b/lib/shared/modules/pet.nix new file mode 100644 index 0000000..eae5c7e --- /dev/null +++ b/lib/shared/modules/pet.nix @@ -0,0 +1,24 @@ +{ + programs.pet = { + enable = true; + + snippets = [ + { + command = "nix flake lock --update-input "; + description = "Display a log of a Git repository, showing each commit on its own line."; + output = ""; + tag = [ "git" ]; + } + + { + command = "nix flake lock --update-input opdavies-nvim"; + description = "Update a single input within a Nix flake."; + output = ""; + tag = [ + "nix" + "nix-flake" + ]; + } + ]; + }; +}