summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--system/modules/development/base.nix4
-rw-r--r--user/git/.config/git/config67
-rw-r--r--user/git/.config/git/config-satoshipay2
-rw-r--r--user/git/.config/git/gitk61
-rw-r--r--user/git/.config/git/ignore34
-rw-r--r--user/modules/git.nix73
-rw-r--r--user/modules/satoshipay.nix19
-rw-r--r--user/prefect.nix1
-rw-r--r--user/satoshipad.nix1
-rw-r--r--user/trillian.nix4
10 files changed, 95 insertions, 171 deletions
diff --git a/system/modules/development/base.nix b/system/modules/development/base.nix
index 2beed5b3..63ee5b72 100644
--- a/system/modules/development/base.nix
+++ b/system/modules/development/base.nix
@@ -1,10 +1,6 @@
 { config, pkgs, ... }:
 
 { environment.systemPackages = with pkgs; [
-    gitAndTools.gitFull
-    gitAndTools.git-extras
-    git-lfs
-
     checkbashisms
     editorconfig-core-c
     go
diff --git a/user/git/.config/git/config b/user/git/.config/git/config
deleted file mode 100644
index 63b7e678..00000000
--- a/user/git/.config/git/config
+++ /dev/null
@@ -1,67 +0,0 @@
-[user]
-	email = alan@alanpearce.eu
-	name = Alan Pearce
-	signingkey = 0xAE8625A63F6F8FD5
-[color]
-	branch = auto
-	diff = auto
-	status = auto
-	ui = true
-[pull]
-  rebase = true
-[push]
-	default = current
-  followTags = true
-[alias]
-	up = merge FETCH_HEAD
-	st = status -sb
-	ci = commit
-	br = branch
-	co = checkout
-	lasttag = "!sh -c 'git tag --sort=version:refname | grep \"^v\\?[0-9]\" | tail -n1'"
-	pending = "!sh -c 'git log --oneline --grep=\"#\" ...$(git lasttag)'"
-	lg = log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an> %Cred%d%Creset'
-	prl = log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an> %Cred%d%Creset'  --grep="#"
-	ignored = ls-files --others -i --exclude-standard
-	bump = !bmpr
-[github]
-	user = alanpearce
-[ghq "ssh://alanpearce.eu/"]
-  vcs = git
-[includeIf "gitdir:~/projects/github.com/satoshipay/"]
-  path = config-satoshipay
-[includeIf "gitdir:~/projects/gitlab.satoshipay.tech/"]
-  path = config-satoshipay
-[diff]
-	algorithm = patience
-[include]
-	path = config.local
-[rebase]
-	autosquash = true
-[rerere]
-	enabled = true
-[diff]
-  tool = icdiff
-[difftool]
-  prompt = false
-[difftool "icdiff"]
-  cmd = icdiff --line-numbers $LOCAL $REMOTE
-[diff "sopsdiffer"]
-	textconv = sops -d
-[gpg]
-	program = gpg
-
-[merge "npm-merge-driver"]
-	name = automatically merge npm lockfiles
-	driver = npx npm-merge-driver merge %A %O %B %P
-[remote]
-	autoSetupMerge = always
-[branch "master"]
-	rebase = false
-[url "ssh://git@gitlab.satoshipay.tech/"]
-	insteadOf = sp:
-[filter "lfs"]
-	clean = git-lfs clean -- %f
-	smudge = git-lfs smudge -- %f
-	process = git-lfs filter-process
-	required = true
diff --git a/user/git/.config/git/config-satoshipay b/user/git/.config/git/config-satoshipay
deleted file mode 100644
index 5fedb7d6..00000000
--- a/user/git/.config/git/config-satoshipay
+++ /dev/null
@@ -1,2 +0,0 @@
-[user]
-email = alan@satoshipay.io
\ No newline at end of file
diff --git a/user/git/.config/git/gitk b/user/git/.config/git/gitk
deleted file mode 100644
index 0eb9a033..00000000
--- a/user/git/.config/git/gitk
+++ /dev/null
@@ -1,61 +0,0 @@
-set mainfont {{Lucida Grande} 12}
-set textfont {Monaco 12}
-set uifont {{Lucida Grande} 12 bold}
-set tabstop 4
-set findmergefiles 0
-set maxgraphpct 50
-set maxwidth 16
-set cmitmode patch
-set wrapcomment none
-set autoselect 1
-set autosellen 40
-set showneartags 1
-set maxrefs 20
-set hideremotes 0
-set showlocalchanges 1
-set datetimeformat {%Y-%m-%d %H:%M:%S}
-set limitdiffs 1
-set uicolor grey85
-set want_ttk 1
-set bgcolor white
-set fgcolor black
-set uifgcolor black
-set uifgdisabledcolor #999
-set colors {green red blue magenta darkgrey brown orange}
-set diffcolors {red "#00a000" blue}
-set mergecolors {red blue green purple brown "#009090" magenta "#808000" "#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0" "#f0b070" "#ff70b0"}
-set markbgcolor #e0e0ff
-set diffcontext 3
-set selectbgcolor gray85
-set foundbgcolor yellow
-set currentsearchhitbgcolor orange
-set extdifftool opendiff
-set perfile_attrs 0
-set headbgcolor green
-set headfgcolor black
-set headoutlinecolor black
-set remotebgcolor #ffddaa
-set tagbgcolor yellow
-set tagfgcolor black
-set tagoutlinecolor black
-set reflinecolor black
-set filesepbgcolor #aaaaaa
-set filesepfgcolor black
-set linehoverbgcolor #ffff80
-set linehoverfgcolor black
-set linehoveroutlinecolor black
-set mainheadcirclecolor yellow
-set workingfilescirclecolor red
-set indexcirclecolor green
-set circlecolors {white blue gray blue blue}
-set linkfgcolor blue
-set circleoutlinecolor black
-set geometry(main) 1477x845+26+50
-set geometry(state) normal
-set geometry(topwidth) 1477
-set geometry(topheight) 300
-set geometry(pwsash0) "378 1"
-set geometry(pwsash1) "569 1"
-set geometry(botwidth) 473
-set geometry(botheight) 675
-set permviews {}
diff --git a/user/git/.config/git/ignore b/user/git/.config/git/ignore
deleted file mode 100644
index f51b56ed..00000000
--- a/user/git/.config/git/ignore
+++ /dev/null
@@ -1,34 +0,0 @@
-.git
-
-.DS_Store
-.AppleDouble
-.LSOverride
-Icon
-Desktop.ini
-
-# Thumbnails
-._*
-Thumbs.db
-
-# Emacs
-*~
-\#*\#
-/.emacs.desktop
-/.emacs.desktop.lock
-.elc
-auto-save-list
-tramp
-.\#*
-
-# zsh
-*.zwc
-
-# Org-mode
-.org-id-locations
-*_archive
-
-GPATH
-GRTAGS
-GTAGS
-
-.tern-port
diff --git a/user/modules/git.nix b/user/modules/git.nix
index a43ccadf..3c3f79bf 100644
--- a/user/modules/git.nix
+++ b/user/modules/git.nix
@@ -1,8 +1,75 @@
 { config, pkgs, ... }:
 
 {
-  xdg.configFile.git = {
-    recursive = true;
-    source = ../git/.config/git;
+  home.packages = with pkgs; [
+    gitAndTools.git-extras
+  ];
+  programs.git = {
+    enable = true;
+    userName = "Alan Pearce";
+    userEmail = "alan@alanpearce.eu";
+    extraConfig = {
+      pull = {
+        rebase = true;
+      };
+      push = {
+        default = "current";
+        followTags = true;
+      };
+      rebase = {
+        autosquash = true;
+      };
+      rerere = {
+        enable = true;
+      };
+      diff = {
+        algorithm = "patience";
+        tool = "icdiff";
+      };
+      difftool = {
+        prompt = false;
+      };
+      "difftool.icdiff" = {
+        cmd = "${pkgs.icdiff}/bin/icdiff --line-numbers $LOCAL $REMOTE";
+      };
+      "difftool.sopsdiffer" = {
+        textconf = "${pkgs.sops}/bin/sops -d";
+      };
+      "merge.npm-merge-driver" = {
+        name = "automatically merge npm lockfiles";
+        driver = "npx npm-merge-driver merge %A %O %B %P";
+      };
+      remote = {
+        autoSetupMerge = true;
+      };
+      "branch.master" = {
+        rebase = false;
+      };
+    };
+    signing = {
+      key = "0xCD4BEB92A8D46583";
+    };
+    lfs = {
+      enable = true;
+    };
+    aliases = {
+      up = "merge FETCH_HEAD";
+      st = "status -sb";
+      ci = "commit";
+      br = "branch";
+      co = "checkout";
+      lasttag = "!sh -c 'git tag --sort=version:refname | grep \"^v\\\\?[0-9]\" | tail -n1'";
+      pending = "!sh -c 'git log --oneline --grep=\"#\" ...$(git lasttag)'";
+      lg = "log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an> %Cred%d%Creset'";
+      prl = "log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an> %Cred%d%Creset'  --grep='#'";
+      ignored = "ls-files --others -i --exclude-standard";
+    };
+    ignores = [
+      ".DS_Store"
+      "*_flymake.*"
+      "*~"
+      "\#*\#"
+      ".\#*"
+    ];
   };
 }
diff --git a/user/modules/satoshipay.nix b/user/modules/satoshipay.nix
new file mode 100644
index 00000000..6feefbbb
--- /dev/null
+++ b/user/modules/satoshipay.nix
@@ -0,0 +1,19 @@
+{ config, pkgs, ... }:
+
+let
+  spGitConfig = {
+    user.email = "alan@satoshipay.io";
+  };
+in
+{
+  programs.git.includes = [
+    {
+      condition = "gitdir:~/projects/github.com/satoshipay/";
+      contents = spGitConfig;
+    }
+    {
+      condition = "gitdir:~/projects/gitlab.satoshipay.tech";
+      contents = spGitConfig;
+    }
+  ];
+}
diff --git a/user/prefect.nix b/user/prefect.nix
index a1edc55e..a6f5c3f3 100644
--- a/user/prefect.nix
+++ b/user/prefect.nix
@@ -10,6 +10,7 @@
     ./modules/i3.nix
     ./modules/nix.nix
     ./modules/rofi.nix
+    ./modules/satoshipay.nix
     ./modules/sxhkd.nix
     ./modules/tabnine.nix
     ./modules/xresources.nix
diff --git a/user/satoshipad.nix b/user/satoshipad.nix
index eab836de..790bf927 100644
--- a/user/satoshipad.nix
+++ b/user/satoshipad.nix
@@ -14,6 +14,7 @@
     ./modules/nix.nix
     ./modules/npm.nix
     ./modules/rofi.nix
+    ./modules/satoshipay.nix
     ./modules/sxhkd.nix
     ./modules/tabnine.nix
     ./modules/trezor.nix
diff --git a/user/trillian.nix b/user/trillian.nix
index 8e6c0eae..fa268f9c 100644
--- a/user/trillian.nix
+++ b/user/trillian.nix
@@ -8,8 +8,12 @@
     ./modules/gnupg.nix
     ./modules/nix.nix
     ./modules/npm.nix
+    ./modules/satoshipay.nix
     ./modules/tabnine.nix
     ./modules/trezor.nix
     ./modules/zsh.nix
   ];
+
+  # Use GPG from  GPGTools
+  programs.git.signing.gpgPath = "/usr/local/bin/gpg";
 }