Converted playerctl to a home module

This commit is contained in:
alejandro-angulo 2024-08-03 08:06:17 -07:00
parent dae4076857
commit 9fb7bb1ae1
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
4 changed files with 21 additions and 23 deletions

View file

@ -31,6 +31,7 @@
services = { services = {
swaync.enable = true; swaync.enable = true;
playerctld.enable = true;
}; };
}; };
} }

View file

@ -0,0 +1,20 @@
{
config,
lib,
pkgs,
namespace,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.services.playerctld;
in {
options.${namespace}.services.playerctld = {
enable = mkEnableOption "playerctl";
};
config = mkIf cfg.enable {
home.packages = [pkgs.playerctl];
services.playerctld.enable = true;
};
}

View file

@ -1,22 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.aa.desktop.addons.playerctl;
in {
options.aa.desktop.addons.playerctl = with types; {
enable = mkEnableOption "playerctl";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [playerctl];
aa.home.extraOptions = {
services.playerctld.enable = true;
};
};
}

View file

@ -38,7 +38,6 @@ in {
aa.desktop.addons = { aa.desktop.addons = {
alacritty.enable = true; alacritty.enable = true;
gammastep.enable = true; gammastep.enable = true;
playerctl.enable = true;
swayidle.enable = true; swayidle.enable = true;
# TODO # TODO