~kaction/config

01a2c1155ed546d134ac0b919ae63e1a3e81555e — Dmitry Bogatov 3 months ago 148d52f
Provision ~/.gitconfig instead of embedding it into git

Embedding gitconfig into git derivation means that every Nix package
that depends on git must be rebuilt too; otherwise it would use stock
git that will complain about missing user.name and user.email

This is fine when I know exactly what I want, but for quick-and-dirty
installation of tools from pristine nixpkgs it is very distracting.

To not conflate separate concerns, temporary disable "logp" alias and
hooks directory.
4 files changed, 2 insertions(+), 6 deletions(-)

M flake.nix
M manifest/default.nix
R universe/git/gitconfig.in => manifest/user/git.conf
R universe/git/gitignore => manifest/user/gitignore
M flake.nix => flake.nix +0 -4
@@ 74,10 74,6 @@
          fasm-arch = call ./universe/fasm-arch;
          firewall = call ./universe/firewall;

          git = callPackage ./universe/git {
            # Imperfect, but compatible with old overlay-based code.
            git = pkgs.git.override { inherit (self') openssh curl; };
          };
          git-bug = callPackage ./universe/git-bug {
            inherit (pkgs.gitAndTools) git-bug;
          };

M manifest/default.nix => manifest/default.nix +2 -0
@@ 48,6 48,8 @@ let
        "/home/kaction/.config" = user-mkdir;
        "/home/kaction/.config/dbxcli" = user-mkdir;
        "/home/kaction/.config/dbxcli/auth.json" = symlink ./secret/dbx.json;
        "/home/kaction/.config/git/config" = symlink ./user/git.conf;
        "/home/kaction/.config/git/ignore" = symlink ./user/gitignore;

        "/etc/group" = symlink "${auth}/group";
        "/etc/gshadow" = { action = "unlink"; };

R universe/git/gitconfig.in => manifest/user/git.conf +0 -2
@@ 7,7 7,6 @@
[alias]
	log-fetched = log ORIG_HEAD.. --stat --no-merges
	new = !sh -c 'git log $1@{1}..$1@{0} "$@"'
	logp = !@logp@
	co = checkout
	pretend = diff --cached
	stat = !git --no-pager diff --stat


@@ 41,7 40,6 @@
[core]
	commitGraph = true
	autolf = true
	hooksPath = @githooks@
[url "ssh://git@git.sr.ht"]
	pushInsteadOf = https://git.sr.ht
[url "ssh://git@github.com"]

R universe/git/gitignore => manifest/user/gitignore +0 -0