1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

feat(mpd): split playlists

This commit is contained in:
2020-10-29 07:54:57 +01:00
parent d7727433fd
commit b6e77f77af
3 changed files with 105 additions and 41 deletions

View File

@@ -1,12 +1,16 @@
{ config, pkgs, lib, ... }:
let
radioStations = import <niveum/lib/radio-stations.nix>;
radioStationsFile = pkgs.writeText "stations" (lib.concatStringsSep "\n" radioStations);
playlists = import <niveum/lib/mpd-playlists.nix>;
playlistFiles = lib.mapAttrs (name: streams: pkgs.writeText name (lib.concatStringsSep "\n" streams)) playlists;
linkPlaylist = name: file: ''
ln -sfn ${toString file} /var/lib/mpd/playlists/${name}.m3u
'';
linkPlaylists = lib.concatStringsSep "\n" (lib.mapAttrsToList linkPlaylist playlistFiles);
in
{
system.activationScripts.webradio = ''
install -d /var/lib/mpd/playlists
ln -sfn ${toString radioStationsFile} /var/lib/mpd/playlists/webradio.m3u
${linkPlaylists}
'';
services.mpd.enable = true;

98
lib/mpd-playlists.nix Normal file
View File

@@ -0,0 +1,98 @@
{
SomaFM = [
"http://ice1.somafm.com/specials-128-aac" # For Halloween: Dark industrial/ambient music for tortured souls.
"http://ice5.somafm.com/deepspaceone-128-aac" # Deep ambient electronic, experimental and space music. For inner and outer space exploration.
"http://ice5.somafm.com/beatblender-128-aac" # A late night blend of deep-house and downtempo chill.
"http://ice5.somafm.com/defcon-128-aac" # Music for Hacking. The DEF CON Year-Round Channel.
"http://ice5.somafm.com/sonicuniverse-128-aac" # Transcending the world of jazz with eclectic, avant-garde takes on tradition.
"http://ice5.somafm.com/reggae-128-aac" # NEW! Reggae, Ska, Rocksteady classic and deep tracks.
"http://ice6.somafm.com/7soul-128-aac" # Vintage soul tracks from the original 45 RPM vinyl.
"http://ice3.somafm.com/seventies-128-aac" # Mellow album rock from the Seventies. Yacht not required.
"http://ice3.somafm.com/u80s-128-aac" # Early 80s UK Synthpop and a bit of New Wave.
"http://ice2.somafm.com/secretagent-128-aac" # The soundtrack for your stylish, mysterious, dangerous life. For Spies and PIs too!
"http://ice5.somafm.com/thistle-128-aac" # Exploring music from Celtic roots and branches
"http://ice5.somafm.com/fluid-128-aac" # Drown in the electronic sound of instrumental hiphop, future soul and liquid trap.
"http://ice3.somafm.com/poptron-128-aac" # Electropop and indie dance rock with sparkle and pop.
"http://ice3.somafm.com/illstreet-128-aac" # Classic bachelor pad, playful exotica and vintage music of tomorrow.
"http://ice3.somafm.com/bagel-128-aac" # What alternative rock radio should sound like. [explicit]
"http://ice3.somafm.com/indiepop-128-aac" # New and classic favorite indie pop tracks.
"http://ice3.somafm.com/digitalis-128-aac" # Digitally affected analog rock to calm the agitated heart.
"http://ice5.somafm.com/folkfwd-128-aac" # Indie Folk, Alt-folk and the occasional folk classics.
"http://ice5.somafm.com/cliqhop-128-aac" # Blips'n'beeps backed mostly w/beats. Intelligent Dance Music.
"http://ice2.somafm.com/dubstep-128-aac" # Dubstep, Dub and Deep Bass. May damage speakers at high volume.
"http://ice2.somafm.com/suburbsofgoa-128-aac" # Desi-influenced Asian world beats and beyond.
"http://ice2.somafm.com/sf1033-128-aac" # Ambient music mixed with the sounds of San Francisco public safety radio traffic.
"http://ice5.somafm.com/missioncontrol-128-aac" # Celebrating NASA and Space Explorers everywhere.
"http://ice5.somafm.com/scanner-128-aac" # San Francisco Public Safety Scanner Feed
"http://ice2.somafm.com/metal-128-mp3" # From black to doom, prog to sludge, thrash to post, stoner to crossover, punk to industrial.
"http://ice2.somafm.com/covers-128-aac" # Just covers. Songs you know by artists you don't. We've got you covered.
"http://ice5.somafm.com/brfm-128-aac" # From the Playa to the world, for the annual Burning Man festival.
"http://ice1.somafm.com/live-128-aac" # Special Live Events and rebroadcasts of past live events
"http://ice1.somafm.com/xmasinfrisko-128-aac" # SomaFM's wacky and eclectic holiday mix. Not for the easily offended.
"http://ice2.somafm.com/christmas-128-aac" # Chilled holiday grooves and classic winter lounge tracks. (Kid and Parent safe!)
"http://ice2.somafm.com/xmasrocks-128-aac" # Have your self an indie/alternative holiday season!
"http://ice6.somafm.com/jollysoul-128-aac" # Where we cut right to the soul of the season.
"http://ice2.somafm.com/vaporwaves-128-aac" # All Vaporwave. All the time.
"http://ice6.somafm.com/dronezone-128-aac" # Served best chilled, safe with most medications. Atmospheric textures with minimal beats.
"http://ice5.somafm.com/groovesalad-128-aac" # A nicely chilled plate of ambient/downtempo beats and grooves.
"http://ice2.somafm.com/gsclassic-128-aac" # The classic (early 2000s) version of a nicely chilled plate of ambient/downtempo beats and grooves.
"http://ice5.somafm.com/bootliquor-128-aac" # Americana Roots music for Cowhands, Cowpokes and Cowtippers
"http://ice2.somafm.com/lush-128-aac" # Sensuous and mellow vocals, mostly female, with an electronic influence.
"http://ice1.somafm.com/silent-128-aac"
"http://ice6.somafm.com/spacestation-128-aac" # Tune in, turn on, space out. Spaced-out ambient and mid-tempo electronica.
"http://ice2.somafm.com/thetrip-128-aac" # Progressive house / trance. Tip top tunes.
];
"DI.FM" = [
"http://prem2.di.fm:80/bassline_hi?4527f2ba1755917"
"http://prem2.di.fm:80/breaks_hi?4527f2ba1755917"
"http://prem2.di.fm:80/chillout_hi?4527f2ba1755917"
"http://prem2.di.fm:80/classicelectronica_hi?4527f2ba1755917"
"http://prem2.di.fm:80/deephouse_hi?4527f2ba1755917"
"http://prem2.di.fm:80/djmixes_hi?4527f2ba1755917"
"http://prem2.di.fm:80/drumandbass_hi?4527f2ba1755917"
"http://prem2.di.fm:80/drumstep_hi?4527f2ba1755917"
"http://prem2.di.fm:80/dub_hi?4527f2ba1755917"
"http://prem2.di.fm:80/dubstep_hi?4527f2ba1755917"
"http://prem2.di.fm:80/electrohouse_hi?4527f2ba1755917"
"http://prem2.di.fm:80/electroswing_hi?4527f2ba1755917"
"http://prem2.di.fm:80/glitchhop_hi?4527f2ba1755917"
"http://prem2.di.fm:80/handsup_hi?4527f2ba1755917"
"http://prem2.di.fm:80/hardtechno_hi?4527f2ba1755917"
"http://prem2.di.fm:80/liquiddnb_hi?4527f2ba1755917"
"http://prem2.di.fm:80/liquiddubstep_hi?4527f2ba1755917"
"http://prem2.di.fm:80/lounge_hi?4527f2ba1755917"
"http://prem2.di.fm:80/minimal_hi?4527f2ba1755917"
"http://prem2.di.fm:80/progressive_hi?4527f2ba1755917"
"http://prem2.di.fm:80/progressivepsy_hi?4527f2ba1755917"
"http://prem2.di.fm:80/techhouse_hi?4527f2ba1755917"
"http://prem2.di.fm:80/trap_hi?4527f2ba1755917"
];
Misc = [
"https://radio.lassul.us/radio.ogg"
"http://bytefm.cast.addradio.de/bytefm/main/mid/stream"
];
BigFM = [
"https://streams.bigfm.de/bigfm-deutschland-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-charts-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-hiphop-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-deutschrap-128-aac?usid=0-0-H-A-D-30s"
"https://streams.bigfm.de/bigfm-usrap-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-oldschool-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-dance-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-mashup-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-sunsetlounge-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-reggaevibes-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-latinbeats-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-groovenight-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-rapfeature-128-aac?usid=0-0-H-A-D-01"
"https://streams.bigfm.de/bigfm-urbanclubbeats-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-oldschooldeutsch-128-aac?usid=0-0-H-A-D-01"
"https://streams.bigfm.de/bigfm-nitroxedm-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-nitroxdeep-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-worldbeats-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-turkey-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-balkan-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-orient-128-aac?usid=0-0-H-A-D-30"
"https://streams.bigfm.de/bigfm-russia-128-mp3?usid=0-0-H-A-D-01"
];
}

View File

@@ -1,38 +0,0 @@
[
"http://ice1.somafm.com/beatblender-128-aac"
"http://ice1.somafm.com/defcon-128-aac"
"http://ice1.somafm.com/vaporwaves-128-aac"
"http://ice1.somafm.com/dronezone-128-aac"
"http://ice1.somafm.com/dubstep-128-aac"
"http://ice1.somafm.com/groovesalad-32-aac"
"http://ice1.somafm.com/gsclassic-128-aac"
"http://ice1.somafm.com/bootliquor-128-aac"
"http://ice1.somafm.com/lush-128-aac"
"http://ice1.somafm.com/silent-128-aac"
"http://ice1.somafm.com/spacestation-128-aac"
"http://ice1.somafm.com/thetrip-128-aac"
"http://prem2.di.fm:80/bassline_hi?4527f2ba1755917"
"http://prem2.di.fm:80/breaks_hi?4527f2ba1755917"
"http://prem2.di.fm:80/chillout_hi?4527f2ba1755917"
"http://prem2.di.fm:80/classicelectronica_hi?4527f2ba1755917"
"http://prem2.di.fm:80/deephouse_hi?4527f2ba1755917"
"http://prem2.di.fm:80/djmixes_hi?4527f2ba1755917"
"http://prem2.di.fm:80/drumandbass_hi?4527f2ba1755917"
"http://prem2.di.fm:80/drumstep_hi?4527f2ba1755917"
"http://prem2.di.fm:80/dub_hi?4527f2ba1755917"
"http://prem2.di.fm:80/dubstep_hi?4527f2ba1755917"
"http://prem2.di.fm:80/electrohouse_hi?4527f2ba1755917"
"http://prem2.di.fm:80/electroswing_hi?4527f2ba1755917"
"http://prem2.di.fm:80/glitchhop_hi?4527f2ba1755917"
"http://prem2.di.fm:80/handsup_hi?4527f2ba1755917"
"http://prem2.di.fm:80/hardtechno_hi?4527f2ba1755917"
"http://prem2.di.fm:80/liquiddnb_hi?4527f2ba1755917"
"http://prem2.di.fm:80/liquiddubstep_hi?4527f2ba1755917"
"http://prem2.di.fm:80/lounge_hi?4527f2ba1755917"
"http://prem2.di.fm:80/minimal_hi?4527f2ba1755917"
"http://prem2.di.fm:80/progressive_hi?4527f2ba1755917"
"http://prem2.di.fm:80/progressivepsy_hi?4527f2ba1755917"
"http://prem2.di.fm:80/techhouse_hi?4527f2ba1755917"
"http://prem2.di.fm:80/trap_hi?4527f2ba1755917"
"https://radio.lassul.us/radio.ogg"
]