Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

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 --command 'dotfiles --qumsrc'

myHaskellPackages.dotfiles expression is defined in the local nixpkgs.


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

profiles = sequence_
[ profile_git
, profile_haskell
, profile_nixpkgs
, profile_tmux
, profile_vifm
, profile_vim
, profile_zsh

which describes pretty well what is gonna be installed by running biegunka's provisioning for this environment.

All profiles are defined in Profiles.hs. Almost all of them are using dotfiles function

dotfiles :: Script Actions () -> Script Sources ()
dotfiles as = git' "" "dmalikov/dotfiles" $ def & actions .~ as

Here is an example of vim profile:

profile_vim :: Script Sources ()
profile_vim = do
  profile "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"
  profile "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"
  profile "vim/colorschemes" $
    dotfiles $ copy "configs/vim/colors/neverland-darker.vim" ".vim/colors/neverland-darker.vim"
  profile "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.