fixup! (desktop) Gen 490: split nixcommit into two scripts, one for committing one for pushing. also renamed nixswitch to rebuild

This commit is contained in:
pagedMov
2024-10-15 19:48:29 -04:00
parent e3ac2e4f63
commit 1441353258
3 changed files with 8 additions and 3 deletions

6
flake.lock generated
View File

@@ -825,11 +825,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1729031606, "lastModified": 1729035911,
"narHash": "sha256-jkNTTsaFqK1Fw9PZZVf8LGgTTXZCRHMxUSjRFqwcsog=", "narHash": "sha256-MD81qtqfNYzbKssBk6hmozn3sB/qR+LL1Tx8qQE6+9U=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "2476177b9e2bb9cde1393c928ba58574d6b6d78f", "rev": "64079c912fb1734bf1f06ba4754ae8a1b6fa6e25",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -27,6 +27,7 @@ let
toggle_waybar = (import ./wm-controls/toggle_waybar.nix { self = self; pkgs = pkgs;}); toggle_waybar = (import ./wm-controls/toggle_waybar.nix { self = self; pkgs = pkgs;});
rebuild = (import ./nix/rebuild.nix { host = host; self = self; pkgs = pkgs;}); rebuild = (import ./nix/rebuild.nix { host = host; self = self; pkgs = pkgs;});
nixcommit = (import ./nix/nixcommit.nix { host = host; self = self; pkgs = pkgs;}); nixcommit = (import ./nix/nixcommit.nix { host = host; self = self; pkgs = pkgs;});
nixpush = (import ./nix/nixpush.nix { self = self; pkgs = pkgs;});
in in
{ {
home.packages = [ home.packages = [
@@ -44,6 +45,7 @@ in
music music
nixcommit nixcommit
nixp nixp
nixpush
nixr nixr
rebuild rebuild
nsp nsp

View File

@@ -27,6 +27,9 @@ if [ -z "$1" ]; then
commits=$(git log origin/$(git rev-parse --abbrev-ref HEAD)..HEAD --oneline) commits=$(git log origin/$(git rev-parse --abbrev-ref HEAD)..HEAD --oneline)
if [ -n "$commits" ]; then if [ -n "$commits" ]; then
git commit --fixup HEAD git commit --fixup HEAD
echo "No commit message given"
echo "Squashing into most recent commit"
git rebase --autosquash master
else else
echo "No prior local commits to squash into, please provide a commit message" echo "No prior local commits to squash into, please provide a commit message"
exit exit