feat(desktop): move media-player config to nixos modules

This commit is contained in:
Mohammad Rafiq 2025-06-14 14:10:33 +08:00
parent e6a60c257c
commit f1c2986c5c
No known key found for this signature in database
5 changed files with 27 additions and 198 deletions

View file

@ -0,0 +1,26 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib)
mkEnableOption
mkIf
mkMerge
singleton
;
inherit (pkgs) vlc;
cfg = config.desktop.media-player;
addToHome = condition: attrs: mkIf condition { home-manager.sharedModules = singleton attrs; };
in
{
options.desktop.media-player = {
vlc.enable = mkEnableOption "";
};
config = mkMerge [
(addToHome cfg.vlc.enable { home.packages = singleton vlc; })
];
}