aboutsummaryrefslogtreecommitdiff
path: root/modules/private/mpd.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-12 00:24:23 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-20 04:12:27 +0100
commitab8f306d7c2c49b8116e1af7b355ed2384617ed9 (patch)
treed1061ec0436fd096de2332a892eb984c63cb125e /modules/private/mpd.nix
parent4227853a03923e04daf3dd511a4b5a1ab5d527e7 (diff)
downloadNix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.gz
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.zst
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.zip
Add specification for the private config file as a module.
Diffstat (limited to 'modules/private/mpd.nix')
-rw-r--r--modules/private/mpd.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/private/mpd.nix b/modules/private/mpd.nix
index c7e2486..1e6e666 100644
--- a/modules/private/mpd.nix
+++ b/modules/private/mpd.nix
@@ -1,4 +1,4 @@
1{ lib, pkgs, config, myconfig, ... }: 1{ lib, pkgs, config, ... }:
2{ 2{
3 options.myServices.mpd.enable = lib.mkEnableOption "enable MPD"; 3 options.myServices.mpd.enable = lib.mkEnableOption "enable MPD";
4 config = lib.mkIf config.myServices.mpd.enable { 4 config = lib.mkIf config.myServices.mpd.enable {
@@ -9,7 +9,7 @@
9 { 9 {
10 dest = "mpd"; 10 dest = "mpd";
11 permissions = "0400"; 11 permissions = "0400";
12 text = myconfig.env.mpd.password; 12 text = config.myEnv.mpd.password;
13 } 13 }
14 { 14 {
15 dest = "mpd-config"; 15 dest = "mpd-config";
@@ -17,7 +17,7 @@
17 user = "mpd"; 17 user = "mpd";
18 group = "mpd"; 18 group = "mpd";
19 text = '' 19 text = ''
20 password "${myconfig.env.mpd.password}@read,add,control,admin" 20 password "${config.myEnv.mpd.password}@read,add,control,admin"
21 ''; 21 '';
22 } 22 }
23 ]; 23 ];
@@ -32,7 +32,7 @@
32 services.mpd = { 32 services.mpd = {
33 enable = true; 33 enable = true;
34 network.listenAddress = "any"; 34 network.listenAddress = "any";
35 musicDirectory = myconfig.env.mpd.folder; 35 musicDirectory = config.myEnv.mpd.folder;
36 extraConfig = '' 36 extraConfig = ''
37 include "/var/secrets/mpd-config" 37 include "/var/secrets/mpd-config"
38 audio_output { 38 audio_output {