feat(haskell): ghc-with-packages
All checks were successful
build / build (push) Successful in 2m59s
All checks were successful
build / build (push) Successful in 2m59s
This commit is contained in:
31
modules/home/haskell.nix
Normal file
31
modules/home/haskell.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.sydnix.haskell;
|
||||
in {
|
||||
options.sydnix.haskell.enable =
|
||||
lib.mkEnableOption "Haskell";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Convenient shorthand for quickly opening Haskell REPLs.
|
||||
programs.bash.profileExtra =
|
||||
builtins.readFile ./haskell/ghc-with-packages.sh;
|
||||
|
||||
home.file.".ghc/ghci.conf".text = ''
|
||||
:set prompt "\x1b[38;5;5mλ>\x1b[0m "
|
||||
:set prompt-cont "\x1b[38;5;5m|>\x1b[0m "
|
||||
'';
|
||||
|
||||
sydnix.impermanence.cache.directories =
|
||||
let xdg-cache-dir =
|
||||
config.home.cacheHome
|
||||
or "${config.home.homeDirectory}/.cache";
|
||||
in [
|
||||
# We don't want to rebuild Hackage simply due to a reboot, do we? }:)
|
||||
(lib.removePrefix "${config.home.homeDirectory}/"
|
||||
"${xdg-cache-dir}/cabal")
|
||||
".stack"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user