aboutsummaryrefslogtreecommitdiffstats
path: root/modules/home/default.nix
blob: b9c80e515cca42fec23d8a1e6d5b0d9e587e46fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ pkgs, lib, config, ... }:

{
  imports = [
    ./git.nix
    ./ghostty.nix
    ./starship.nix
    ./tmux.nix
    ./lazygit.nix
    ./twm.nix
    ./zsh.nix
  ];

  home = {
    homeDirectory = lib.mkForce (
      if pkgs.stdenv.isDarwin
      then "/Users/${config.home.username}"
      else "/home/${config.home.username}"
    );
    # Do not change this after the first installation
    stateVersion = "24.11";
  };

  home.packages = with pkgs; [
    nodejs_22
  ];

  # Let home-manager manage itself
  programs.home-manager.enable = true;

  # Install Claude Code via npm
  home.activation.installClaudeCode =
    lib.hm.dag.entryAfter [ "writeBoundary" ] ''
      export PATH="${pkgs.nodejs_22}/bin:$PATH"
      npm install -g @anthropic-ai/claude-code 2>/dev/null || true
    '';
}