diff options
Diffstat (limited to 'nix-conf/home')
-rw-r--r-- | nix-conf/home/includes/common.nix | 3 | ||||
-rw-r--r-- | nix-conf/home/otm.nix | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/nix-conf/home/includes/common.nix b/nix-conf/home/includes/common.nix index 971aa7d..c9bd270 100644 --- a/nix-conf/home/includes/common.nix +++ b/nix-conf/home/includes/common.nix @@ -2,9 +2,9 @@ let hcr = pkgs.callPackage ./scripts/hm-changes-report.nix { inherit config pkgs; }; scr = pkgs.callPackage ./scripts/system-changes-report.nix { inherit config pkgs; }; + email = builtins.readFile "${config.home.homeDirectory}/email.txt"; in { - imports = [ ./zsh.nix ]; @@ -172,6 +172,7 @@ in programs.git = { enable = true; userName = "David Morgan"; + userEmail = email; aliases = { # difftastic logt = "!sh -c 'GIT_EXTERNAL_DIFF=\"difft --background=dark\" git log -p --ext-diff'"; diff --git a/nix-conf/home/otm.nix b/nix-conf/home/otm.nix index 667493c..71c31ab 100644 --- a/nix-conf/home/otm.nix +++ b/nix-conf/home/otm.nix @@ -1,4 +1,8 @@ { config, lib, pkgs, ... }: +let + email = builtins.readFile "${config.home.homeDirectory}/email.txt"; + otmEmail = builtins.readFile "${config.home.homeDirectory}/otm_email.txt"; +in { imports = [ ./includes/darwin.nix @@ -14,9 +18,10 @@ programs.git = { signing.signByDefault = lib.mkForce false; + userEmail = lib.mkForce otmEmail; includes = [ - { path = "~/.gitconfig-personal"; condition = "gitdir:~/src/personal/"; } - { contents = { commit.gpgSign = true; }; condition = "gitdir:~/src/personal/"; } + { contents = { commit.gpgSign = true; user.email = email; }; condition = "gitdir:~/src/personal/"; } + { contents = { commit.gpgSign = true; user.email = email; }; condition = "gitdir:~/dotfiles/"; } ]; extraConfig = { github.user = "david-morgan-otm"; |