1
0
mirror of https://github.com/kmein/niveum synced 2026-03-22 04:41:07 +01:00

6 Commits

16 changed files with 2443 additions and 512 deletions

View File

@@ -215,6 +215,7 @@ in {
./newsboat.nix
./flameshot-once.nix
./packages
./power-action.nix
./printing.nix
./wallpaper.nix
./redshift.nix

View File

@@ -1,38 +1,76 @@
{ config, pkgs, lib, ... }:
let
playlists = import <niveum/lib/playlists.nix>;
playlistFiles = lib.mapAttrs (name: {tracks, ...}: pkgs.writeText "${name}.m3u" (builtins.concatStringsSep "\n" (map ({url, ...}: url) tracks))) playlists;
linkPlaylist = name: file: ''
ln -sfn "${toString file}" "/var/lib/mpd/playlists/${name}.m3u"
'';
linkPlaylists = lib.concatStringsSep "\n" (lib.mapAttrsToList linkPlaylist playlistFiles);
streams = import <niveum/lib/streams.nix> {
di-fm-key = lib.strings.fileContents <secrets/di.fm/key>;
};
in
{
system.activationScripts.mpd-playlists = ''
rm -rf /var/lib/mpd/playlists
install -d /var/lib/mpd/playlists
${linkPlaylists}
'';
imports = [ <niveum/modules/mpd-fm.nix> ];
environment.systemPackages = [ pkgs.ncmpcpp pkgs.mpc_cli ];
services.mpd.enable = true;
services.ympd.enable = true;
services.mpd-fm = {
enable = true;
stationsFile = "/etc/mpd-fm/stations.json";
webPort = 8080;
};
services.nginx.virtualHosts.default = {
locations."^~ /ympd/" = {
proxyPass = "http://127.0.0.1:${config.services.ympd.webPort}/";
systemd.services.antenne-asb =
let
stations = lib.lists.imap0 (id: {desc ? "", logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300", stream, station}: { inherit id desc logo stream station; }) streams;
stationsJson = pkgs.writeText "stations.json" (builtins.toJSON stations);
in {
wantedBy = [ "mpd-fm.service" ];
startAt = "hourly";
script = ''
mkdir -p /etc/mpd-fm
antenne_asb_url=$(
${pkgs.curl}/bin/curl -sS 'https://www.caster.fm/widgets/em_player.php?jsinit=true&uid=529295&t=blue&c=' \
| grep streamUrl \
| sed ${lib.escapeShellArg "s/^.*'\\([^']*\\)'.*/\\1/"}
)
${pkgs.jq}/bin/jq "map(if .station == \"Antenne ASB\" then .stream |= \"$antenne_asb_url\" else . end)" < ${stationsJson} > /etc/mpd-fm/stations.json
'';
};
services.mpd.enable = true;
services.nginx = {
upstreams."mpd-fm-socket" = {
extraConfig = ''
auth_basic "Restricted Content";
auth_basic_user_file ${pkgs.writeText "ympd-password" "dj:$apr1$1ogLNSki$37uGV8iqjWEYEwtY4iq3F1"};
''; # generate password hash with `openssl passwd -apr1`
server 127.0.0.1:${toString config.services.mpd-fm.webPort};
'';
};
appendHttpConfig = ''
map $http_upgrade $connection_upgrade {
default upgrade;
''' close;
}
'';
virtualHosts.default = {
basicAuth.dj = lib.strings.fileContents <system-secrets/mpd-web.key>;
locations."/" = {
proxyPass = "http://mpd-fm-socket";
extraConfig = ''
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
''; # generate password hash with `openssl passwd -apr1`
};
};
};
/*
# dont let anyone outside localhost or local network in
networking.firewall.extraCommands = let ympdPort = config.services.ympd.webPort; in ''
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${ympdPort} -s 192.168.0.0/16 -j ACCEPT
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${ympdPort} -s 127.0.0.0/8 -j ACCEPT
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${ympdPort} -j DROP
networking.firewall.extraCommands =
let
mpd-fm-port = toString config.services.mpd-fm.webPort;
in ''
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${mpd-fm-port} -s 192.168.0.0/16 -j ACCEPT
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${mpd-fm-port} -s 10.243.2.4 -j ACCEPT
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${mpd-fm-port} -s 127.0.0.0/8 -j ACCEPT
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${mpd-fm-port} -j DROP
'';
*/
}

View File

@@ -2,9 +2,9 @@
{
# enable `nix flake`
nix = {
package = pkgs.nixUnstable;
package = pkgs.nix;
# extraOptions = ''
# experimental-features = nix-command flakes
# experimental-features = nix-command
# '';
};
}

View File

@@ -112,6 +112,7 @@ in {
scripts.showkeys-toggle
scripts.favicon
scripts.ipa # XSAMPA to IPA converter
scripts.playlist
scripts.devanagari
scripts.betacode # ancient greek betacode to unicode converter
nur.repos.kmein.mahlzeit

24
configs/power-action.nix Normal file
View File

@@ -0,0 +1,24 @@
{ pkgs, config, ... }:
let
suspend = pkgs.writers.writeDash "suspend" "${pkgs.systemd}/bin/systemctl suspend";
in
{
imports = [ <stockholm/krebs/3modules/power-action.nix> ];
krebs.power-action = {
enable = true;
plans.suspend = {
upperLimit = 3;
lowerLimit = 0;
charging = false;
action = pkgs.writeDash "suspend-wrapper" ''
/run/wrappers/bin/sudo ${suspend}
'';
};
user = config.users.users.me.name;
};
security.sudo.extraConfig = ''
${config.krebs.power-action.user} ALL= (root) NOPASSWD: ${suspend}
'';
}

View File

@@ -1,24 +0,0 @@
{ pkgs, config, lib, ... }:
let
tunerHTML = pkgs.callPackage <niveum/packages/tuner.nix> {
playlists = import <niveum/lib/playlists.nix>;
};
in
{
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedTlsSettings = true;
virtualHosts.default = {
locations."= /tuner".extraConfig = ''
default_type text/html;
alias ${tunerHTML};
'';
};
};
networking.firewall.allowedTCPPorts = [ 80 ];
}

View File

@@ -1,364 +0,0 @@
let
di-fm-key = builtins.readFile <secrets/di.fm/key>;
soma-fm = name: {
url = "http://ice1.somafm.com/${name}-128-aac";
provider = "soma.fm";
inherit name;
};
di-fm = name: {
url = "http://prem2.di.fm/${name}_hi?${di-fm-key}";
provider = "di.fm";
inherit name;
};
big-fm = name: {
url = "https://streams.bigfm.de/bigfm-${name}-128-aac";
provider = "big.fm";
inherit name;
};
we-are-one = name: {
url = "http://listen.${name}.fm/tunein-aac-hd-pls";
provider = "WeAreOne";
inherit name;
};
rte = name: {
url = "https://www.rte.ie/manifests/${name}.m3u8";
provider = "Raidió Teilifís Éireann";
inherit name;
};
laut-fm = name: {
url = "http://stream.laut.fm/${name}";
provider = "laut.fm";
inherit name;
};
rautemusik = name: {
url = "http://${name}-high.rautemusik.fm/";
provider = "rautemusik.fm";
inherit name;
};
radiosai = name: port: {
url = "http://stream.radiosai.net:${toString port}";
provider = "Radio Sai";
inherit name;
};
caster-fm = name: subdomain: port: {
url = "http://${subdomain}.caster.fm:${toString port}/listen.mp3?authn0b0236758bd0e178156d0787327a055d";
provider = "caster.fm";
inherit name;
};
in
{
Chill = {
description = "Kühlen.";
tracks = [
{
url = "https://radio.lassul.us/radio.ogg";
name = "Radio";
provider = "lassulus";
}
{
url = "https://streamer.radio.co/s2c3cc784b/listen";
name = "Radio";
provider = "electroswing-radio.com";
}
(rautemusik "study")
(big-fm "reggaevibes")
(big-fm "sunsetlounge")
(di-fm "ambient")
(di-fm "chilledm")
(di-fm "chillhop")
(di-fm "chillntropicalhouse")
(di-fm "chillout")
(di-fm "chilloutdreams")
(di-fm "chillstep")
(di-fm "deephouse")
(di-fm "deepprogressivehouse")
(di-fm "downtempolounge")
(di-fm "dub") # An emphasis on the bass and drums / DnB, delayed effects, sampled vocals and smokey Reggae inspired vibes.
(di-fm "indiebeats") # Smooth, groovy and full of cutting-edge, fresh ideas - beats to kick back and enjoy far from the club setting.
(di-fm "liquidtrap") # The smoother side of Trap but still packed with mechanical grooves and hip hop moods.
(di-fm "lofihiphop")
(di-fm "lofiloungenchill")
(di-fm "lounge")
(di-fm "melodicprogressive")
(di-fm "psybient") # The psychedelic side of ambient.
(di-fm "psychill")
(di-fm "psydub")
(di-fm "spacemusic") # Ambient space music for expanding minds.
(di-fm "trap")
(di-fm "vocalchillout")
(di-fm "vocallounge")
(soma-fm "beatblender") # A late night blend of deep-house and downtempo chill.
(soma-fm "deepspaceone") # Deep ambient electronic, experimental and space music. For inner and outer space exploration.
(soma-fm "digitalis") # Digitally affected analog rock to calm the agitated heart.
(soma-fm "dronezone") # Served best chilled, safe with most medications. Atmospheric textures with minimal beats.
(soma-fm "fluid") # Drown in the electronic sound of instrumental hiphop, future soul and liquid trap.
(soma-fm "indiepop") # New and classic favorite indie pop tracks.
(soma-fm "lush") # Sensuous and mellow vocals, mostly female, with an electronic influence.
(soma-fm "missioncontrol") # Celebrating NASA and Space Explorers everywhere.
(soma-fm "reggae") # NEW! Reggae, Ska, Rocksteady classic and deep tracks.
(soma-fm "sf1033") # Ambient music mixed with the sounds of San Francisco public safety radio traffic.
(caster-fm "TODO" "noasrv" 10182) # https://github.com/cccruzr/albumsyoumusthear/blob/7e00baf575e4d357cd275d54d1aeb717321141a8/HLS/IBERO_90_1.m3u
(caster-fm "TODO" "shaincast" 20866) # https://github.com/cccruzr/albumsyoumusthear/blob/7e00baf575e4d357cd275d54d1aeb717321141a8/HLS/IBERO_90_1.m3u
];
};
Brennpunkt = {
description = "What focus means.";
tracks = [ # What Focus Means
(laut-fm "dnbzone")
(di-fm "atmosphericbreaks")
(di-fm "bigbeat") # Heavily focused on breakbeats and dusty samples. A defining 90s musical movement still going strong today.
(di-fm "darkdnb") # Evil, gritty and twisted DnB / Drum & Bass. at 160+ BPM, hear the darkest basslines and the hardest hitting percussion.
(di-fm "deeptech")
(di-fm "drumandbass")
(di-fm "drumstep") # A hybrid of half-time Dubstep and intense Drum and Bass / DnB.
(di-fm "dubstep")
(di-fm "dubtechno") # The beloved sounds of deep techno saturated with tape delays, heavy reverb and ice cold atmospherics.
(di-fm "futuregarage") # 2step Garage rhythms, chunky bass line driven grooves and plenty of forward thinking innovation.
(di-fm "jungle") # Jungle keeps the breakbeat tempos high and celebrates the diverse ideas found within urban and rave music.
(di-fm "liquiddnb")
(di-fm "liquiddubstep")
(di-fm "minimal")
(di-fm "oldschoolacid") # Acid, one of the characteristics of the TB-303, is celebrated here with the best tracks from house, techno and trance.
(di-fm "progressive")
(di-fm "techhouse")
(di-fm "techno")
(di-fm "umfradio")
(soma-fm "defcon") # Music for Hacking. The DEF CON Year-Round Channel.
(soma-fm "dubstep") # Dubstep, Dub and Deep Bass. May damage speakers at high volume.
(soma-fm "groovesalad") # A nicely chilled plate of ambient/downtempo beats and grooves.
(soma-fm "gsclassic") # The classic (early 2000s) version of a nicely chilled plate of ambient/downtempo beats and grooves.
(soma-fm "secretagent") # The soundtrack for your stylish, mysterious, dangerous life. For Spies and PIs too!
];
};
Post-Musicality = {
description = "Makes you wonder whether you are listening to music at all.";
tracks = [
(rautemusik "wackenradio")
(di-fm "classicelectronica")
(di-fm "darkpsytrance") # The darker form of PsyTrance, which is a sound all its own direct from Goa to your headphones.
(di-fm "gabber") # The hardest form of techno with punishing tracks designed to drive the crowds into a sweaty frenzy.
(di-fm "goapsy")
(di-fm "hardtechno") # Tough as nails warehouse jams full of cold aggression, sinister structures and pounding rhythms that hit hard.
(di-fm "progressivepsy")
(di-fm "undergroundtechno") # From gritty Berlin streets to dark corners of Brooklyn, this is techno made by artists pushing the genre further.
(soma-fm "cliqhop") # Blips'n'beeps backed mostly w/beats. Intelligent Dance Music.
(soma-fm "metal") # From black to doom, prog to sludge, thrash to post, stoner to crossover, punk to industrial.
(we-are-one "coretime")
];
};
"Club Albrecht" = {
description = "Party!";
tracks = [
(rautemusik "club")
(rautemusik "house")
(rautemusik "bass")
(rautemusik "breakz")
(laut-fm "electro-swing")
(big-fm "dance")
(big-fm "groovenight")
(big-fm "nitroxdeep")
(big-fm "nitroxedm")
(big-fm "urbanclubbeats")
(di-fm "00sclubhits")
(di-fm "bassline") # Blending together elements of house music, speed garage, and techno its all about the low end frequencies.
(di-fm "bassnjackinhouse") # From the funkiest grooves to the dirtiest beats. Hard-hitting, high energy 4/4 club cuts to move the masses.
(di-fm "bigroomhouse") # Fusing together house elements from the past and the present - prime time music full of uplifting high energy.
(di-fm "classiceurodance")
(di-fm "club")
(di-fm "clubdubstep")
(di-fm "deepnudisco")
(di-fm "detroithousentechno") # Where would dance music be without Detroit? The city that started it all continues to inspire and educate.
(di-fm "discohouse")
(di-fm "djmixes")
(di-fm "edm")
(di-fm "edmfestival")
(di-fm "electrohouse")
(di-fm "electronicpioneers") # The trailblazers, the renegades and the experimental musicians who gave early inspiration with electronic instruments.
(di-fm "electroswing") # The combination of 1920s-1940s jazz and swing music, big band horns and modern day electro house.
(di-fm "eurodance")
(di-fm "funkyhouse")
(di-fm "futurebass") # Hard basslines, booming beats and insatiable grooves. Inspired by Trap, Juke and Garage - molded together into a unique booming style.
(di-fm "futuresynthpop") # Finest selection of futurepop and synthpop.
(di-fm "glitchhop") # The sound of digital malfunctions, electric hum and bit rate distortions perfectly placed alongside laid-back hip hop beats.
(di-fm "handsup") # A channel showcasing everything from hard dance, trance and happy hardcore to lift the spirits (and the arms).
(di-fm "hardcore") # Strictly for the hardcore. These are the biggest and boldest bangers, and the hardest hitting tracks.
(di-fm "harddance") # Concrete kicks and punching rhythms, hard dance is a tougher side of music with sharp edges and aggressive power.
(di-fm "hardstyle") # Hard techno & hardcore. A global phenomenon with powerful kicks, distorted effects and infectious melodies.
(di-fm "house")
(di-fm "indiedance")
(di-fm "jazzhouse") # One of the biggest cultural soundtracks with the infectious thump of house music. Expect sultry saxophones, trumpets, and finger snapping grooves.
(di-fm "latinhouse") # The sounds of Salsa, Brazilian beats and Latin Jazz with the steady grooves of modern East Coast dance music.
(di-fm "nightcore") # Pitched up vocals, happy hardcore beats, and high energy music non-stop.
(di-fm "nudisco") # Modern disco music blending the familiar funk of the 70s and 80s with futuristic beats and up to date grooves.
(di-fm "oldschoolhouse") # The biggest classics and secret weapons this is a true treasure chest of house tracks from back in the day.
(di-fm "oldschoolrave") # Grab your whistles, white gloves and reach for the laser beams. This is the sound of raving when raving was new.
(di-fm "soulfulhouse") # House music saturated with feeling full of melodies, vocals and true soul. Steady warm 4/4 vibes.
(di-fm "summerchillhouse")
(di-fm "tribalhouse") # The percussive side of the house and tech house scene, tribal house takes drums and puts them in the forefront.
(di-fm "vocalhouse")
(soma-fm "poptron") # Electropop and indie dance rock with sparkle and pop.
(soma-fm "spacestation") # Tune in, turn on, space out. Spaced-out ambient and mid-tempo electronica.
(we-are-one "clubtime")
(we-are-one "hardbase")
(we-are-one "housetime")
(we-are-one "teatime")
(we-are-one "technobase")
];
};
HipHop = {
description = "";
tracks = [
(rautemusik "deutschrap-charts")
(rautemusik "deutschrap-classic")
(big-fm "deutschrap")
(big-fm "hiphop")
(big-fm "oldschool")
(big-fm "oldschooldeutsch")
(big-fm "rapfeature")
(big-fm "usrap")
# (di-fm "breaks") # Inspired by hip hop and UK rave music, breaks features broken up drum loops and creative samples, synths and fx.
(rte "pulse")
];
};
Wave = {
description = "";
tracks = [
(di-fm "classiceurodisco") # Conceived in the European discos in the 70s, evolving through the decades into modern electronic masterpieces.
(di-fm "electropop") # Catchy pop music blended together with vintage synthesizers and electronic instrumentation.
(di-fm "synthwave")
(soma-fm "seventies") # Mellow album rock from the Seventies. Yacht not required.
(soma-fm "u80s") # Early 80s UK Synthpop and a bit of New Wave.
(soma-fm "vaporwaves") # All Vaporwave. All the time.
];
};
Trance = {
description = "";
tracks = [
(laut-fm "uplifting-trance-radio")
(rautemusik "trance")
(di-fm "classictrance")
(di-fm "classicvocaltrance")
(di-fm "epictrance")
(di-fm "trance")
(di-fm "vocaltrance")
(soma-fm "thetrip") # Progressive house / trance. Tip top tunes.
(we-are-one "trancebase")
];
};
i18n = {
description = "Country and culture specific music.";
tracks = [
{
url = "http://62.210.24.124:8379/;stream.mp3"; # Gjirokastër
provider = "Alpomedia";
name = "Gjirokastër";
}
{
url = "http://iphone.live24.gr/derty1000"; # derti μόνο λαϊκά
name = "μόνο λαϊκά";
provider = "Derti";
}
{
url = "https://knr.gl/radiolivestream"; # kalaallit nunaata radioa
provider = "KNR";
name = "Kalaallit Nunaata Radioa";
}
{
provider = "VahonFM";
name = "Hindustani";
url = "http://94.23.148.11:8058/";
}
(caster-fm "Sitha FM" "shaincast" 48148)
(radiosai "Asia" 8002)
(radiosai "Ameri" 8006)
(radiosai "Bhajan" 8000)
(big-fm "balkan")
(big-fm "latinbeats")
(big-fm "orient")
(big-fm "russia")
(big-fm "turkey")
(big-fm "worldbeats")
(di-fm "russianclubhits")
(rautemusik "partyhits")
(rautemusik "volksmusik")
(rte "rnag") # Raidió na Gaeltachta
(soma-fm "bootliquor") # Americana Roots music for Cowhands, Cowpokes and Cowtippers
(soma-fm "suburbsofgoa") # Desi-influenced Asian world beats and beyond.
(soma-fm "thistle") # Exploring music from Celtic roots and branches
];
};
Out-There = {
description = "Music that is very out-there.";
tracks = [
{
url = "http://klassikr.streamabc.net/klassikradio-simulcast-mp3-hq"; # Klassikradio
name = "Klassikradio";
provider = "Klassik Radio GmbH & Co. KG";
}
(caster-fm "Antenne-ASB.ga" "shaincast" 17656)
# "http://stream.klassikradio.de/live/mp3-192/stream.klassikradio.de"
# (soma-fm "scanner") # San Francisco Public Safety Scanner Feed
(rautemusik "rock")
(rautemusik "12punks")
(rte "2xm") # Alternative
(rte "gold") # Oldies
(rte "lyric") # "Classical and specialist music"
(soma-fm "7soul") # Vintage soul tracks from the original 45 RPM vinyl.
(soma-fm "bagel") # What alternative rock radio should sound like. [explicit]
(soma-fm "brfm") # From the Playa to the world, for the annual Burning Man festival.
(soma-fm "covers") # Just covers. Songs you know by artists you don't. We've got you covered.
(soma-fm "folkfwd") # Indie Folk, Alt-folk and the occasional folk classics.
(soma-fm "illstreet") # Classic bachelor pad, playful exotica and vintage music of tomorrow.
(soma-fm "live") # Special Live Events and rebroadcasts of past live events
(soma-fm "sonicuniverse") # Transcending the world of jazz with eclectic, avant-garde takes on tradition.
(soma-fm "specials") # For Halloween: Dark industrial/ambient music for tortured souls.
];
};
Weihnacht = {
description = "";
tracks = [
(soma-fm "christmas") # Chilled holiday grooves and classic winter lounge tracks. (Kid and Parent safe!)
(soma-fm "jollysoul") # Where we cut right to the soul of the season.
(soma-fm "xmasinfrisko") # SomaFM's wacky and eclectic holiday mix. Not for the easily offended.
(soma-fm "xmasrocks") # Have your self an indie/alternative holiday season!
];
};
Charts = {
description = "";
tracks = [
(rautemusik "main")
(rautemusik "workout")
(rautemusik "jam")
(rautemusik "charthits")
(rautemusik "top40")
{
url = "http://185.80.220.12:8166/stream"; # "Raidió Rírá"
name = "Raidió Rí-Rá";
provider = "Conradh na Gaeilge";
}
(big-fm "charts")
(big-fm "deutschland")
(big-fm "mashup")
(rte "2fm")
];
};
Talk = {
description = "";
tracks = [
(rte "radio1")
(rte "radio1extra")
];
};
}

1311
lib/streams.nix Normal file

File diff suppressed because it is too large Load Diff

96
modules/mpd-fm.nix Normal file
View File

@@ -0,0 +1,96 @@
{ config, lib, pkgs, ... }:
with lib;
let
mpd-fm = pkgs.callPackage <niveum/packages/MPD.FM> {};
cfg = config.services.mpd-fm;
in {
imports = [];
options.services.mpd-fm = {
enable = mkEnableOption "MPD.FM, an MPD web UI for radio streams";
webPort = mkOption {
type = types.port;
default = 4200;
};
stations = mkOption {
default = [];
type = types.listOf (types.submodule {
options = {
id = mkOption {
type = types.int;
description = "A unique identifier of the station";
};
station = mkOption {
type = types.str;
description = "Name of the station that should be displayed";
};
desc = mkOption {
type = types.nullOr types.str;
description = "Short description of the station (optional)";
};
logo = mkOption {
type = types.str;
description = "URL to a logo of the station (any size)";
};
stream = mkOption {
type = types.str;
description = "URL to the stream of the radio station (in a format supported by MPD such as MP3, OGG, ...)";
};
};
});
};
stationsFile = mkOption {
type = types.path;
default = pkgs.writeText "stations.json" (builtins.toJSON cfg.stations);
};
package = mkOption {
type = types.package;
default = mpd-fm;
};
mpd = {
host = mkOption {
type = types.str;
default = "localhost";
description = "The host where MPD is listening.";
example = "localhost";
};
port = mkOption {
type = types.port;
default = config.services.mpd.network.port;
description = "The port where MPD is listening.";
example = 6600;
};
};
};
config = mkIf cfg.enable {
users.extraUsers.mpd-fm.isSystemUser = true;
# ref https://github.com/florianheinemann/MPD.FM/blob/9d037cf87597b26ae2f10ba9feea48946ad6cc68/service/MPD.FM.service
systemd.services.mpd-fm = {
wantedBy = [ "multi-user.target" ];
after = [ "mpd.service" ];
description = "MPD.FM an MPD web radio player web GUI";
script = "${cfg.package}/libexec/mpd.fm/deps/mpd.fm/bin/www";
environment = {
NODE_ENV = "production";
MPD_HOST = cfg.mpd.host;
MPD_PORT = toString cfg.mpd.port;
PORT = toString cfg.webPort;
STATION_FILE = cfg.stationsFile;
};
serviceConfig = {
Restart = "always";
StandardOutput = "syslog";
StandardError = "syslog";
SyslogIdentifier = "mpd-fm";
User = "mpd-fm";
};
};
};
}

View File

@@ -0,0 +1,13 @@
{ mkYarnPackage, fetchFromGitHub }:
mkYarnPackage rec {
name = "MPD.FM";
src = fetchFromGitHub {
owner = "kmein";
repo = "MPD.FM";
rev = "c7cbaa4ce3b350f26cad54378db22c8ec58d987b";
sha256 = "1iklzbaji7ls01jfi1r0frhjq2i1w29kmar7vgw32f5mgj19cyvd";
};
packageJSON = "${src}/package.json";
yarnLock = ./yarn.lock;
yarnNix = ./yarn.nix;
}

422
packages/MPD.FM/yarn.lock Normal file
View File

@@ -0,0 +1,422 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
accepts@~1.3.3:
version "1.3.7"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
dependencies:
mime-types "~2.1.24"
negotiator "0.6.2"
array-flatten@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
async-limiter@~1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==
basic-auth@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a"
integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==
dependencies:
safe-buffer "5.1.2"
body-parser@~1.18.2:
version "1.18.3"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4"
integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=
dependencies:
bytes "3.0.0"
content-type "~1.0.4"
debug "2.6.9"
depd "~1.1.2"
http-errors "~1.6.3"
iconv-lite "0.4.23"
on-finished "~2.3.0"
qs "6.5.2"
raw-body "2.3.3"
type-is "~1.6.16"
bytes@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=
content-disposition@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4"
integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ=
content-type@~1.0.2, content-type@~1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
cookie-parser@~1.4.3:
version "1.4.5"
resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.5.tgz#3e572d4b7c0c80f9c61daf604e4336831b5d1d49"
integrity sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw==
dependencies:
cookie "0.4.0"
cookie-signature "1.0.6"
cookie-signature@1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
cookie@0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=
cookie@0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
debug@2.6.9, debug@~2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
dependencies:
ms "2.0.0"
depd@~1.1.1, depd@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
destroy@~1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
encodeurl@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
etag@~1.8.0, etag@~1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
express@~4.15.5:
version "4.15.5"
resolved "https://registry.yarnpkg.com/express/-/express-4.15.5.tgz#670235ca9598890a5ae8170b83db722b842ed927"
integrity sha1-ZwI1ypWYiQpa6BcLg9tyK4Qu2Sc=
dependencies:
accepts "~1.3.3"
array-flatten "1.1.1"
content-disposition "0.5.2"
content-type "~1.0.2"
cookie "0.3.1"
cookie-signature "1.0.6"
debug "2.6.9"
depd "~1.1.1"
encodeurl "~1.0.1"
escape-html "~1.0.3"
etag "~1.8.0"
finalhandler "~1.0.6"
fresh "0.5.2"
merge-descriptors "1.0.1"
methods "~1.1.2"
on-finished "~2.3.0"
parseurl "~1.3.1"
path-to-regexp "0.1.7"
proxy-addr "~1.1.5"
qs "6.5.0"
range-parser "~1.2.0"
send "0.15.6"
serve-static "1.12.6"
setprototypeof "1.0.3"
statuses "~1.3.1"
type-is "~1.6.15"
utils-merge "1.0.0"
vary "~1.1.1"
finalhandler@~1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.6.tgz#007aea33d1a4d3e42017f624848ad58d212f814f"
integrity sha1-AHrqM9Gk0+QgF/YkhIrVjSEvgU8=
dependencies:
debug "2.6.9"
encodeurl "~1.0.1"
escape-html "~1.0.3"
on-finished "~2.3.0"
parseurl "~1.3.2"
statuses "~1.3.1"
unpipe "~1.0.0"
forwarded@~0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
fresh@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d"
integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=
dependencies:
depd "~1.1.2"
inherits "2.0.3"
setprototypeof "1.1.0"
statuses ">= 1.4.0 < 2"
iconv-lite@0.4.23:
version "0.4.23"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==
dependencies:
safer-buffer ">= 2.1.2 < 3"
inherits@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
ipaddr.js@1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.4.0.tgz#296aca878a821816e5b85d0a285a99bcff4582f0"
integrity sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA=
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
merge-descriptors@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
methods@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
mime-db@1.45.0:
version "1.45.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea"
integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==
mime-types@~2.1.24:
version "2.1.28"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd"
integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==
dependencies:
mime-db "1.45.0"
mime@1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"
integrity sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=
morgan@~1.9.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.9.1.tgz#0a8d16734a1d9afbc824b99df87e738e58e2da59"
integrity sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==
dependencies:
basic-auth "~2.0.0"
debug "2.6.9"
depd "~1.1.2"
on-finished "~2.3.0"
on-headers "~1.0.1"
mpd@~1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/mpd/-/mpd-1.3.0.tgz#a9a0e028f6808e5594f76fa9f0c574ad86f0c0dd"
integrity sha1-qaDgKPaAjlWU92+p8MV0rYbwwN0=
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
negotiator@0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
on-finished@~2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
dependencies:
ee-first "1.1.1"
on-headers@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f"
integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==
parseurl@~1.3.1, parseurl@~1.3.2:
version "1.3.3"
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
path-to-regexp@0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
proxy-addr@~1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.5.tgz#71c0ee3b102de3f202f3b64f608d173fcba1a918"
integrity sha1-ccDuOxAt4/IC87ZPYI0XP8uhqRg=
dependencies:
forwarded "~0.1.0"
ipaddr.js "1.4.0"
qs@6.5.0:
version "6.5.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.0.tgz#8d04954d364def3efc55b5a0793e1e2c8b1e6e49"
integrity sha512-fjVFjW9yhqMhVGwRExCXLhJKrLlkYSaxNWdyc9rmHlrVZbk35YHH312dFd7191uQeXkI3mKLZTIbSvIeFwFemg==
qs@6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
range-parser@~1.2.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
raw-body@2.3.3:
version "2.3.3"
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3"
integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==
dependencies:
bytes "3.0.0"
http-errors "1.6.3"
iconv-lite "0.4.23"
unpipe "1.0.0"
safe-buffer@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
integrity sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==
safe-buffer@5.1.2, safe-buffer@~5.1.0:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
"safer-buffer@>= 2.1.2 < 3":
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
send@0.15.6:
version "0.15.6"
resolved "https://registry.yarnpkg.com/send/-/send-0.15.6.tgz#20f23a9c925b762ab82705fe2f9db252ace47e34"
integrity sha1-IPI6nJJbdiq4JwX+L52yUqzkfjQ=
dependencies:
debug "2.6.9"
depd "~1.1.1"
destroy "~1.0.4"
encodeurl "~1.0.1"
escape-html "~1.0.3"
etag "~1.8.1"
fresh "0.5.2"
http-errors "~1.6.2"
mime "1.3.4"
ms "2.0.0"
on-finished "~2.3.0"
range-parser "~1.2.0"
statuses "~1.3.1"
serve-favicon@~2.4.5:
version "2.4.5"
resolved "https://registry.yarnpkg.com/serve-favicon/-/serve-favicon-2.4.5.tgz#49d9a46863153a9240691c893d2b0e7d85d6d436"
integrity sha512-s7F8h2NrslMkG50KxvlGdj+ApSwaLex0vexuJ9iFf3GLTIp1ph/l1qZvRe9T9TJEYZgmq72ZwJ2VYiAEtChknw==
dependencies:
etag "~1.8.1"
fresh "0.5.2"
ms "2.0.0"
parseurl "~1.3.2"
safe-buffer "5.1.1"
serve-static@1.12.6:
version "1.12.6"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.12.6.tgz#b973773f63449934da54e5beba5e31d9f4211577"
integrity sha1-uXN3P2NEmTTaVOW+ul4x2fQhFXc=
dependencies:
encodeurl "~1.0.1"
escape-html "~1.0.3"
parseurl "~1.3.2"
send "0.15.6"
setprototypeof@1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04"
integrity sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=
setprototypeof@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==
"statuses@>= 1.4.0 < 2":
version "1.5.0"
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
statuses@~1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e"
integrity sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=
type-is@~1.6.15, type-is@~1.6.16:
version "1.6.18"
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
dependencies:
media-typer "0.3.0"
mime-types "~2.1.24"
unpipe@1.0.0, unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
utils-merge@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8"
integrity sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=
vary@~1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
ws@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289"
integrity sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==
dependencies:
async-limiter "~1.0.0"
safe-buffer "~5.1.0"

493
packages/MPD.FM/yarn.nix Normal file
View File

@@ -0,0 +1,493 @@
{ fetchurl, fetchgit, linkFarm, runCommandNoCC, gnutar }: rec {
offline_cache = linkFarm "offline" packages;
packages = [
{
name = "accepts___accepts_1.3.7.tgz";
path = fetchurl {
name = "accepts___accepts_1.3.7.tgz";
url = "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz";
sha1 = "531bc726517a3b2b41f850021c6cc15eaab507cd";
};
}
{
name = "array_flatten___array_flatten_1.1.1.tgz";
path = fetchurl {
name = "array_flatten___array_flatten_1.1.1.tgz";
url = "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz";
sha1 = "9a5f699051b1e7073328f2a008968b64ea2955d2";
};
}
{
name = "async_limiter___async_limiter_1.0.1.tgz";
path = fetchurl {
name = "async_limiter___async_limiter_1.0.1.tgz";
url = "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz";
sha1 = "dd379e94f0db8310b08291f9d64c3209766617fd";
};
}
{
name = "basic_auth___basic_auth_2.0.1.tgz";
path = fetchurl {
name = "basic_auth___basic_auth_2.0.1.tgz";
url = "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz";
sha1 = "b998279bf47ce38344b4f3cf916d4679bbf51e3a";
};
}
{
name = "body_parser___body_parser_1.18.3.tgz";
path = fetchurl {
name = "body_parser___body_parser_1.18.3.tgz";
url = "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz";
sha1 = "5b292198ffdd553b3a0f20ded0592b956955c8b4";
};
}
{
name = "bytes___bytes_3.0.0.tgz";
path = fetchurl {
name = "bytes___bytes_3.0.0.tgz";
url = "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz";
sha1 = "d32815404d689699f85a4ea4fa8755dd13a96048";
};
}
{
name = "content_disposition___content_disposition_0.5.2.tgz";
path = fetchurl {
name = "content_disposition___content_disposition_0.5.2.tgz";
url = "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz";
sha1 = "0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4";
};
}
{
name = "content_type___content_type_1.0.4.tgz";
path = fetchurl {
name = "content_type___content_type_1.0.4.tgz";
url = "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz";
sha1 = "e138cc75e040c727b1966fe5e5f8c9aee256fe3b";
};
}
{
name = "cookie_parser___cookie_parser_1.4.5.tgz";
path = fetchurl {
name = "cookie_parser___cookie_parser_1.4.5.tgz";
url = "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.5.tgz";
sha1 = "3e572d4b7c0c80f9c61daf604e4336831b5d1d49";
};
}
{
name = "cookie_signature___cookie_signature_1.0.6.tgz";
path = fetchurl {
name = "cookie_signature___cookie_signature_1.0.6.tgz";
url = "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz";
sha1 = "e303a882b342cc3ee8ca513a79999734dab3ae2c";
};
}
{
name = "cookie___cookie_0.3.1.tgz";
path = fetchurl {
name = "cookie___cookie_0.3.1.tgz";
url = "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz";
sha1 = "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb";
};
}
{
name = "cookie___cookie_0.4.0.tgz";
path = fetchurl {
name = "cookie___cookie_0.4.0.tgz";
url = "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz";
sha1 = "beb437e7022b3b6d49019d088665303ebe9c14ba";
};
}
{
name = "debug___debug_2.6.9.tgz";
path = fetchurl {
name = "debug___debug_2.6.9.tgz";
url = "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz";
sha1 = "5d128515df134ff327e90a4c93f4e077a536341f";
};
}
{
name = "depd___depd_1.1.2.tgz";
path = fetchurl {
name = "depd___depd_1.1.2.tgz";
url = "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz";
sha1 = "9bcd52e14c097763e749b274c4346ed2e560b5a9";
};
}
{
name = "destroy___destroy_1.0.4.tgz";
path = fetchurl {
name = "destroy___destroy_1.0.4.tgz";
url = "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz";
sha1 = "978857442c44749e4206613e37946205826abd80";
};
}
{
name = "ee_first___ee_first_1.1.1.tgz";
path = fetchurl {
name = "ee_first___ee_first_1.1.1.tgz";
url = "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz";
sha1 = "590c61156b0ae2f4f0255732a158b266bc56b21d";
};
}
{
name = "encodeurl___encodeurl_1.0.2.tgz";
path = fetchurl {
name = "encodeurl___encodeurl_1.0.2.tgz";
url = "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz";
sha1 = "ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59";
};
}
{
name = "escape_html___escape_html_1.0.3.tgz";
path = fetchurl {
name = "escape_html___escape_html_1.0.3.tgz";
url = "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz";
sha1 = "0258eae4d3d0c0974de1c169188ef0051d1d1988";
};
}
{
name = "etag___etag_1.8.1.tgz";
path = fetchurl {
name = "etag___etag_1.8.1.tgz";
url = "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz";
sha1 = "41ae2eeb65efa62268aebfea83ac7d79299b0887";
};
}
{
name = "express___express_4.15.5.tgz";
path = fetchurl {
name = "express___express_4.15.5.tgz";
url = "https://registry.yarnpkg.com/express/-/express-4.15.5.tgz";
sha1 = "670235ca9598890a5ae8170b83db722b842ed927";
};
}
{
name = "finalhandler___finalhandler_1.0.6.tgz";
path = fetchurl {
name = "finalhandler___finalhandler_1.0.6.tgz";
url = "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.6.tgz";
sha1 = "007aea33d1a4d3e42017f624848ad58d212f814f";
};
}
{
name = "forwarded___forwarded_0.1.2.tgz";
path = fetchurl {
name = "forwarded___forwarded_0.1.2.tgz";
url = "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz";
sha1 = "98c23dab1175657b8c0573e8ceccd91b0ff18c84";
};
}
{
name = "fresh___fresh_0.5.2.tgz";
path = fetchurl {
name = "fresh___fresh_0.5.2.tgz";
url = "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz";
sha1 = "3d8cadd90d976569fa835ab1f8e4b23a105605a7";
};
}
{
name = "http_errors___http_errors_1.6.3.tgz";
path = fetchurl {
name = "http_errors___http_errors_1.6.3.tgz";
url = "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz";
sha1 = "8b55680bb4be283a0b5bf4ea2e38580be1d9320d";
};
}
{
name = "iconv_lite___iconv_lite_0.4.23.tgz";
path = fetchurl {
name = "iconv_lite___iconv_lite_0.4.23.tgz";
url = "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz";
sha1 = "297871f63be507adcfbfca715d0cd0eed84e9a63";
};
}
{
name = "inherits___inherits_2.0.3.tgz";
path = fetchurl {
name = "inherits___inherits_2.0.3.tgz";
url = "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz";
sha1 = "633c2c83e3da42a502f52466022480f4208261de";
};
}
{
name = "ipaddr.js___ipaddr.js_1.4.0.tgz";
path = fetchurl {
name = "ipaddr.js___ipaddr.js_1.4.0.tgz";
url = "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.4.0.tgz";
sha1 = "296aca878a821816e5b85d0a285a99bcff4582f0";
};
}
{
name = "media_typer___media_typer_0.3.0.tgz";
path = fetchurl {
name = "media_typer___media_typer_0.3.0.tgz";
url = "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz";
sha1 = "8710d7af0aa626f8fffa1ce00168545263255748";
};
}
{
name = "merge_descriptors___merge_descriptors_1.0.1.tgz";
path = fetchurl {
name = "merge_descriptors___merge_descriptors_1.0.1.tgz";
url = "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz";
sha1 = "b00aaa556dd8b44568150ec9d1b953f3f90cbb61";
};
}
{
name = "methods___methods_1.1.2.tgz";
path = fetchurl {
name = "methods___methods_1.1.2.tgz";
url = "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz";
sha1 = "5529a4d67654134edcc5266656835b0f851afcee";
};
}
{
name = "mime_db___mime_db_1.45.0.tgz";
path = fetchurl {
name = "mime_db___mime_db_1.45.0.tgz";
url = "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz";
sha1 = "cceeda21ccd7c3a745eba2decd55d4b73e7879ea";
};
}
{
name = "mime_types___mime_types_2.1.28.tgz";
path = fetchurl {
name = "mime_types___mime_types_2.1.28.tgz";
url = "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz";
sha1 = "1160c4757eab2c5363888e005273ecf79d2a0ecd";
};
}
{
name = "mime___mime_1.3.4.tgz";
path = fetchurl {
name = "mime___mime_1.3.4.tgz";
url = "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz";
sha1 = "115f9e3b6b3daf2959983cb38f149a2d40eb5d53";
};
}
{
name = "morgan___morgan_1.9.1.tgz";
path = fetchurl {
name = "morgan___morgan_1.9.1.tgz";
url = "https://registry.yarnpkg.com/morgan/-/morgan-1.9.1.tgz";
sha1 = "0a8d16734a1d9afbc824b99df87e738e58e2da59";
};
}
{
name = "mpd___mpd_1.3.0.tgz";
path = fetchurl {
name = "mpd___mpd_1.3.0.tgz";
url = "https://registry.yarnpkg.com/mpd/-/mpd-1.3.0.tgz";
sha1 = "a9a0e028f6808e5594f76fa9f0c574ad86f0c0dd";
};
}
{
name = "ms___ms_2.0.0.tgz";
path = fetchurl {
name = "ms___ms_2.0.0.tgz";
url = "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz";
sha1 = "5608aeadfc00be6c2901df5f9861788de0d597c8";
};
}
{
name = "negotiator___negotiator_0.6.2.tgz";
path = fetchurl {
name = "negotiator___negotiator_0.6.2.tgz";
url = "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz";
sha1 = "feacf7ccf525a77ae9634436a64883ffeca346fb";
};
}
{
name = "on_finished___on_finished_2.3.0.tgz";
path = fetchurl {
name = "on_finished___on_finished_2.3.0.tgz";
url = "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz";
sha1 = "20f1336481b083cd75337992a16971aa2d906947";
};
}
{
name = "on_headers___on_headers_1.0.2.tgz";
path = fetchurl {
name = "on_headers___on_headers_1.0.2.tgz";
url = "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz";
sha1 = "772b0ae6aaa525c399e489adfad90c403eb3c28f";
};
}
{
name = "parseurl___parseurl_1.3.3.tgz";
path = fetchurl {
name = "parseurl___parseurl_1.3.3.tgz";
url = "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz";
sha1 = "9da19e7bee8d12dff0513ed5b76957793bc2e8d4";
};
}
{
name = "path_to_regexp___path_to_regexp_0.1.7.tgz";
path = fetchurl {
name = "path_to_regexp___path_to_regexp_0.1.7.tgz";
url = "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz";
sha1 = "df604178005f522f15eb4490e7247a1bfaa67f8c";
};
}
{
name = "proxy_addr___proxy_addr_1.1.5.tgz";
path = fetchurl {
name = "proxy_addr___proxy_addr_1.1.5.tgz";
url = "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.5.tgz";
sha1 = "71c0ee3b102de3f202f3b64f608d173fcba1a918";
};
}
{
name = "qs___qs_6.5.0.tgz";
path = fetchurl {
name = "qs___qs_6.5.0.tgz";
url = "https://registry.yarnpkg.com/qs/-/qs-6.5.0.tgz";
sha1 = "8d04954d364def3efc55b5a0793e1e2c8b1e6e49";
};
}
{
name = "qs___qs_6.5.2.tgz";
path = fetchurl {
name = "qs___qs_6.5.2.tgz";
url = "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz";
sha1 = "cb3ae806e8740444584ef154ce8ee98d403f3e36";
};
}
{
name = "range_parser___range_parser_1.2.1.tgz";
path = fetchurl {
name = "range_parser___range_parser_1.2.1.tgz";
url = "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz";
sha1 = "3cf37023d199e1c24d1a55b84800c2f3e6468031";
};
}
{
name = "raw_body___raw_body_2.3.3.tgz";
path = fetchurl {
name = "raw_body___raw_body_2.3.3.tgz";
url = "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz";
sha1 = "1b324ece6b5706e153855bc1148c65bb7f6ea0c3";
};
}
{
name = "safe_buffer___safe_buffer_5.1.1.tgz";
path = fetchurl {
name = "safe_buffer___safe_buffer_5.1.1.tgz";
url = "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz";
sha1 = "893312af69b2123def71f57889001671eeb2c853";
};
}
{
name = "safe_buffer___safe_buffer_5.1.2.tgz";
path = fetchurl {
name = "safe_buffer___safe_buffer_5.1.2.tgz";
url = "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz";
sha1 = "991ec69d296e0313747d59bdfd2b745c35f8828d";
};
}
{
name = "safer_buffer___safer_buffer_2.1.2.tgz";
path = fetchurl {
name = "safer_buffer___safer_buffer_2.1.2.tgz";
url = "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz";
sha1 = "44fa161b0187b9549dd84bb91802f9bd8385cd6a";
};
}
{
name = "send___send_0.15.6.tgz";
path = fetchurl {
name = "send___send_0.15.6.tgz";
url = "https://registry.yarnpkg.com/send/-/send-0.15.6.tgz";
sha1 = "20f23a9c925b762ab82705fe2f9db252ace47e34";
};
}
{
name = "serve_favicon___serve_favicon_2.4.5.tgz";
path = fetchurl {
name = "serve_favicon___serve_favicon_2.4.5.tgz";
url = "https://registry.yarnpkg.com/serve-favicon/-/serve-favicon-2.4.5.tgz";
sha1 = "49d9a46863153a9240691c893d2b0e7d85d6d436";
};
}
{
name = "serve_static___serve_static_1.12.6.tgz";
path = fetchurl {
name = "serve_static___serve_static_1.12.6.tgz";
url = "https://registry.yarnpkg.com/serve-static/-/serve-static-1.12.6.tgz";
sha1 = "b973773f63449934da54e5beba5e31d9f4211577";
};
}
{
name = "setprototypeof___setprototypeof_1.0.3.tgz";
path = fetchurl {
name = "setprototypeof___setprototypeof_1.0.3.tgz";
url = "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz";
sha1 = "66567e37043eeb4f04d91bd658c0cbefb55b8e04";
};
}
{
name = "setprototypeof___setprototypeof_1.1.0.tgz";
path = fetchurl {
name = "setprototypeof___setprototypeof_1.1.0.tgz";
url = "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz";
sha1 = "d0bd85536887b6fe7c0d818cb962d9d91c54e656";
};
}
{
name = "statuses___statuses_1.5.0.tgz";
path = fetchurl {
name = "statuses___statuses_1.5.0.tgz";
url = "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz";
sha1 = "161c7dac177659fd9811f43771fa99381478628c";
};
}
{
name = "statuses___statuses_1.3.1.tgz";
path = fetchurl {
name = "statuses___statuses_1.3.1.tgz";
url = "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz";
sha1 = "faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e";
};
}
{
name = "type_is___type_is_1.6.18.tgz";
path = fetchurl {
name = "type_is___type_is_1.6.18.tgz";
url = "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz";
sha1 = "4e552cd05df09467dcbc4ef739de89f2cf37c131";
};
}
{
name = "unpipe___unpipe_1.0.0.tgz";
path = fetchurl {
name = "unpipe___unpipe_1.0.0.tgz";
url = "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz";
sha1 = "b2bf4ee8514aae6165b4817829d21b2ef49904ec";
};
}
{
name = "utils_merge___utils_merge_1.0.0.tgz";
path = fetchurl {
name = "utils_merge___utils_merge_1.0.0.tgz";
url = "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz";
sha1 = "0294fb922bb9375153541c4f7096231f287c8af8";
};
}
{
name = "vary___vary_1.1.2.tgz";
path = fetchurl {
name = "vary___vary_1.1.2.tgz";
url = "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz";
sha1 = "2299f02c6ded30d4a5961b0b9f74524a18f634fc";
};
}
{
name = "ws___ws_4.1.0.tgz";
path = fetchurl {
name = "ws___ws_4.1.0.tgz";
url = "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz";
sha1 = "a979b5d7d4da68bf54efe0408967c324869a7289";
};
}
];
}

View File

@@ -83,6 +83,12 @@ in rec {
script = ./dirmir.sh;
};
playlist = wrapScript {
name = "pls";
script = ./playlist.sh;
packages = [ pkgs.curl pkgs.jq ];
};
favicon = wrapScript {
packages = [ pkgs.imagemagick ];
name = "favicon";

12
packages/scripts/playlist.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
endpoint=prism.r:8001
case "$1" in
good|like|cool|nice|yes|+)
curl -sS -XPOST "$endpoint/good";;
skip|next|bad|sucks|no|nope|-)
curl -sS -XPOST "$endpoint/skip";;
*)
curl -sS -XGET "$endpoint/current" | jq;;
esac

View File

@@ -1,64 +0,0 @@
{ pkgs, playlists }:
let
inherit (pkgs) lib;
trackHTML = {url, provider, name}: ''
<tr>
<th>${name}</th>
<td><small>${provider}</small></td>
<td>
<audio controls>
<source src="${url}">
Your browser does not support the audio tag.
</audio>
</td>
</tr>
'';
playlistSection = name: {description, tracks}: ''
<section>
<header>
<h2 id="${lib.strings.sanitizeDerivationName name}">${name}</h2>
<p>${description}</p>
</header>
<table>
<thead>
<th>Name</th>
<th>Provider</th>
<th>Player</th>
</thead>
${builtins.concatStringsSep "\n\n" (map trackHTML tracks)}
</table>
</section>
'';
in pkgs.writeText "tuner.html" ''
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tuner</title>
<link rel="stylesheet" href="https://unpkg.com/mvp.css">
</head>
<body>
<header>
<nav>
<a href="#">Tuner</a>
<small>kmein's webradio hub</small>
<ul>
<li>
Playlists
<ul>
${builtins.concatStringsSep "\n" (lib.mapAttrsToList (name: {...}: ''<li><a href="#${lib.strings.sanitizeDerivationName name}">${name}</a></li>'') playlists)}
</ul>
</li>
</ul>
</nav>
</header>
<main>
${builtins.concatStringsSep "\n<hr/>\n" (lib.mapAttrsToList playlistSection playlists)}
</main>
<footer>
<p><small>&copy; kmein 2020</small></p>
</footer>
</body>
</html>
''

View File

@@ -5,7 +5,6 @@
<niveum/configs/wifi.nix>
<niveum/configs/keyboard.nix>
<niveum/modules/retiolum.nix>
<niveum/configs/tuner.nix>
<niveum/configs/spacetime.nix>
<niveum/configs/mpd.nix>
<niveum/configs/sshd.nix>
@@ -27,9 +26,6 @@
'')
];
}
{
services.illum.enable = true;
}
{
environment.systemPackages = [ pkgs.tmux ];
systemd.services.turntables = {
@@ -38,7 +34,7 @@
wantedBy = [ "multi-user.target" ];
path = [ pkgs.alacritty.terminfo ];
script = ''
${pkgs.tmux}/bin/tmux -2 new-session -d -s turntables ${pkgs.alsaUtils}/bin/alsamixer \; new-window ${pkgs.ncmpcpp}/bin/ncmpcpp \; new-window
${pkgs.tmux}/bin/tmux -2 new-session -d -s turntables ${pkgs.alsaUtils}/bin/alsamixer \; new-window
'';
preStop = "${pkgs.tmux}/bin/tmux kill-session -t turntables";
serviceConfig = {
@@ -48,36 +44,6 @@
};
};
}
/* {
users.extraUsers.kiosk = {
isNormalUser = true;
password = "";
extraGroups = [ "audio" ];
};
services.cage = {
enable = true;
user = config.users.extraUsers.kiosk.name;
extraArguments = [ "-s" ]; # allow vt switching
program =
let startUrl = "https://youtube.com";
in pkgs.writers.writeDash "kiosk-browser" ''
while true; do
${pkgs.chromium}/bin/chromium \
--no-first-run --no-message-box --noerrdialogs \
--default-browser --no-default-browser-check \
--start-maximized --kiosk ${startUrl}
sleep 0.5
done
'';
};
systemd.services.cage-tty1.environment.XKB_DEFAULT_LAYOUT = "de";
programs.chromium = {
enable = true;
extensions = [
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
];
};
} */
];
nix.nixPath = [ "/var/src" ];