diff --git a/nix/configuration/roles/git/default.nix b/nix/configuration/roles/git/default.nix index bbaa8f67..a032367b 100644 --- a/nix/configuration/roles/git/default.nix +++ b/nix/configuration/roles/git/default.nix @@ -16,6 +16,14 @@ let }:$PATH" exec ${package}/bin/${prog} "''${@}" ''; + git_hide = pkgs.writeShellScriptBin "git-hide" '' + git add --intent-to-add "''${@}" + git update-index --skip-worktree --assume-unchange "''${@}" + ''; + git_unhide = pkgs.writeShellScriptBin "git-unhide" '' + git update-index --no-skip-worktree --no-assume-unchange "''${@}" + git reset "''${@}" + ''; in { imports = [ ]; @@ -41,6 +49,8 @@ in { environment.systemPackages = with pkgs; [ my_git + git_hide + git_unhide ]; } (lib.mkIf (config.me.git.config != null) {