feat: add update command
This commit is contained in:
parent
8a2d33b909
commit
54840dc4f0
2 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,4 @@
|
|||
{
|
||||
nixConfig.commit-lockfile-summary = "chore: update";
|
||||
|
||||
inputs = {
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
|
|
@ -18,6 +18,12 @@ in {
|
|||
htop = "htop -t";
|
||||
mkdir = "mkdir -p";
|
||||
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 = [
|
||||
|
|
Loading…
Reference in a new issue