Make sourcing profile optional
This commit is contained in:
27
nix/TODO.md
27
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
|
||||
|
||||
|
||||
@@ -24,5 +24,9 @@
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.ghostty.terminfo
|
||||
];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
programs.zsh.profileExtra = ''
|
||||
source $HOME/.profile
|
||||
'';
|
||||
dot.sh.sourceProfile = true;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.dot.sh;
|
||||
in
|
||||
{
|
||||
options.dot.sh = {
|
||||
sourceProfile = lib.mkEnableOption "sourcing of $HOME/.profile in zsh profileExtra";
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
@@ -52,7 +60,7 @@
|
||||
unsetopt beep
|
||||
'';
|
||||
|
||||
profileExtra = ''
|
||||
profileExtra = lib.mkIf cfg.sourceProfile ''
|
||||
source $HOME/.profile
|
||||
'';
|
||||
};
|
||||
@@ -96,4 +104,5 @@
|
||||
home.shellAliases = {
|
||||
lst = "lsd --tree";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user