restore git integration

main
Brian Hicks 2021-08-22 13:32:44 -05:00
parent f772ff2f76
commit 8e2adff627
5 changed files with 16 additions and 14 deletions

View File

@ -4,6 +4,7 @@
imports = [
./alacritty
./chromium
./git
./tmux
./rofi
./xsession

View File

@ -1,5 +1,8 @@
{ pkgs, ... }:
let git-gclone = import ../pkgs/git-gclone { };
let lazygit-config =
if pkgs.stdenv.isDarwin
then "Library/Application Support/jesseduffield/lazygit/config.yml"
else ".config/jesseduffield/lazygit/config.yml";
in {
programs.git = {
enable = true;
@ -33,7 +36,7 @@ in {
};
};
ignores = [ ".direnv" ".DS_Store" ];
ignores = [ ".DS_Store" ];
delta = {
enable = true;
@ -49,7 +52,7 @@ in {
programs.gh.enable = true;
home.file."Library/Application Support/jesseduffield/lazygit/config.yml".text =
home.file."${lazygit-config}".text =
builtins.toJSON {
reporting = "off";
startupPopupVersion = 1;
@ -60,8 +63,6 @@ in {
universal.return = "q";
universal.createRebaseOptionsMenu = "M";
branches.mergeIntoCurrentBranch = "m";
commits.moveUpCommit = "<a-j>";
commits.moveDownCommit = "<a-k>";
};
gui.theme = {
@ -78,10 +79,10 @@ in {
};
};
home.packages = with pkgs; [
git-lfs
lazygit
home.packages = [
pkgs.git-lfs
pkgs.lazygit
pkgs.gitAndTools.delta
git-gclone
pkgs.git-gclone
];
}

View File

@ -27,6 +27,8 @@
configureFlags = attrs.configureFlags ++ [ "--enable-utf8proc" ];
}
);
git-gclone = final.callPackage ./pkgs/git-gclone {};
};
nixosConfigurations.torch = inputs.nixpkgs.lib.nixosSystem {

View File

@ -1,7 +1,5 @@
{ sources ? import ../../nix/sources.nix, nixpkgs ? import sources.nixpkgs { }
}:
with nixpkgs;
stdenv.mkDerivation {
{ pkgs ? import <nixpkgs> { } }:
pkgs.stdenv.mkDerivation {
name = "git-gclone";
src = ./.;
buildInputs = [ pkgs.makeWrapper ];
@ -10,7 +8,7 @@ stdenv.mkDerivation {
mkdir -p $out/bin
cp ./git-gclone.sh $out/bin/git-gclone
wrapProgram $out/bin/git-gclone --prefix PATH : ${
pkgs.lib.makeBinPath [ git ]
pkgs.lib.makeBinPath [ pkgs.git ]
}
'';
}