aboutsummaryrefslogtreecommitdiffstats
path: root/modules/home/default.nix
diff options
context:
space:
mode:
authorSimen A. W. Olsen <hello@simenandre.no>2026-03-21 18:43:01 +0100
committerSimen A. W. Olsen <hello@simenandre.no>2026-03-21 18:43:01 +0100
commite08f800b6dc1bc6a6a6127c12b7df72bd219d50b (patch)
treed8946586bdda098983322316d02421c57ffb885d /modules/home/default.nix
parent1fd92fcaf3aadea1e9509f859340f57100218c41 (diff)
downloaddotfiles-e08f800b6dc1bc6a6a6127c12b7df72bd219d50b.tar.gz
dotfiles-e08f800b6dc1bc6a6a6127c12b7df72bd219d50b.zip
use nix
Diffstat (limited to 'modules/home/default.nix')
-rw-r--r--modules/home/default.nix19
1 files changed, 12 insertions, 7 deletions
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
- '');
+ '';
}