moving along wiht the refactoring

This commit is contained in:
Charlie Root 2024-07-20 13:56:02 +02:00
commit 91d4b21cdf
18 changed files with 63 additions and 180 deletions

View file

@ -4,22 +4,11 @@
pkgs,
...
}: let
cfg = config.modules.services.mpd;
cfg = config.modules.usrEnv.services.media.mpd;
inherit (config.modules.other.system) username;
inherit (lib) mkEnableOption mkIf mkOption;
inherit (lib.types) str;
inherit (lib) mkIf;
in {
options.modules.services.mpd = {
enable = mkEnableOption "mpd";
musicDirectory = mkOption {
description = "music directory for mpd";
type = str;
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [mpc-cli];
systemd.services.mpd.environment = {
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609
XDG_RUNTIME_DIR = "/run/user/1000";
@ -49,6 +38,7 @@ in {
'';
};
home-manager.users.${username} = {
home.Packages = with pkgs; [mpc-cli];
services = {
mpd-mpris = {
enable = true;

View file

@ -4,10 +4,8 @@
...
}:
with lib; let
cfg = config.modules.services.pipewire;
cfg = config.modules.system.sound;
in {
options.modules.services.pipewire.enable = mkEnableOption "pipewire";
config = mkIf cfg.enable {
hardware.pulseaudio.enable = false;
services.pipewire = {