overload environment

1

I've recently switched across to nesting my home directory across all my machines in an svn repo, meaning that my utility scripts, configuration (irssi, vim, zsh, screen etc) as well as my .profile and so forth are easier to keep up to date across all the places I login.

I use a set of sourced .local files to override them on a per site basis as required.

As it stands, many of my scripts inherit some form of configuration, and for the most part I've been setting an environment variable in .profile, and then if needed on a per site basis overriding it in .profile.local

This works great, but are there pitfalls in having a stack of environment variables? If I take my default environment from within an X session before any of my personal configuration I have not even increased it by 50% but some of the machines I work on are low resource, am I bloating my system unneccessarily, or being needlessly paranoid?

Should I start moving this config into seperate flatfiles that are loaded as needed? This means extra infrastructure, or alternately writing a single module for storing config that all of my utilities can inherit.

richo

Posted 2010-12-30T13:22:49.467

Reputation: 359

Answers

1

I think you are being paranoid, as you say. What you describe seems like a pretty common setup among, er, "superusers". There is no penalty for setting and resetting environment variables several times (except very small execution time increase when you start a shell, of course). Heck, I have environment variables per directory.

Peter Eisentraut

Posted 2010-12-30T13:22:49.467

Reputation: 6 330

Thanks peter. I'm refactoring a bunch of code at the moment and finding myself setting a stack of necessary environemnt variables (demanded by 3rd party applications) so I suddenly don't feel so bad about using them in my applications. – richo – 2010-12-30T15:06:07.043