testing some stuff
This commit is contained in:
parent
ebcdc49ea1
commit
b55175a527
3 changed files with 60 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
||||||
../../moduler/uptime-kuma.nix
|
../../moduler/uptime-kuma.nix
|
||||||
../../moduler/services/monitoring
|
../../moduler/services/monitoring
|
||||||
../../moduler/services/headscale
|
../../moduler/services/headscale
|
||||||
|
../../moduler/services/mpd
|
||||||
../../moduler/services/actual
|
../../moduler/services/actual
|
||||||
../../moduler/services/forgejo
|
../../moduler/services/forgejo
|
||||||
# ../../moduler/wastring.nix
|
# ../../moduler/wastring.nix
|
||||||
|
@ -35,6 +36,10 @@
|
||||||
mode = "0440";
|
mode = "0440";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mpd = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
forgejo = {
|
forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
angryipscanner
|
angryipscanner
|
||||||
|
|
||||||
# TUI
|
# TUI
|
||||||
gurk-rs
|
mpc
|
||||||
|
|
||||||
# Browsers
|
# Browsers
|
||||||
librewolf
|
librewolf
|
||||||
|
|
54
moduler/services/mpd/default.nix
Normal file
54
moduler/services/mpd/default.nix
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
mpd = {
|
||||||
|
enable = mkEnableOption "enables MPD";
|
||||||
|
port = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
default = 6600;
|
||||||
|
description = "The port that MPD is served on.";
|
||||||
|
};
|
||||||
|
httpPort = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
default = 8006;
|
||||||
|
description = "The port that MPD is served on.";
|
||||||
|
};
|
||||||
|
musicDir = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "/home/fw/Music";
|
||||||
|
description = "the path to the Music";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = mkMerge [
|
||||||
|
(mkIf config.mpd.enable {
|
||||||
|
services.mpd = {
|
||||||
|
enable = true;
|
||||||
|
user = "fw";
|
||||||
|
group = "users";
|
||||||
|
network = {
|
||||||
|
port = config.mpd.port;
|
||||||
|
listenAddress = "any";
|
||||||
|
};
|
||||||
|
musicDirectory = config.mpd.musicDir;
|
||||||
|
extraConfig = ''
|
||||||
|
audio_output {
|
||||||
|
type "httpd"
|
||||||
|
name "My HTTP Stream"
|
||||||
|
encoder "vorbis" # or "mp3" if you have lame installed
|
||||||
|
port "${toString config.mpd.httpPort}" # default HTTP port
|
||||||
|
bind_to_address "0.0.0.0" # listen on all network interfaces
|
||||||
|
quality "5.0" # Ogg Vorbis quality
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue