Created
September 25, 2017 15:30
-
-
Save taktoa/2642c4f763b1c1106bb4ccd0dfd56dfb to your computer and use it in GitHub Desktop.
Example of using `callCabal2nix` to set up xmonad with a cabalized configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs }: | |
{ | |
services.windowManager.xmonad = { | |
enable = true; | |
haskellPackages = pkgs.haskellPackages.override { | |
overrides = self: super: { | |
# /path/to/mrkgnaow-xmonad is a path that contains `mrkgnaow-xmonad.cabal` | |
# you can also put an invocation of `fetchgit` or `fetchFromGitHub` there. | |
mrkgnaow-xmonad = self.callCabal2nix "mrkgnaow-xmonad" /path/to/mrkgnaow-xmonad {}; | |
}; | |
}; | |
}; | |
} | |
# Then, supposing that your mrkgnaow-xmonad cabal package exposes a module called | |
# `XMonad.Config.Mrkgnaow`, just put the following in your `~/.config/xmonad/xmonad.hs`: | |
# | |
# module Main (main) where | |
# import qualified XMonad | |
# import qualified XMonad.Config.Mrkgnaow | |
# main :: IO () | |
# main = XMonad.xmonad XMonad.Config.Mrkgnaow.config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment