diff --git a/nix/TODO.md b/nix/TODO.md index 2d2fa55..445de13 100644 --- a/nix/TODO.md +++ b/nix/TODO.md @@ -19,25 +19,6 @@ This file tracks remaining tasks and known issues for the NixOS configuration. ## Medium Priority -### Custom Packages - -The following packages need to be integrated or replaced: - -- [ ] **claude-code** - - Check if available in nixpkgs - - If custom: create derivation in `packages/claude-code.nix` - - Or use alternative package manager (npm, pip, cargo) - -- [ ] **opencode** - - Check if available in nixpkgs - - If custom: create derivation in `packages/opencode.nix` - - Or use alternative package manager - -- [ ] **gemini-cli** - - Check if available in nixpkgs - - If custom: create derivation in `packages/gemini-cli.nix` - - Or use alternative package manager - ### Tmux Configuration - [ ] Update note popup keybindings (C-n, C-p) with correct NixOS paths @@ -101,16 +82,16 @@ initLua = builtins.concatStringsSep "\n" [ ### Profile Loading -The shell configuration includes: +The shell configuration is now configurable via `dot.sh.sourceProfile`: ```nix -profileExtra = '' +profileExtra = lib.mkIf cfg.sourceProfile '' source $HOME/.profile ''; ``` -**Status**: Will fail silently if `~/.profile` doesn't exist +**Status**: Disabled by default. Only enabled for work host. -**Action**: Either create `~/.profile` or remove this line if not needed +**Action**: Verify `~/.profile` exists on hosts where `dot.sh.sourceProfile = true` is set. ## Testing Checklist diff --git a/nix/hosts/home/nixos/configuration.nix b/nix/hosts/home/nixos/configuration.nix index 47d59ed..20aa70f 100644 --- a/nix/hosts/home/nixos/configuration.nix +++ b/nix/hosts/home/nixos/configuration.nix @@ -24,5 +24,9 @@ services.openssh.enable = true; + environment.systemPackages = [ + pkgs.ghostty.terminfo + ]; + system.stateVersion = "25.11"; } diff --git a/nix/hosts/work/nix/home.nix b/nix/hosts/work/nix/home.nix index 1dfb128..d5e0f2a 100644 --- a/nix/hosts/work/nix/home.nix +++ b/nix/hosts/work/nix/home.nix @@ -14,8 +14,6 @@ home.stateVersion = "23.11"; - programs.zsh.profileExtra = '' - source $HOME/.profile - ''; + dot.sh.sourceProfile = true; } diff --git a/nix/modules/home/sh.nix b/nix/modules/home/sh.nix index b87597c..d96b1a7 100644 --- a/nix/modules/home/sh.nix +++ b/nix/modules/home/sh.nix @@ -1,99 +1,108 @@ { config, pkgs, lib, ... }: +let + cfg = config.dot.sh; +in { - programs.zsh = { - enable = true; - enableCompletion = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; + options.dot.sh = { + sourceProfile = lib.mkEnableOption "sourcing of $HOME/.profile in zsh profileExtra"; + }; - history.size = 500000; - - prezto = { + config = { + programs.zsh = { enable = true; - caseSensitive = true; - color = true; - editor = { - dotExpansion = true; - keymap = "vi"; - }; - pmodules = [ - "environment" - "terminal" - "editor" - "history" - "directory" - "spectrum" - "utility" - "completion" - "syntax-highlighting" - "history-substring-search" - "prompt" - "git" - ]; - prompt.theme = "minimal"; - syntaxHighlighting.highlighters = [ - "main" - "brackets" - "pattern" - "line" - "cursor" - "root" - ]; - tmux = { - autoStartLocal = true; - itermIntegration = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + history.size = 500000; + + prezto = { + enable = true; + caseSensitive = true; + color = true; + editor = { + dotExpansion = true; + keymap = "vi"; + }; + pmodules = [ + "environment" + "terminal" + "editor" + "history" + "directory" + "spectrum" + "utility" + "completion" + "syntax-highlighting" + "history-substring-search" + "prompt" + "git" + ]; + prompt.theme = "minimal"; + syntaxHighlighting.highlighters = [ + "main" + "brackets" + "pattern" + "line" + "cursor" + "root" + ]; + tmux = { + autoStartLocal = true; + itermIntegration = true; + }; }; + + initContent = '' + HISTCONTROL='erasedups:ignoreboth' + HISTIGNORE='&:[ ]*:exit:ls:bg:fg:history:clear' + unsetopt beep + ''; + + profileExtra = lib.mkIf cfg.sourceProfile '' + source $HOME/.profile + ''; }; - initContent = '' - HISTCONTROL='erasedups:ignoreboth' - HISTIGNORE='&:[ ]*:exit:ls:bg:fg:history:clear' - unsetopt beep - ''; + programs.fzf = { + enable = true; + enableZshIntegration = true; + }; - profileExtra = '' - source $HOME/.profile - ''; - }; + programs.lsd = { + enable = true; + enableZshIntegration = true; + }; - programs.fzf = { - enable = true; - enableZshIntegration = true; - }; + programs.zoxide = { + enable = true; + enableZshIntegration = true; + options = [ + "--cmd cd" + ]; + }; - programs.lsd = { - enable = true; - enableZshIntegration = true; - }; + programs.bat.enable = true; + programs.ripgrep.enable = true; + programs.btop.enable = true; + programs.ranger.enable = true; - programs.zoxide = { - enable = true; - enableZshIntegration = true; - options = [ - "--cmd cd" + home.packages = with pkgs; [ + fd + dust + glow + ripgrep-all + viddy + duf ]; - }; - programs.bat.enable = true; - programs.ripgrep.enable = true; - programs.btop.enable = true; - programs.ranger.enable = true; + home.sessionVariables = { + BAT_THEME = "Coldark-Cold"; + }; - home.packages = with pkgs; [ - fd - dust - glow - ripgrep-all - viddy - duf - ]; - - home.sessionVariables = { - BAT_THEME = "Coldark-Cold"; - }; - - home.shellAliases = { - lst = "lsd --tree"; + home.shellAliases = { + lst = "lsd --tree"; + }; }; }