How do I set Stackage as the system default?
AFAIK cabal doesn't support a global config file. But even that won't help on its own, because afaict, you still can't turn off the configured one remote-repo
.
So, I see two approaches with obvious drawbacks.
The clean way for new users
Install the file /etc/skel/.cabal/config
to be copied to the new user accounts. However, this will not help older users.
A hacky way for all users
Set a global alias (or shell script wrapper) named cabal
which calls cabal --remote-repo=hackage.haskell.org:http://www.stackage.org/lts
.
Users can opt out of unalias
ing cabal or use a real cabal executable when using a shell script.
Users will be totally confused because cabal will tell users that he is using hackers when in fact he is using stackage.
source to share