feat(desktop): move media-player config to nixos modules
This commit is contained in:
parent
e6a60c257c
commit
f1c2986c5c
5 changed files with 27 additions and 198 deletions
|
@ -25,7 +25,6 @@ in
|
|||
terminal = lib.pantheon.mkStrOption;
|
||||
notification-daemon = lib.pantheon.mkStrOption;
|
||||
status-bar = lib.pantheon.mkStrOption;
|
||||
media-player = lib.pantheon.mkStrOption;
|
||||
enableSpotifyd = lib.mkEnableOption "";
|
||||
enableSteam = lib.mkEnableOption "";
|
||||
enableVR = lib.mkEnableOption "";
|
||||
|
|
26
modules/nixos/desktop/media-player/default.nix
Normal file
26
modules/nixos/desktop/media-player/default.nix
Normal 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; })
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue