Skip to content


Subversion checkout URL

You can clone with
Download ZIP
biegunka scripts to keep various environments' configuration updated
VimL Haskell Nix Shell
branch: master


dotfiles Build Status

biegunka scripts to keep various environments' configuration updated


  • >1 environments
  • configuration is stored in a template files, not in a ready-to-use format
  • provisioning by biegunka
  • CI via Travis

Why biegunka?

  • regular is not enough when number of working environments is more than 1.
  • regular is not enough when you need to remove all installed shit out of your system.
  • regular is not enough when you need to rollback all changes.
  • regular is not enough when you need some declarative syntax describing your configuration.
  • regular is not enough actually because of bash.

Biegunka could do that for you.

Another solutions

Chef and chef-solo could be helpful here with all these recipes and roles power, but I'm too lazy for writing a cookbook for every application that I have.

nix language and package manager fits our needs perfectly here. Installing nix over existed package manager and rewriting all dotfiles as a nix expressions can take much time. But it is a perfect solution for a NixOS.


There is a dotfiles.cabal project pointed at Main.hs. It compiles to a dotfiles executable. Currently I'm provisioning all these dotfiles using nix only.

$> nix-shell --run 'cabal install && dotfiles --qumsrc --force'


TODO: biegunka package depends on a unix package which is impossible to use inside a windows.


All dotfiles could be split into a number of modules. Each working environment is using only a subset of a all dotfiles stored in git repository. that it is really needed.

E.g. X-less nixos environment doesn't need no pentadactyl or mpv

namespaces = sequence_
  [ namespace_git
  , namespace_haskell
  , namespace_nixpkgs
  , namespace_tmux
  , namespace_vifm
  , namespace_vim
  , namespace_zsh

which describes pretty well what is going tbe installed by runningbiegunka`'s provisioning for this environment.

All namespaces are defined in Namespaces.hs. Almost all of them are using dotfiles function

dotfiles :: Script Actions () -> Script Sources ()
dotfiles as = git "" "dmalikov/dotfiles"

Here is an example of vim namespace:

namespace_vim :: Script Sources ()
namespace_vim = do
  namespace "vim/rc" $ do
    git_ "" ".vim/bundle/neobundle.vim"
    git "" ".vim/bundle/vim-pathogen" $
      copy "autoload/pathogen.vim" ".vim/autoload/pathogen.vim"
    dotfiles $ copy "configs/vim/vimrc" ".vimrc"
  namespace "vim/syntax" $ do
    dotfiles $ copy "configs/vim/syntax/haskell.vim" ".vim/after/syntax/haskell.vim"
    dotfiles $ copy "configs/vim/syntax/nix.vim" ".vim/after/syntax/nix.vim"
  namespace "vim/colorschemes" $
    dotfiles $ copy "configs/vim/colors/neverland-darker.vim" ".vim/colors/neverland-darker.vim"
  namespace "vim/plugins" $
    dotfiles $ copy "configs/vim/MyTabularMaps.vim" ".vim/bundle/tabular/after/plugin/MyTabularMaps.vim"

It's just a bunch of script sources with a type Script Sources ().


Working with a number of different environments produce a lot of interesting problems. E.g. some parts of a configuration files become dependant on a particular environment.

I.e. configuring tmux with a different default shell path.


set -g default-command $$
set -g default-shell $$

Tmux configuration is defined in a Defaults.hs:

data Tmux = Tmux
  { shell :: String
  } deriving (Data, Typeable)

Different environments has a different Tmux settings:

X220 (R.I.P.):

configs :: Configs
configs = def
  , tmux = def
    { shell = "/bin/zsh"


configs :: Configs
configs = def
  , tmux = def
    { shell = "~/.nix-profile/bin/zsh"
Something went wrong with that request. Please try again.