summaryrefslogtreecommitdiffstats
path: root/lass/2configs/radio.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lass/2configs/radio.nix')
-rw-r--r--lass/2configs/radio.nix19
1 files changed, 11 insertions, 8 deletions
diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix
index d67d970f8..88899c554 100644
--- a/lass/2configs/radio.nix
+++ b/lass/2configs/radio.nix
@@ -10,7 +10,7 @@ let
source-password = import <secrets/icecast-source-pw>;
add_random = pkgs.writeDashBin "add_random" ''
- ${pkgs.mpc_cli}/bin/mpc add "$(${pkgs.mpc_cli}/bin/mpc ls | shuf -n1)"
+ ${pkgs.mpc_cli}/bin/mpc add "$(${pkgs.mpc_cli}/bin/mpc ls the_playlist/music | grep '\.ogg$' | shuf -n1)"
'';
skip_track = pkgs.writeDashBin "skip_track" ''
@@ -57,7 +57,7 @@ in {
services.mpd = {
enable = true;
group = "radio";
- musicDirectory = "/home/radio/the_playlist/music";
+ musicDirectory = "/home/radio/music";
extraConfig = ''
log_level "default"
auto_update "yes"
@@ -248,10 +248,13 @@ in {
alias ${html};
'';
};
- krebs.syncthing.folders = [
- { id = "the_playlist"; path = "/home/radio/music/the_playlist"; peers = [ "mors" "phone" "prism" ]; }
- ];
- lass.ensure-permissions = [
- { folder = "/home/radio/music/the_playlist"; owner = "radio"; group = "syncthing"; }
- ];
+ krebs.syncthing.folders."the_playlist" = {
+ path = "/home/radio/music/the_playlist";
+ peers = [ "mors" "phone" "prism" ];
+ };
+ krebs.permown."/home/radio/music/the_playlist" = {
+ owner = "radio";
+ group = "syncthing";
+ umask = "0002";
+ };
}