diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-10-16 17:40:07 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-10-16 20:20:45 +0200 |
commit | 4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0 (patch) | |
tree | 9a7ede9ac3f1899074e9ef568a447f883191d3b5 /modules/private/mpd.nix | |
parent | da30ae4ffdd153a1eb32fb86f9ca9a65aa19e4e2 (diff) | |
download | Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.tar.gz Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.tar.zst Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.zip |
Use attrs for secrets instead of lists
Diffstat (limited to 'modules/private/mpd.nix')
-rw-r--r-- | modules/private/mpd.nix | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/private/mpd.nix b/modules/private/mpd.nix index f2e87bb..7fa8fe9 100644 --- a/modules/private/mpd.nix +++ b/modules/private/mpd.nix | |||
@@ -5,22 +5,20 @@ | |||
5 | services.duplyBackup.profiles.mpd = { | 5 | services.duplyBackup.profiles.mpd = { |
6 | rootDir = "/var/lib/mpd"; | 6 | rootDir = "/var/lib/mpd"; |
7 | }; | 7 | }; |
8 | secrets.keys = [ | 8 | secrets.keys = { |
9 | { | 9 | "mpd" = { |
10 | dest = "mpd"; | ||
11 | permissions = "0400"; | 10 | permissions = "0400"; |
12 | text = config.myEnv.mpd.password; | 11 | text = config.myEnv.mpd.password; |
13 | } | 12 | }; |
14 | { | 13 | "mpd-config" = { |
15 | dest = "mpd-config"; | ||
16 | permissions = "0400"; | 14 | permissions = "0400"; |
17 | user = "mpd"; | 15 | user = "mpd"; |
18 | group = "mpd"; | 16 | group = "mpd"; |
19 | text = '' | 17 | text = '' |
20 | password "${config.myEnv.mpd.password}@read,add,control,admin" | 18 | password "${config.myEnv.mpd.password}@read,add,control,admin" |
21 | ''; | 19 | ''; |
22 | } | 20 | }; |
23 | ]; | 21 | }; |
24 | networking.firewall.allowedTCPPorts = [ 6600 ]; | 22 | networking.firewall.allowedTCPPorts = [ 6600 ]; |
25 | users.users.mpd.extraGroups = [ "wwwrun" "keys" ]; | 23 | users.users.mpd.extraGroups = [ "wwwrun" "keys" ]; |
26 | systemd.services.mpd.serviceConfig.RuntimeDirectory = "mpd"; | 24 | systemd.services.mpd.serviceConfig.RuntimeDirectory = "mpd"; |