Enhanced the configuration by introducing a custom font management system, allowing for the installation of additional fonts. Updated multimedia settings to include video editing applications, enabling users to manage multimedia and video editing packages more effectively. Removed the deprecated fonts module to streamline the configuration.
56 lines
1.5 KiB
Nix
56 lines
1.5 KiB
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.apps.multimedia;
|
|
attrValuesIf = cond: attrs: if cond then builtins.attrValues attrs else [ ];
|
|
multimediaPackages = attrValuesIf cfg.enable {
|
|
inherit (pkgs)
|
|
curtail # image compressor
|
|
easyeffects # equalizer
|
|
identity # compare images or videos
|
|
mousai # poor man shazam
|
|
shortwave # listen to world radio
|
|
tagger # tag music files
|
|
;
|
|
};
|
|
videoEditingPackages = attrValuesIf cfg.videoEditing.enable {
|
|
inherit (pkgs)
|
|
davinci-resolve
|
|
shotcut
|
|
pitivi
|
|
;
|
|
inherit (pkgs.kdePackages)
|
|
kdenlive
|
|
;
|
|
};
|
|
in
|
|
{
|
|
options.my.apps.multimedia = {
|
|
enable = lib.mkEnableOption "multimedia applications and media players";
|
|
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 multimedia packages for";
|
|
};
|
|
videoEditing = {
|
|
enable = lib.mkEnableOption "video editing 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 video editing packages for";
|
|
};
|
|
};
|
|
};
|
|
config = lib.mkIf (cfg.enable || cfg.videoEditing.enable) {
|
|
users.users = lib.mkMerge [
|
|
(inputs.self.lib.mkUserPackages lib cfg.users multimediaPackages)
|
|
(inputs.self.lib.mkUserPackages lib cfg.videoEditing.users videoEditingPackages)
|
|
];
|
|
};
|
|
}
|