Major config overhaul: use custom modules, setup for multi-host config, and less boilerplate

This commit is contained in:
Emmet K
2025-02-09 16:50:26 -06:00
parent 1fa8b17b07
commit 0453901d17
303 changed files with 3560 additions and 5566 deletions

View File

@@ -0,0 +1,42 @@
{ config, lib, pkgs, ... }:
let
cfg = config.userSettings.media;
in {
options = {
userSettings.media = {
enable = lib.mkEnableOption "Enable media playback apps";
};
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
vlc
#yt-dlp_git # TODO disabled for debugging
mpv mpc
ncmpcpp
ffmpeg
];
services.mpd = rec {
enable = true;
musicDirectory = config.xdg.userDirs.music+"/Songs";
playlistDirectory = config.xdg.userDirs.music+"/Playlists";
dbFile = musicDirectory+"/mpd.db";
extraConfig = ''
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
'';
};
programs.ncmpcpp.bindings = [
{ key = "j"; command = "scroll_down"; }
{ key = "k"; command = "scroll_up"; }
{ key = "J"; command = [ "select_item" "scroll_down" ]; }
{ key = "K"; command = [ "select_item" "scroll_up" ]; }
];
};
}