From e08f800b6dc1bc6a6a6127c12b7df72bd219d50b Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Sat, 21 Mar 2026 18:43:01 +0100 Subject: use nix --- modules/home/default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'modules/home/default.nix') diff --git a/modules/home/default.nix b/modules/home/default.nix index 1ff1c19..b9c80e5 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, lib, config, ... }: { imports = [ @@ -6,12 +6,17 @@ ./ghostty.nix ./starship.nix ./tmux.nix + ./lazygit.nix + ./twm.nix ./zsh.nix ]; home = { - username = "simenandre"; - homeDirectory = if pkgs.stdenv.isDarwin then "/Users/simenandre" else "/home/simenandre"; + 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"; }; @@ -23,10 +28,10 @@ # 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" ] '' + # 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 - ''); + ''; } -- cgit v1.2.3