add musicDirectory option to the mpd module
This commit is contained in:
parent
3ee3fcd293
commit
862a33d976
3 changed files with 32 additions and 3 deletions
20
hosts/chmura/acme.nix
Normal file
20
hosts/chmura/acme.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
_: {
|
||||
users.users.caddy.extraGroups = [ "acme" ];
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts."acmechallenge.jacekpoz.pl" = {
|
||||
serverAliases = [ "*.jacekpoz.pl" ];
|
||||
extraConfig = ''
|
||||
/.well-known/acme-challenge {
|
||||
root * /var/lib/acme/.challenges
|
||||
file_server
|
||||
}
|
||||
|
||||
/ {
|
||||
respond 301 https://$host$request_uri
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -209,7 +209,10 @@
|
|||
};
|
||||
services = {
|
||||
dunst.enable = true;
|
||||
mpd.enable = true;
|
||||
mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "/run/media/data/Music";
|
||||
};
|
||||
greetd = {
|
||||
enable = true;
|
||||
greeter = "gtkgreet";
|
||||
|
|
|
@ -6,14 +6,20 @@
|
|||
cfg = config.myOptions.services.mpd;
|
||||
inherit (config.myOptions.other.system) username;
|
||||
in {
|
||||
options.myOptions.services.mpd.enable = mkEnableOption "mpd";
|
||||
options.myOptions.services.mpd = {
|
||||
enable = mkEnableOption "mpd";
|
||||
musicDirectory = mkOption {
|
||||
description = "music directory for mpd";
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
services = {
|
||||
mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "~/Music";
|
||||
inherit (cfg) musicDirectory;
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
|
|
Loading…
Reference in a new issue