nixos-config/modules/dev/math.nix

33 lines
792 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;
2020-10-25 15:49:14 +00:00
let cfg = config.modules.dev.math;
in {
options.modules.dev.math = let
mkEnableOption = mkOption {
2020-08-16 08:33:44 +00:00
type = types.bool;
default = false;
2020-10-25 15:49:14 +00:00
};
in {
enable = mkEnableOption;
r.enable = mkEnableOption;
2020-08-16 08:33:44 +00:00
};
config = mkIf cfg.enable {
2020-10-25 15:49:14 +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.
octaveFull # Matlab's hipster brother.
] ++
2020-08-16 08:33:44 +00:00
2020-10-25 15:49:14 +00:00
(if cfg.r.enable then [
R # Rated G for accessibility.
rstudio # It's not that kind of studio.
] else
[ ]);
2020-08-16 08:33:44 +00:00
};
}