nixos-config/modules/desktop/graphics.nix

58 lines
1.5 KiB
Nix
Raw Normal View History

2020-08-06 15:35:49 +00:00
# Being a hack fraud in "jack of all trades, master of none" thing, I also create "graphics".
# This includes tools for raster, vector, and 3D modelling.
{ config, options, lib, pkgs, ... }:
with lib;
2020-10-25 15:49:14 +00:00
let cfg = config.modules.desktop.graphics;
2020-08-06 15:35:49 +00:00
in {
2020-10-25 15:49:14 +00:00
options.modules.desktop.graphics = let
mkBoolDefault = bool:
mkOption {
type = types.bool;
default = bool;
};
in {
programmable.enable = mkBoolDefault false;
raster.enable = mkBoolDefault false;
vector.enable = mkBoolDefault false;
_3d.enable = mkBoolDefault false;
};
2020-08-06 15:35:49 +00:00
2020-08-16 08:33:44 +00:00
config = {
my.packages = with pkgs;
2020-08-06 15:35:49 +00:00
[
2020-10-25 15:49:14 +00:00
font-manager # Self-explanatory name is self-explanatory.
imagemagick7 # A command-line tool for manipulating images.
graphviz # The biz central for graphical flowcharts.
2020-08-06 15:35:49 +00:00
] ++
2020-10-25 15:49:14 +00:00
(if cfg.programmable.enable then
[
processing # A visually-oriented language with an energertic train conductor as the mascot.
]
else
[ ]) ++
2020-08-06 15:35:49 +00:00
(if cfg.raster.enable then [
2020-10-25 15:49:14 +00:00
gimp # Adobe Photoshop replacement.
krita # A good painting program useful for "pure" digital arts.
aseprite-unfree # A pixel art editor.
] else
[ ]) ++
2020-08-06 15:35:49 +00:00
2020-10-25 15:49:14 +00:00
(if cfg.vector.enable then
[
inkscape # Adobe Illustrator (or Affinity Designer) replacement.
]
else
[ ]) ++
2020-08-06 15:35:49 +00:00
(if cfg._3d.enable then [
2020-10-25 15:49:14 +00:00
blender # It's a great 3D model editor.
goxel # It's a great voxel editor.
] else
[ ]);
2020-08-06 15:35:49 +00:00
};
}