Move home config into modules
This commit is contained in:
parent
b08fc5a41e
commit
d5cbf61286
299 changed files with 850 additions and 698 deletions
37
modules/desktop/mpd.nix
Normal file
37
modules/desktop/mpd.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
let cfg = config.modules.desktop.mpd;
|
||||
in {
|
||||
options.modules.desktop.mpd = {
|
||||
enable = mkBoolOpt false;
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${config.user.name} = { config, ... }: {
|
||||
services.mpd =
|
||||
{
|
||||
enable = true;
|
||||
network.listenAddress = "any";
|
||||
musicDirectory = "${config.home.homeDirectory}/Nextcloud/Media/Music";
|
||||
playlistDirectory = "${config.home.homeDirectory}/Nextcloud/Playlists";
|
||||
extraConfig = ''
|
||||
max_output_buffer_size "16384"
|
||||
auto_update "yes"
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "pulse audio"
|
||||
device "pulse"
|
||||
mixer_type "hardware"
|
||||
}
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "toggle_visualizer"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:2"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue