diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-20 17:02:18 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-22 18:34:18 +0200 |
commit | 65e649254aa406277f5e8b99adf1114e6ac373ca (patch) | |
tree | b51839ed7774c3a08af9788c24837887577461af /nixops/modules/mpd/default.nix | |
parent | 42fa50f1fa75f62c6e9cada076860196e8185641 (diff) | |
download | Nix-65e649254aa406277f5e8b99adf1114e6ac373ca.tar.gz Nix-65e649254aa406277f5e8b99adf1114e6ac373ca.tar.zst Nix-65e649254aa406277f5e8b99adf1114e6ac373ca.zip |
Upgrade MPD to 0.21.7, and move mpd secrets to secure location
Fixes https://git.immae.eu/mantisbt/view.php?id=122
Diffstat (limited to 'nixops/modules/mpd/default.nix')
-rw-r--r-- | nixops/modules/mpd/default.nix | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/nixops/modules/mpd/default.nix b/nixops/modules/mpd/default.nix index d59a34c..9e1715b 100644 --- a/nixops/modules/mpd/default.nix +++ b/nixops/modules/mpd/default.nix | |||
@@ -1,20 +1,31 @@ | |||
1 | { lib, pkgs, config, myconfig, mylibs, ... }: | 1 | { lib, pkgs, config, myconfig, mylibs, ... }: |
2 | { | 2 | { |
3 | config = { | 3 | config = { |
4 | nixpkgs.overlays = [ (self: super: rec { | ||
5 | mpd = (self.callPackage ./mpd.nix {}).mpd; | ||
6 | }) ]; | ||
4 | deployment.keys = { | 7 | deployment.keys = { |
5 | mpd = { | 8 | mpd = { |
6 | permissions = "0400"; | 9 | permissions = "0400"; |
7 | text = myconfig.env.mpd.password; | 10 | text = myconfig.env.mpd.password; |
8 | }; | 11 | }; |
12 | mpd-config = { | ||
13 | permissions = "0400"; | ||
14 | user = "mpd"; | ||
15 | group = "mpd"; | ||
16 | text = '' | ||
17 | password "${myconfig.env.mpd.password}@read,add,control,admin" | ||
18 | ''; | ||
19 | }; | ||
9 | }; | 20 | }; |
10 | networking.firewall.allowedTCPPorts = [ 6600 ]; | 21 | networking.firewall.allowedTCPPorts = [ 6600 ]; |
11 | users.users.mpd.extraGroups = [ "wwwrun" ]; | 22 | users.users.mpd.extraGroups = [ "wwwrun" "keys" ]; |
12 | services.mpd = { | 23 | services.mpd = { |
13 | enable = true; | 24 | enable = true; |
14 | network.listenAddress = "any"; | 25 | network.listenAddress = "any"; |
15 | musicDirectory = myconfig.env.mpd.folder; | 26 | musicDirectory = myconfig.env.mpd.folder; |
16 | extraConfig = '' | 27 | extraConfig = '' |
17 | password "${myconfig.env.mpd.password}@read,add,control,admin" | 28 | include "/run/keys/mpd-config" |
18 | audio_output { | 29 | audio_output { |
19 | type "null" | 30 | type "null" |
20 | name "No Output" | 31 | name "No Output" |