{ config, lib, pkgs, ... }:

let
  name = "Root";
  email = "root@fudo.org";

in {
  programs = {
    git = {
      enable = true;
      userName = name;
      userEmail = email;
      ignores = [ "*~" ];
      extraConfig = { pull = { rebase = false; }; };
    };
  };

  home = {
    file = {
      ".doom.d" = {
        source = pkgs.doom-emacs-config;
        recursive = true;
        onChange = "${pkgs.doomEmacsInit}/bin/doom-emacs-init.sh";
      };

      ".k5login" = {
        source = pkgs.writeText "niten-k5login" ''
          niten/root@FUDO.ORG
          niten/root@INFORMIS.LAND
          reaper/root@FUDO.ORG
        '';
      };
    };

    sessionVariables = {
      EDITOR = "emacsclient -t";
      ALTERNATE_EDITOR = "";

      HISTCONTROL = "ignoredups:ignorespace";
    };
  };
}