diff --git a/home-manager/home.nix b/home-manager/home.nix index d2277a2..e42d5e9 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -61,7 +61,10 @@ username = "bryanmoy"; homeDirectory = "/home/bryanmoy"; file = { - ".ssh/allowed_signers".text = "* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPvMq/Zpl7z9G5EOv9lfI7XK+U4SnNSq9PMGU6Kv7SaC"; + ".ssh/allowed_signers".text = '' + * ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPvMq/Zpl7z9G5EOv9lfI7XK+U4SnNSq9PMGU6Kv7SaC + * ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIPIMS9BLKjX1mGPdGaREThg48e6I5+QbMbzYWV4nHoU + ''; }; }; diff --git a/modules/home-manager/git/default.nix b/modules/home-manager/git/default.nix index 1290dfa..bdf9e1a 100644 --- a/modules/home-manager/git/default.nix +++ b/modules/home-manager/git/default.nix @@ -7,15 +7,28 @@ with lib; let cfg = config.modules.git; in { - options.modules.git = {enable = mkEnableOption "git";}; + options.modules.git = { + enable = mkEnableOption "git"; + }; config = mkIf cfg.enable { programs.git = { enable = true; - userName = "Bryan Moy"; - userEmail = "dev@bryanmoy.com"; + includes = [ + { + path = "~/.dotfiles/nixos-config/modules/home-manager/git/personal.gitconfig"; + condition = "gitdir:~/.dotfiles/"; + } + { + path = "~/.dotfiles/nixos-config/modules/home-manager/git/personal.gitconfig"; + condition = "gitdir:~/PersonalProjects/"; + } + { + path = "~/.dotfiles/nixos-config/modules/home-manager/git/qonto.gitconfig"; + condition = "gitdir:~/QontoProjects/"; + } + ]; extraConfig = { init.defaultBranch = "main"; - user.signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPvMq/Zpl7z9G5EOv9lfI7XK+U4SnNSq9PMGU6Kv7SaC"; commit.gpgsign = true; tag.gpgsign = true; gpg.format = "ssh"; diff --git a/modules/home-manager/git/personal.gitconfig b/modules/home-manager/git/personal.gitconfig new file mode 100644 index 0000000..c533cc7 --- /dev/null +++ b/modules/home-manager/git/personal.gitconfig @@ -0,0 +1,4 @@ +[user] + name = Bryan Moy + email = dev@bryanmoy.com + signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPvMq/Zpl7z9G5EOv9lfI7XK+U4SnNSq9PMGU6Kv7SaC diff --git a/modules/home-manager/git/qonto.gitconfig b/modules/home-manager/git/qonto.gitconfig new file mode 100644 index 0000000..f40d1e8 --- /dev/null +++ b/modules/home-manager/git/qonto.gitconfig @@ -0,0 +1,7 @@ +[user] + name = Bryan Moy + email = bryan.moy@qonto.com + signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIPIMS9BLKjX1mGPdGaREThg48e6I5+QbMbzYWV4nHoU + +[init] + defaultBranch = "master"