about summary refs log tree commit diff stats
path: root/modules/by-name/gi/git/aliases.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-24 18:21:22 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-24 18:21:22 +0200
commit7adbf27b250833d5fc3751d4d348037b24e30442 (patch)
tree25e54bb63acbd280c2d8f327f554ded8bf4e78cb /modules/by-name/gi/git/aliases.nix
parentfeat(modules/unison): Auto-ignore all symlinks made with `home.file` (diff)
downloadnixos-config-7adbf27b250833d5fc3751d4d348037b24e30442.tar.gz
nixos-config-7adbf27b250833d5fc3751d4d348037b24e30442.zip
refactor(modules/git): Migrate and parameterize
Diffstat (limited to '')
-rw-r--r--modules/by-name/gi/git/aliases.nix (renamed from modules/home.legacy/conf/git/aliases.nix)4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/home.legacy/conf/git/aliases.nix b/modules/by-name/gi/git/aliases.nix
index 15bf613d..96456bea 100644
--- a/modules/home.legacy/conf/git/aliases.nix
+++ b/modules/by-name/gi/git/aliases.nix
@@ -1,6 +1,6 @@
 {
   lib,
-  config,
+  defaultBranchName,
 }: {
   cmr = "commit --file .git/COMMIT_EDITMSG --edit --verbose";
 
@@ -76,7 +76,7 @@
 
   day = "!git log --stat --since '1 day ago' --author $(git config user.email)";
 
-  unpush = "push --force-with-lease origin HEAD~1:${config.programs.git.extraConfig.init.defaultBranch}";
+  unpush = "push --force-with-lease origin HEAD~1:${defaultBranchName}";
 
   wip = "!git add . && git commit --amend && git push --force-with-lease";
 }