mirror of
https://git.oat.zone/dark-firepit/dotfiles
synced 2024-05-11 04:36:08 +02:00
29 lines
580 B
Nix
29 lines
580 B
Nix
|
{ config, pkgs, lib, options, ... }:
|
||
|
|
||
|
with lib;
|
||
|
let
|
||
|
cfg = config.modules.dev.haskell;
|
||
|
in {
|
||
|
options.modules.dev.haskell = {
|
||
|
enable = mkOption {
|
||
|
type = types.bool;
|
||
|
default = false;
|
||
|
};
|
||
|
version = mkOption {
|
||
|
type = types.str;
|
||
|
default = "ghc8107";
|
||
|
};
|
||
|
packages = mkOption {
|
||
|
type = types.listOf types.attrs;
|
||
|
default = [ ];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
environment.systemPackages = with pkgs.haskell.packages."${cfg.version}"; [
|
||
|
ghc
|
||
|
cabal-install
|
||
|
] ++ config.modules.dev.haskell.packages;
|
||
|
};
|
||
|
}
|