2020-10-01 15:46:04 -07:00
|
|
|
# modules/desktop/media/graphics.nix
|
|
|
|
#
|
|
|
|
# The hardest part about switching to linux? Sacrificing Adobe. It really is
|
|
|
|
# difficult to replace and its open source alternatives don't *quite* cut it,
|
|
|
|
# but enough that I can do a fraction of it on Linux. For the rest I have a
|
|
|
|
# second computer dedicated to design work (and gaming).
|
|
|
|
|
|
|
|
{ config, options, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
with lib.my;
|
|
|
|
let cfg = config.modules.desktop.media.graphics;
|
2021-03-01 17:43:12 -08:00
|
|
|
configDir = config.dotfiles.configDir;
|
2020-10-01 15:46:04 -07:00
|
|
|
in {
|
|
|
|
options.modules.desktop.media.graphics = {
|
|
|
|
enable = mkBoolOpt false;
|
|
|
|
tools.enable = mkBoolOpt true;
|
|
|
|
raster.enable = mkBoolOpt true;
|
|
|
|
vector.enable = mkBoolOpt true;
|
|
|
|
sprites.enable = mkBoolOpt true;
|
2021-02-28 09:59:14 -08:00
|
|
|
models.enable = mkBoolOpt false;
|
2020-10-01 15:46:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
user.packages = with pkgs;
|
|
|
|
(if cfg.tools.enable then [
|
|
|
|
font-manager # so many damned fonts...
|
|
|
|
imagemagick # for image manipulation from the shell
|
|
|
|
] else []) ++
|
|
|
|
|
|
|
|
# replaces illustrator & indesign
|
|
|
|
(if cfg.vector.enable then [
|
2020-11-17 12:28:05 -08:00
|
|
|
unstable.inkscape
|
2020-10-01 15:46:04 -07:00
|
|
|
] else []) ++
|
|
|
|
|
|
|
|
# Replaces photoshop
|
|
|
|
(if cfg.raster.enable then [
|
|
|
|
krita
|
|
|
|
gimp
|
2020-12-19 01:31:58 -08:00
|
|
|
gimpPlugins.resynthesizer # content-aware scaling in gimp
|
2020-10-01 15:46:04 -07:00
|
|
|
] else []) ++
|
|
|
|
|
|
|
|
# Sprite sheets & animation
|
|
|
|
(if cfg.sprites.enable then [
|
|
|
|
aseprite-unfree
|
2021-02-28 09:59:14 -08:00
|
|
|
] else []) ++
|
|
|
|
|
|
|
|
# 3D modelling
|
|
|
|
(if cfg.models.enable then [
|
|
|
|
blender
|
2020-10-01 15:46:04 -07:00
|
|
|
] else []);
|
|
|
|
|
|
|
|
home.configFile = mkIf cfg.raster.enable {
|
|
|
|
"GIMP/2.10" = { source = "${configDir}/gimp"; recursive = true; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|