feat(home-manager): service defs and fmt

fmt: reformatted using nixpkgs-fmt prettifier
mpd: created configuration
hypr: add window rules
commons: add usingMusicPlayerDaemon variable
This commit is contained in:
Zhongheng Liu 2025-01-08 14:12:29 +02:00
commit 7d88765f5d
Signed by: steven
GPG key ID: 805A28B071DAD84B
67 changed files with 633 additions and 573 deletions

View file

@ -1,9 +1,9 @@
{
pkgs,
config,
...
{ pkgs
, config
, ...
}: {
imports = [
./swaync.nix
./mpd.nix
];
}

View file

@ -0,0 +1,29 @@
{ pkgs, config, lib, ... }:
lib.mkIf config.usingMusicPlayerDaemon {
home.packages = [ pkgs.ncmpc ];
services.mpd = {
enable = true;
network.listenAddress = "any";
network.port = 6600;
extraConfig = ''
audio_output {
type "pipewire"
name "my pipewire output"
}
audio_output {
type "httpd"
name "My HTTP Stream"
encoder "vorbis" # optional, vorbis or lame
port "8000"
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
format "44100:16:1"
max_clients "5" # optional 0=no limit
}
'';
};
services.mpd-mpris = {
enable = true;
};
}

View file

@ -1,7 +1,6 @@
{
pkgs,
config,
...
{ pkgs
, config
, ...
}: {
services.swaync = {
enable = true;