This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

services.radio: disable reaktor2 until fixed

+1 -84
+1 -84
2configs/services/radio/default.nix
··· 57 57 echo "$file": "$link" 58 58 ''; 59 59 60 - set_irc_topic = pkgs.writeDash "set_irc_topic" '' 61 - ${pkgs.curl}/bin/curl -fsS --unix-socket /home/radio/reaktor.sock http://z/ \ 62 - -H content-type:application/json \ 63 - -d "$(${pkgs.jq}/bin/jq -n \ 64 - --arg text "$1" '{ 65 - command:"TOPIC", 66 - params:["#the_playlist",$text] 67 - }' 68 - )" 69 - ''; 70 - 71 - write_to_irc = pkgs.writeDash "write_to_irc" '' 72 - ${pkgs.curl}/bin/curl -fsSv --unix-socket /home/radio/reaktor.sock http://z/ \ 73 - -H content-type:application/json \ 74 - -d "$(${pkgs.jq}/bin/jq -n \ 75 - --arg text "$1" '{ 76 - command:"PRIVMSG", 77 - params:["#the_playlist",$text] 78 - }' 79 - )" 80 - ''; 81 - 82 60 in 83 61 { 84 62 imports = [ 85 63 ./news.nix 86 64 ./weather.nix 87 65 self.inputs.stockholm.nixosModules.acl 88 - self.inputs.stockholm.nixosModules.reaktor2 66 + # self.inputs.stockholm.nixosModules.reaktor2 89 67 ]; 90 68 91 69 users.users = { ··· 145 123 ${pkgs.jq}/bin/jq '[.icestats.source[].listeners] | add' || echo 0) 146 124 echo "$(${pkgs.coreutils}/bin/date -Is)" "$filename" | ${pkgs.coreutils}/bin/tee -a "$HISTORY_FILE" 147 125 echo "$(${pkgs.coreutils}/bin/tail -$LIMIT "$HISTORY_FILE")" > "$HISTORY_FILE" 148 - ${set_irc_topic} "playing: $filename listeners: $listeners stream: https://radio.lassul.us/radio.ogg" 149 126 ''; 150 127 MUSIC = "${music_dir}/the_playlist"; 151 128 ICECAST_HOST = "localhost"; ··· 221 198 }; 222 199 }; 223 200 224 - # allow reaktor2 to modify files 225 - systemd.services."reaktor2-the_playlist".serviceConfig.DynamicUser = lib.mkForce false; 226 - systemd.services."reaktor2-the_playlist".serviceConfig.Group = lib.mkForce "radio"; 227 - 228 - krebs.reaktor2.the_playlist = { 229 - hostname = "irc.hackint.org"; 230 - port = "6697"; 231 - useTLS = true; 232 - nick = "the_playlist"; 233 - username = "radio"; 234 - API.listen = "unix:/home/radio/reaktor.sock"; 235 - plugins = [ 236 - { 237 - plugin = "register"; 238 - config = { 239 - channels = [ 240 - "#the_playlist" 241 - "#krebs" 242 - ]; 243 - }; 244 - } 245 - { 246 - plugin = "system"; 247 - config = { 248 - workdir = config.krebs.reaktor2.the_playlist.stateDir; 249 - hooks.PRIVMSG = [ 250 - { 251 - activate = "match"; 252 - pattern = "^(?:.*\\s)?\\s*the_playlist:\\s*([0-9A-Za-z._][0-9A-Za-z._-]*)(?:\\s+(.*\\S))?\\s*$"; 253 - command = 1; 254 - arguments = [ 2 ]; 255 - commands = { 256 - skip.filename = "${skip_track}/bin/skip_track"; 257 - next.filename = "${skip_track}/bin/skip_track"; 258 - bad.filename = "${skip_track}/bin/skip_track"; 259 - 260 - good.filename = "${good_track}/bin/good_track"; 261 - nice.filename = "${good_track}/bin/good_track"; 262 - like.filename = "${good_track}/bin/good_track"; 263 - 264 - current.filename = "${print_current}/bin/print_current"; 265 - wish.filename = pkgs.writeDash "wish" '' 266 - echo "youtube-dl:$1" | ${pkgs.curl}/bin/curl -fSs http://localhost:8002/wish -d @- > /dev/null 267 - ''; 268 - wishlist.filename = pkgs.writeDash "wishlist" '' 269 - ${pkgs.curl}/bin/curl -fSs http://localhost:8002/wish | ${pkgs.jq}/bin/jq -r '.[]' 270 - ''; 271 - suggest.filename = pkgs.writeDash "suggest" '' 272 - echo "$@" >> playlist_suggest 273 - ''; 274 - }; 275 - } 276 - ]; 277 - }; 278 - } 279 - ]; 280 - }; 281 - 282 201 krebs.htgen.radio = { 283 202 port = 8001; 284 203 user = { ··· 291 210 printf 'Connection: close\r\n' 292 211 printf '\r\n' 293 212 msg=$(${skip_track}/bin/skip_track) 294 - ${write_to_irc} "$msg" 295 213 echo "$msg" 296 214 exit 297 215 ;; ··· 300 218 printf 'Connection: close\r\n' 301 219 printf '\r\n' 302 220 msg=$(${good_track}/bin/good_track) 303 - ${write_to_irc} "$msg" 304 221 echo "$msg" 305 222 exit 306 223 ;;