{ pkgs, ... }:
let
  shellAliases = {
    update-boot = "sudo nixos-rebuild boot --max-jobs 10";
    update-switch = "sudo nixos-rebuild switch --max-jobs 10";
    update-flake = "nix flake update nas-nixpkgs nas-authentik-nix nas-cosmic nas-crowdsec nas-home-manager nas-impermanence nas-lanzaboote nas-nixos-hardware nas-sops-nix --flake /etc/nixos";
  };
in
{
  home.username = "admin";

  # mjallen.home.enable = true;

  sops = {
    age.keyFile = "/home/admin/.config/sops/age/keys.txt";
    defaultSopsFile = "/etc/nixos/secrets/secrets.yaml";
    validateSopsFiles = false;
    secrets = {
      "ssh-keys-public/jallen-nas" = {
        path = "/home/admin/.ssh/id_ed25519.pub";
        mode = "0644";
      };
      "ssh-keys-private/jallen-nas" = {
        path = "/home/admin/.ssh/id_ed25519";
        mode = "0600";
      };
      "ssh-keys-public/desktop-nixos" = {
        path = "/home/admin/.ssh/authorized_keys";
        mode = "0600";
      };

      "ssh-keys-public/desktop-nixos-root" = {
        path = "/home/admin/.ssh/authorized_keys2";
        mode = "0600";
      };

      "ssh-keys-public/desktop-windows" = {
        path = "/home/admin/.ssh/authorized_keys3";
        mode = "0600";
      };

      "ssh-keys-public/macbook-macos" = {
        path = "/home/admin/.ssh/authorized_keys4";
        mode = "0600";
      };
    };
  };

  programs = {
    neovim = {
      enable = true;
      viAlias = true;
      vimAlias = true;
      defaultEditor = true;
      plugins = [
        pkgs.vimPlugins.nvim-tree-lua
        {
          plugin = pkgs.vimPlugins.vim-startify;
          config = "let g:startify_change_to_vcs_root = 0";
        }
      ];
    };

    zsh.shellAliases = shellAliases;
  };

  # services.nixai = {
  #   enable = true;
  #   mcp = {
  #     enable = true;
  #     # Optional: custom socket path (uses `$HOME` expansion)
  #     socketPath = "$HOME/.local/share/nixai/mcp.sock";
  #   };
  #   # Optional: integrate with VS Code
  #   vscodeIntegration = true;
  # };
}
