diff options
author | David Morgan <djm_uk@protonmail.com> | 2022-11-24 16:57:22 +0000 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2022-11-24 16:57:22 +0000 |
commit | 5205cf961f5e75788e38a774ceb13f8c5438cb4d (patch) | |
tree | b6ca4620e917bbb50c7656095b37a02ca73b8700 /nix-conf/home/otm.nix | |
parent | da3cff54f2be67d4ca64716959acf532a14e08a6 (diff) | |
download | dotfiles-5205cf961f5e75788e38a774ceb13f8c5438cb4d.tar.gz |
Read git e-mail addresses from a file
Diffstat (limited to 'nix-conf/home/otm.nix')
-rw-r--r-- | nix-conf/home/otm.nix | 9 |
1 files changed, 7 insertions, 2 deletions
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"; |