diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2013-09-14 13:05:11 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2013-09-14 13:05:11 +0200 |
commit | 0192c027203efa9b7b4d6516d8d5ae322e76c6bd (patch) | |
tree | 0d8cbcbad7a891f9705650678c7c44b6e3d77aa1 | |
parent | 3a1024478a77c8a662ff8d8b55e2f117e9c94e2f (diff) | |
download | nixlib-0192c027203efa9b7b4d6516d8d5ae322e76c6bd.tar nixlib-0192c027203efa9b7b4d6516d8d5ae322e76c6bd.tar.gz nixlib-0192c027203efa9b7b4d6516d8d5ae322e76c6bd.tar.bz2 nixlib-0192c027203efa9b7b4d6516d8d5ae322e76c6bd.tar.lz nixlib-0192c027203efa9b7b4d6516d8d5ae322e76c6bd.tar.xz nixlib-0192c027203efa9b7b4d6516d8d5ae322e76c6bd.tar.zst nixlib-0192c027203efa9b7b4d6516d8d5ae322e76c6bd.zip |
/etc/profile: try all nix profiles for ASPELL_CONF
Aspell can only handle one dict-dir directive and currently we hardocde that to ASPELL_CONF="dict-dir $HOME/.nix-profile/lib/aspell" This means that aspell doesn't work if it is installed to the system or default nix profile -- it only works in the user profile. With this change, aspell can be installed to any of the nix profiles. If it is installed in more than one profile, the most "local" profile wins (i.e. sysadmin can set up a default, users can override it).
-rw-r--r-- | modules/programs/bash/profile.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/programs/bash/profile.sh b/modules/programs/bash/profile.sh index 6bcd5cd87cd5..92fb06581890 100644 --- a/modules/programs/bash/profile.sh +++ b/modules/programs/bash/profile.sh @@ -56,10 +56,12 @@ for i in $NIX_PROFILES; do # !!! reverse # Mozilla plugins. export MOZ_PLUGIN_PATH=$i/lib/mozilla/plugins${MOZ_PLUGIN_PATH:+:}$MOZ_PLUGIN_PATH -done -# Search directory for Aspell dictionaries. -export ASPELL_CONF="dict-dir $HOME/.nix-profile/lib/aspell" + # Search directory for Aspell dictionaries. + if [ -d "$i/lib/aspell" ]; then + export ASPELL_CONF="dict-dir $i/lib/aspell" + fi +done # The setuid wrappers override other bin directories. export PATH=@wrapperDir@:$PATH |