nixos-config/modules/dev/math.nix

32 lines
790 B
Nix
Raw Normal View History

2020-08-16 08:33:44 +00:00
# Eh... I don't really do math but hey, I occasionally create visual aids sometimes.
{ config, options, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.dev.math;
in
{
options.modules.dev.math =
let mkEnableOption = mkOption {
type = types.bool;
default = false;
}; in {
enable = mkEnableOption;
2020-08-16 08:33:44 +00:00
r.enable = mkEnableOption;
};
config = mkIf cfg.enable {
2020-08-16 08:33:44 +00:00
my.packages = with pkgs; [
gnuplot # I came for the plots.
julia # A statistics-focused languaged named after a character in an iconic fighting game.
2020-08-16 08:33:44 +00:00
octave # Matlab's hipster brother.
] ++
(if cfg.r.enable then [
R # Rated G for accessibility.
rstudio # It's not that kind of studio.
2020-08-16 08:33:44 +00:00
] else []);
};
}