# users/m3tam3re/identities/private.nix — Private identity (m3tam3re).
#
# Sets git identity, jujutsu identity, and SSH match blocks for private infrastructure.
# This module is loaded when identity = "private" in mkHome.
{
  config,
  lib,
  ...
}: {
  # ── User identity ──
  home.username = lib.mkForce "m3tam3re";
  home.homeDirectory = lib.mkForce "/home/m3tam3re";

  # ── Git configuration ──
  programs.git = {
    enable = true;
    signing.format = null;
    settings = {
      user = {
        name = "m3tm3re";
        email = "p@m3ta.dev";
      };
      core.excludesfile = "~/.gitignore_global";
      init.defaultBranch = "master";
      alias = {
        st = "status";
        logd = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
      };
    };
  };

  # ── Jujutsu configuration ──
  programs.jujutsu = {
    enable = true;
    settings = {
      user = {
        email = "m@m3tam3re.com";
        name = "Sascha Koenig";
      };
    };
  };

  # ── SSH configuration ──
  programs.ssh = {
    enable = true;
    enableDefaultConfig = false;
    matchBlocks = {
      "github.com" = {
        hostname = "github.com";
        user = "m3tam3re";
        port = 22;
        identityFile = "~/.ssh/github";
      };
      "code.m3ta.dev" = {
        hostname = "code.m3ta.dev";
        user = "m3tam3re";
        identityFile = "~/.ssh/gitea";
      };
      "nikhil" = {
        hostname = "91.99.176.80";
        user = "nikhilmaddirala";
        identityFile = "~/.ssh/m3tam3re";
      };
      "lkk-nix-1" = {
        hostname = "89.58.10.189";
        user = "lkk-admin";
        identityFile = "~/.ssh/lkk-admin";
      };
      "m3-r1" = {
        hostname = "202.61.226.110";
        user = "m3tam3re";
        identityFile = "~/.ssh/m3tam3re";
      };
      "lkk-prod-test" = {
        hostname = "192.168.122.215";
        user = "root";
        identityFile = "~/.ssh/m3tam3re";
      };
      "lkk-prod-1" = {
        hostname = "192.168.0.24";
        user = "root";
        identityFile = "~/.ssh/m3tam3re";
      };
      "lkk-prod-2" = {
        hostname = "192.168.0.20";
        user = "root";
        identityFile = "~/.ssh/m3tam3re";
      };
      "m3-deck" = {
        hostname = "192.168.178.193";
        user = "m3tam3re";
        identityFile = "~/.ssh/m3tam3re";
      };
      "m3-kratos-vm" = {
        hostname = "192.168.122.43";
        user = "m3tam3re";
        identityFile = "~/.ssh/m3tam3re";
      };
      "m3-helios" = {
        hostname = "192.168.178.210";
        user = "m3tam3re";
        identityFile = "~/.ssh/m3tam3re";
      };
      "m3-ares" = {
        hostname = "192.168.1.30";
        user = "m3tam3re";
        identityFile = "~/.ssh/m3tam3re";
      };
      "m3-atlas" = {
        hostname = "152.53.85.162";
        user = "m3tam3re";
        identityFile = "~/.ssh/m3tam3re";
      };
      "m3-hermes" = {
        hostname = "204.168.229.93";
        user = "m3tam3re";
        identityFile = "~/.ssh/m3tam3re";
      };
      "m3-zelda" = {
        hostname = "95.217.189.186";
        user = "m3tam3re";
        identityFile = "~/.ssh/m3tam3re";
      };
      "m3-skynet" = {
        hostname = "m3-skynet";
        user = "admin";
        identityFile = "~/.ssh/m3tam3re";
      };
      "m3-prox-1" = {
        hostname = "192.168.1.110";
        user = "root";
        identityFile = "~/.ssh/m3tam3re";
      };
      "shp-old" = {
        hostname = "95.217.3.250";
        port = 2222;
        user = "m3tam3re";
        identityFile = "~/.ssh/self-host-playbook";
      };
      "shp-1" = {
        hostname = "95.217.189.186";
        port = 2222;
        user = "m3tam3re";
        identityFile = "~/.ssh/self-host-playbook";
      };
    };
  };
}
