git: populate with sane.fs instead of home-manager

This commit is contained in:
Colin 2023-01-27 07:55:38 +00:00
parent 76c0c3dc6a
commit aee928dac0
2 changed files with 16 additions and 16 deletions

View File

@ -1,20 +1,19 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, sane-lib, ... }:
let
mkCfg = lib.generators.toINI { };
in
lib.mkIf config.sane.home-manager.enable
{
home-manager.users.colin.programs.git = {
enable = true;
userName = "colin";
userEmail = "colin@uninsane.org";
aliases = { co = "checkout"; };
extraConfig = {
# difftastic docs:
# - <https://difftastic.wilfred.me.uk/git.html>
diff.tool = "difftastic";
difftool.prompt = false;
"difftool \"difftastic\"".cmd = ''${pkgs.difftastic}/bin/difft "$LOCAL" "$REMOTE"'';
# now run `git difftool` to use difftastic git
};
};
sane.fs."/home/colin/.config/git/config" = sane-lib.fs.wantedText (mkCfg {
user.name = "Colin";
user.email = "colin@uninsane.org";
alias.co = "checkout";
# difftastic docs:
# - <https://difftastic.wilfred.me.uk/git.html>
diff.tool = "difftastic";
difftool.prompt = false;
"difftool \"difftastic\"".cmd = ''${pkgs.difftastic}/bin/difft "$LOCAL" "$REMOTE"'';
# now run `git difftool` to use difftastic git
});
}

View File

@ -205,6 +205,7 @@ let
fd
file
gawk
git
gptfdisk
hdparm
htop