diff --git a/flake.nix b/flake.nix index fce16f8..5961b70 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,4 @@ { - nixConfig.commit-lockfile-summary = "chore: update"; - inputs = { impermanence.url = "github:nix-community/impermanence"; nixos-hardware.url = "github:NixOS/nixos-hardware"; diff --git a/programs/bash.nix b/programs/bash.nix index 3307a32..674adc9 100644 --- a/programs/bash.nix +++ b/programs/bash.nix @@ -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 = [