modules: remove usrEnv

This commit is contained in:
Charlie Root 2025-03-26 19:37:50 +01:00
commit 07f42737d1
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E
12 changed files with 51 additions and 244 deletions

View file

@ -4,12 +4,28 @@
pkgs,
...
}: let
cfg = config.modules.usrEnv.services.media.mpd;
inherit (config.modules.other.system) username;
inherit (lib) mkIf;
cfg = config.modules.services.media.mpd;
inherit (config.meta.mainUser) username;
inherit (lib.modules) mkIf;
inherit (lib.types) str;
inherit (lib.options) mkOption mkEnableOption;
in {
options.modules.services = {
media = {
mpd = {
enable = mkEnableOption "mpd service";
musicDirectory = mkOption {
description = "music directory for mpd";
type = str;
default = "/home/${username}/cloud/media/Music";
};
};
};
};
config = mkIf cfg.enable {
# command line interface to mpd
environment.systemPackages = [pkgs.mpc];
systemd.services.mpd.environment = {
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609
XDG_RUNTIME_DIR = "/run/user/1000";