blob: 1ff1c1927f020f896a1a8d8d1c6e85487251e9ed (
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
|
{ pkgs, lib, ... }:
{
imports = [
./git.nix
./ghostty.nix
./starship.nix
./tmux.nix
./zsh.nix
];
home = {
username = "simenandre";
homeDirectory = if pkgs.stdenv.isDarwin then "/Users/simenandre" else "/home/simenandre";
# 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 on Linux (on macOS it's managed by Homebrew)
home.activation.installClaudeCode = lib.mkIf (!pkgs.stdenv.isDarwin)
(lib.hm.dag.entryAfter [ "writeBoundary" ] ''
export PATH="${pkgs.nodejs_22}/bin:$PATH"
npm install -g @anthropic-ai/claude-code 2>/dev/null || true
'');
}
|