mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 07:13:40 +00:00
Create nix-flake-update.sh
This commit is contained in:
6
Makefile
6
Makefile
@@ -21,11 +21,7 @@ rollback:
|
||||
nixos-rebuild --use-remote-sudo switch --rollback -I nixos-config="modules/machines/$(HOSTNAME)/configuration.nix"
|
||||
|
||||
update:
|
||||
nix flake update
|
||||
make
|
||||
git add .
|
||||
git commit -S -m "nix flake update: $$(TZ=UTC date '+%Y-%m-%d %H:%M:%S %Z')"
|
||||
git push
|
||||
@./nix-flake-update.sh
|
||||
|
||||
fmt:
|
||||
alejandra .
|
||||
|
9
nix-flake-update.sh
Executable file
9
nix-flake-update.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
update_msg=$(nix flake update 2>&1 | grep -v 'warning:')
|
||||
make
|
||||
git add .
|
||||
git commit -S -m "nix flake update: $(TZ=UTC date '+%Y-%m-%d %H:%M:%S %Z')
|
||||
|
||||
$update_msg"
|
||||
git push
|
Reference in New Issue
Block a user