Enhanced the configuration files to support multi-user management by introducing user options for multiple applications, including art, gaming, multimedia, and development tools. Updated existing modules to utilize these new user options, improving flexibility and maintainability in user package installations.
56 lines
1.6 KiB
Nix
56 lines
1.6 KiB
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
# Patch to libpng so that big brushes can be loaded
|
|
patched-krita = pkgs.replaceDependency {
|
|
drv = pkgs.krita;
|
|
oldDependency = pkgs.libpng;
|
|
newDependency = pkgs.libpng.overrideAttrs (old: {
|
|
patches = (old.patches or [ ]) ++ [ ../../patches/libpng.patch ];
|
|
});
|
|
};
|
|
attrValuesIf = cond: attrs: if cond then builtins.attrValues attrs else [ ];
|
|
artPackages = attrValuesIf config.my.apps.art.enable {
|
|
inherit patched-krita; # art to your heart desire!
|
|
inherit (pkgs)
|
|
eyedropper # color picker
|
|
emulsion-palette # self explanatory
|
|
gimp # the coolest bestest art program to never exist
|
|
mypaint # not the best art program
|
|
mypaint-brushes # but it's got some
|
|
mypaint-brushes1 # nice damn brushes
|
|
blender # cgi animation and sculpting
|
|
pureref # create inspiration/reference boards
|
|
;
|
|
};
|
|
gameDevPackages = attrValuesIf config.my.dev.gameDev.enable {
|
|
inherit (pkgs)
|
|
godot_4 # game development
|
|
gdtoolkit_4 # gdscript language server
|
|
;
|
|
};
|
|
in
|
|
{
|
|
options.my = {
|
|
apps.art = {
|
|
enable = lib.mkEnableOption "digital art and creative applications";
|
|
users = lib.mkOption {
|
|
type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
|
|
default = config.my.toggleUsers.apps;
|
|
description = "Users to install art packages for";
|
|
};
|
|
};
|
|
dev.gameDev.enable = lib.mkEnableOption "game development tools and engines";
|
|
};
|
|
config.users.users =
|
|
let
|
|
packages = artPackages ++ gameDevPackages;
|
|
in
|
|
inputs.self.lib.mkUserPackages lib config.my.apps.art.users packages;
|
|
}
|