nix-dotfiles/programs/xmonad/default.nix

20 lines
390 B
Nix
Raw Normal View History

2022-04-03 16:14:28 +02:00
{ pkgs, ... }: let
xmonadHs = pkgs.stdenv.mkDerivation {
name = "xmonad.hs";
src = ./.;
buildInputs = with pkgs; [ emacs ];
buildPhase = ''
emacs --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "xmonad.org")'
'';
installPhase = ''
cp xmonad.haskell $out
'';
};
in {
home.file.".xmonad/xmonad.hs".source = xmonadHs.outPath;
}