ctucx.git: nixfiles

ctucx' nixfiles

commit 30756aa22b4fe3c7e0562aafefde3aab72c92f20
parent eb8d2fc447e3ce5d93e3dc3635bfc9a9078acddc
Author: Leah (ctucx) <git@ctu.cx>
Date: Mon, 14 Nov 2022 13:09:40 +0100

configurations/common: update default configs for bash and git
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/configurations/common/programs/bash.nix b/configurations/common/programs/bash.nix
@@ -13,6 +13,7 @@
         enableVteIntegration = lib.mkIf pkgs.stdenv.isLinux true;
 
         historyFileSize = 999999;
+        historyControl  = [ "ignoredups" "ignorespace" ];
         historyIgnore   = [ "ls" "clear" "exit" ];
 
         shellAliases    = {

@@ -37,8 +38,6 @@
 
           reinitgit    = "rm -rf .git && git init && git add -A && git commit -m 'init'";
 
-          use          = "nix-shell -p ";
-
           zzz          = (
             if pkgs.stdenv.isLinux then
               "sleep 1 && systemctl suspend"

@@ -57,7 +56,15 @@
           nix-collect-garbage = "sudo nix-collect-garbage";
         };
 
-        bashrcExtra = lib.mkIf pkgs.stdenv.isDarwin ''
+        bashrcExtra = ''
+          use() {
+            declare -a all
+            for p in "$@"; do
+              all+=("nixpkgs#$p")
+            done
+            eval nix shell ''${all[@]}
+          }
+        '' + lib.optionalString pkgs.stdenv.isDarwin ''
           if [ "$TERM" != "dumb" ]; then
             source "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
             nullglobStatus=$(shopt -p nullglob)
diff --git a/configurations/common/programs/git.nix b/configurations/common/programs/git.nix
@@ -6,7 +6,6 @@
 
     programs = {
 #      bash.shellAliases.lazygit = "gitui";
-
       lazygit.enable = true;
       git = {
         enable    = true;

@@ -27,6 +26,11 @@
           log-gpg = "log --show-signature";
           pfusch  = "push";
         };
+
+        extraConfig = {
+          features.manyFiles = true;
+          pull.rebase        = false;
+        };
       };
     };
   };