{ lib, config, pkgs, ... }:
let
  userName = "luci";
  fullName = "Luci NAS";
  email = "luci@fosscat.com";
in
{
  home.username = userName;
  home.homeDirectory = "/home/${userName}";

  programs.home-manager.enable = true;

  home.stateVersion = "23.11"; # Please read the comment before changing.

  fonts.fontconfig.enable = true;
  home.packages = with pkgs; [
    helix
    ghostty
    jq

    #
    # Better Unix
    #
    bat
    duf
    fd
    fzf
    lsd
    ripgrep
    tre-command
    gtop
    htop
    neofetch

    # Normies
    unzip

    imv
    mpv
    ffmpeg
  ];

  home.file."${config.xdg.configHome}" = {
    source = ../../dotfiles;
    recursive = true;
  };

  # Copy radicale pass file
  home.file."${config.xdg.configHome}/radicale" = {
    source = ../radicale;
    recursive = true;
  };

  home.sessionVariables = {
    EDITOR = "hx";
  };

  # Git setup
  programs.git = {
      enable = true;
      settings = {
        user.name = fullName;
        user.email = email;
        init.defaultBranch = "main";
        pull.ff = "only";
      };
  };

  programs = {
    direnv = {
      enable = true;
      enableZshIntegration = true; # see note on other shells below
      nix-direnv.enable = true;
    };
    bash.enable = true; # see note on other shells below
  };

  # Zsh setup
  programs.zsh = {
      enable = true;
      oh-my-zsh = {
          enable = true;
          plugins = [ "git" ];
          theme = "dieter";
      };
      initContent = ''
          eval "$(direnv hook zsh)"

          alias ls="lsd"
          alias l="lsd --almost-all --long"
          alias llm="lsd --timesort --long"
          alias lS="lsd --oneline --classic"
          alias lt="lsd --tree --depth=2"
          alias grep="rg"
       '';
  };

}
