feat: add update command

This commit is contained in:
buffet 2023-08-13 19:23:02 +02:00
parent 8a2d33b909
commit 54840dc4f0
2 changed files with 6 additions and 2 deletions

View file

@ -1,6 +1,4 @@
{ {
nixConfig.commit-lockfile-summary = "chore: update";
inputs = { inputs = {
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";

View file

@ -18,6 +18,12 @@ in {
htop = "htop -t"; htop = "htop -t";
mkdir = "mkdir -p"; mkdir = "mkdir -p";
rg = "rg -S"; rg = "rg -S";
update = let
change-message = pkgs.writeScript "change-commit-message" ''
#!/bin/sh
sed -i '1s/.*/chore: update/' "$1"
'';
in "nix flake update --commit-lock-file && EDITOR=${change-message} git commit --amend";
}; };
shellOptions = [ shellOptions = [