From d37e90cb9743a3105de7630fb0701e9808cede4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Thu, 10 Mar 2022 21:52:12 +0100 Subject: [PATCH] chore: format with alejandra --- ci.nix | 94 +- configs/alacritty.nix | 13 +- configs/backup.nix | 15 +- configs/battery.nix | 9 +- configs/beets.nix | 9 +- configs/bluetooth.nix | 12 +- configs/ccc.nix | 4 +- configs/chromium.nix | 4 +- configs/cloud.nix | 27 +- configs/copyq.nix | 11 +- configs/default.nix | 70 +- configs/direnv.nix | 21 +- configs/distrobump.nix | 9 +- configs/docker.nix | 10 +- configs/dunst.nix | 7 +- configs/flameshot-once.nix | 7 +- configs/flix.nix | 10 +- configs/fonts.nix | 10 +- configs/fzf.nix | 12 +- configs/git.nix | 14 +- configs/hledger.nix | 8 +- configs/htop.nix | 4 +- configs/hu-berlin.nix | 41 +- configs/i3.nix | 143 +- configs/kdeconnect.nix | 20 +- configs/keyboard.nix | 17 +- configs/khal.nix | 17 +- configs/lb.nix | 7 +- configs/mime.nix | 1 - configs/monitoring.nix | 69 +- configs/mpv.nix | 8 +- configs/neomutt.nix | 157 +- configs/neovim.nix | 26 +- configs/networkmanager.nix | 48 +- configs/newsboat.nix | 10 +- configs/nix.nix | 3 +- configs/openweathermap.nix | 9 +- configs/packages.nix | 59 +- configs/polkit.nix | 6 +- configs/power-action.nix | 12 +- configs/printing.nix | 42 +- configs/redshift.nix | 2 +- configs/retiolum.nix | 8 +- configs/rofi.nix | 9 +- configs/seafile.nix | 7 +- configs/ssh.nix | 8 +- configs/sshd.nix | 13 +- configs/stardict.nix | 155 +- configs/sudo.nix | 2 +- configs/sxiv.nix | 9 +- configs/telegram-bots/astrology.nix | 9 +- configs/telegram-bots/autorenkalender.nix | 11 +- configs/telegram-bots/default.nix | 29 +- configs/telegram-bots/literature-quote.nix | 11 +- configs/telegram-bots/nachtischsatan.nix | 13 +- configs/telegram-bots/tlg-wotd.nix | 7 +- configs/theming.nix | 17 +- configs/tmux.nix | 2 +- configs/traadfri.nix | 12 +- configs/vscode.nix | 2 +- configs/wallpaper.nix | 7 +- configs/watson.nix | 7 +- configs/zsh.nix | 8 +- flake.nix | 150 +- lib/default.nix | 34 +- lib/goldendict-config.nix | 5 +- lib/i3status-rust.nix | 62 +- lib/streams.nix | 2807 +++++++++-------- modules/dropbox.nix | 21 +- modules/hledger.nix | 30 +- modules/minecraft.nix | 15 +- modules/moodle-dl.nix | 17 +- modules/networkmanager-declarative.nix | 61 +- modules/retiolum.nix | 21 +- modules/spotifyd.nix | 26 +- modules/system-dependent.nix | 12 +- modules/telegram-bot.nix | 45 +- modules/traadfri.nix | 54 +- modules/tuna.nix | 14 +- overlays/overlays.nix | 10 +- packages/daybook.nix | 12 +- packages/depp.nix | 21 +- packages/devanagari/default.nix | 2 +- packages/devanagari/yarn.nix | 10 +- packages/devour.nix | 14 +- packages/gfs-fonts.nix | 62 +- packages/gourmet.nix | 23 +- packages/iolanguage.nix | 13 +- packages/ix.nix | 7 +- packages/libcoap.nix | 25 +- packages/mahlzeit.nix | 47 +- packages/man/pandoc.nix | 7 +- packages/opustags.nix | 13 +- packages/python3Packages/betacode/default.nix | 9 +- .../indic-transliteration/default.nix | 13 +- .../python3Packages/instaloader/default.nix | 28 +- packages/python3Packages/pygtrie/default.nix | 6 +- .../spotify-cli-linux/default.nix | 37 +- packages/scripts/auc.nix | 56 +- packages/scripts/bvg.nix | 27 +- packages/scripts/daybook.nix | 12 +- packages/scripts/default.nix | 824 ++--- packages/scripts/depp.nix | 21 +- packages/scripts/horoscope/default.nix | 4 +- packages/scripts/instaget.nix | 7 +- packages/scripts/k-lock.nix | 36 +- packages/scripts/klem.nix | 72 +- packages/scripts/mpv-tv.nix | 13 +- packages/scripts/nav.nix | 11 +- packages/scripts/pls.nix | 53 +- packages/scripts/unicodmenu.nix | 79 +- packages/sncli.nix | 30 +- packages/text2pdf.nix | 7 +- packages/tocharian-font.nix | 11 +- packages/vimPlugins/cheat-sh.nix | 6 +- packages/vimPlugins/icalendar-vim.nix | 6 +- packages/vimPlugins/jq-vim.nix | 5 +- packages/vimPlugins/vim-256noir.nix | 5 +- packages/vimPlugins/vim-colors-paramount.nix | 5 +- packages/vimPlugins/vim-fetch.nix | 6 +- packages/vimPlugins/vim-fsharp.nix | 5 +- packages/vimPlugins/vim-mail.nix | 5 +- packages/vimPlugins/vim-reason-plus.nix | 6 +- packages/vimv.nix | 9 +- packages/when.nix | 13 +- packages/worldradio.nix | 22 +- systems/kabsa/configuration.nix | 15 +- systems/kabsa/hardware-configuration.nix | 17 +- systems/makanek/configuration.nix | 22 +- systems/makanek/hardware-configuration.nix | 20 +- systems/makanek/hedgedoc.nix | 56 +- systems/makanek/horoscopy.nix | 19 +- systems/makanek/matterbridge.nix | 88 +- systems/makanek/menstruation.nix | 16 +- systems/makanek/moinbot.nix | 3 +- systems/makanek/monitoring/blackbox.nix | 2 +- systems/makanek/monitoring/default.nix | 326 +- systems/makanek/monitoring/loki.nix | 12 +- systems/makanek/moodle-dl-borsfaye.nix | 19 +- systems/makanek/names.nix | 14 +- systems/makanek/nextcloud.nix | 13 +- systems/makanek/radio-news.nix | 10 +- systems/makanek/radio.nix | 10 +- systems/makanek/retiolum-map.nix | 19 +- systems/makanek/tarot.nix | 73 +- systems/makanek/urlwatch.nix | 49 +- systems/makanek/weechat.nix | 68 +- systems/manakish/configuration.nix | 15 +- systems/manakish/hardware-configuration.nix | 17 +- systems/manakish/hdmi.nix | 15 +- systems/zaatar/backup.nix | 30 +- systems/zaatar/configuration.nix | 23 +- systems/zaatar/gaslight.nix | 12 +- systems/zaatar/hardware-configuration.nix | 16 +- systems/zaatar/kiosk.nix | 33 +- systems/zaatar/moodle-dl-meinhark.nix | 30 +- systems/zaatar/pulseaudio.nix | 4 +- systems/zaatar/spotifyd.nix | 6 +- systems/zaatar/tuna.nix | 60 +- 159 files changed, 4239 insertions(+), 3405 deletions(-) diff --git a/ci.nix b/ci.nix index cdc3ca1..20c8bed 100644 --- a/ci.nix +++ b/ci.nix @@ -1,22 +1,30 @@ -{ inputs, system, name }: -let +{ + inputs, + system, + name, +}: let inherit (inputs) nixpkgs; pkgs = nixpkgs.legacyPackages.${system}; - ensureFiles = paths: pkgs.runCommand "directory" {} '' - set -efu - mkdir $out - cd $out - ${nixpkgs.lib.concatMapStringsSep "\n" (path: '' - mkdir -p "$(dirname ${nixpkgs.lib.escapeShellArg path})" - echo foo > ${nixpkgs.lib.escapeShellArg path} - '') paths} - ''; + ensureFiles = paths: + pkgs.runCommand "directory" {} '' + set -efu + mkdir $out + cd $out + ${ + nixpkgs.lib.concatMapStringsSep "\n" (path: '' + mkdir -p "$(dirname ${nixpkgs.lib.escapeShellArg path})" + echo foo > ${nixpkgs.lib.escapeShellArg path} + '') + paths + } + ''; nixPath = nixpkgs.lib.concatStringsSep ":" ([ "niveum=${toString ./.}" "nixos-config=${toString ./.}/systems/${name}/configuration.nix" "system-secrets=${systemSecrets}" "secrets=${sharedSecrets}" - ] ++ nixpkgs.lib.mapAttrsToList (name: value: "${name}=${value}") inputs); + ] + ++ nixpkgs.lib.mapAttrsToList (name: value: "${name}=${value}") inputs); # cd ~/.password-store/shared && find * -type f | sed 's/.gpg$//' sharedSecrets = ensureFiles [ "di.fm/key" @@ -37,31 +45,37 @@ let "spotify/username" "spotify/password" ]; - systemSecrets = let basic = [ "retiolum.ed25519" "retiolum.key" "syncthing/cert.pem" "syncthing/key.pem"]; in { - zaatar = ensureFiles ([ "moodle.token" "telegram/moodle-dl.token" "mpd-web.key" ] ++ basic); - kabsa = ensureFiles basic; - manakish = ensureFiles basic; - makanek = ensureFiles ([ - "irc/retiolum" - "irc/hackint" - "irc/libera" - "irc/oftc" - "matrix/nibbana" - "maxmind/license.key" - "moodle-dl/faye.token" - "nextcloud/admin" - "nextcloud/database" - "telegram/nachtischsatan.token" - "telegram/reverse.token" - "telegram/odyssey.token" - "telegram/betacode.token" - "telegram/moodle-dl.token" - "telegram/proverb.token" - "telegram/menstruation.token" - "telegram/cool_village.token" - "telegram/kmein.token" - "telegram/prometheus.token" - "weechat/relay" - ] ++ basic); - }.${name}; -in toString (pkgs.writers.writeDash "build" "NIX_PATH=${nixPath} nix-build '' -A system --dry-run") + systemSecrets = let + basic = ["retiolum.ed25519" "retiolum.key" "syncthing/cert.pem" "syncthing/key.pem"]; + in + { + zaatar = ensureFiles (["moodle.token" "telegram/moodle-dl.token" "mpd-web.key"] ++ basic); + kabsa = ensureFiles basic; + manakish = ensureFiles basic; + makanek = ensureFiles ([ + "irc/retiolum" + "irc/hackint" + "irc/libera" + "irc/oftc" + "matrix/nibbana" + "maxmind/license.key" + "moodle-dl/faye.token" + "nextcloud/admin" + "nextcloud/database" + "telegram/nachtischsatan.token" + "telegram/reverse.token" + "telegram/odyssey.token" + "telegram/betacode.token" + "telegram/moodle-dl.token" + "telegram/proverb.token" + "telegram/menstruation.token" + "telegram/cool_village.token" + "telegram/kmein.token" + "telegram/prometheus.token" + "weechat/relay" + ] + ++ basic); + } + .${name}; +in + toString (pkgs.writers.writeDash "build" "NIX_PATH=${nixPath} nix-build '' -A system --dry-run") diff --git a/configs/alacritty.nix b/configs/alacritty.nix index ba65eb9..f14e221 100644 --- a/configs/alacritty.nix +++ b/configs/alacritty.nix @@ -1,21 +1,24 @@ -{ pkgs, lib, config, ... }: { + pkgs, + lib, + config, + ... +}: { environment.variables.TERMINAL = "alacritty"; environment.systemPackages = [ pkgs.alacritty ]; - home-manager.users.me.xdg.configFile = - let + home-manager.users.me.xdg.configFile = let inherit (import ) colours; - colourNames = [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ]; + colourNames = ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"]; colourPairs = lib.getAttrs colourNames colours; in { "alacritty/alacritty.yml".source = (pkgs.formats.yaml {}).generate "alacritty.yml" { background_opacity = 0.9; colors = { - primary = { inherit (colours) background foreground; }; + primary = {inherit (colours) background foreground;}; normal = lib.mapAttrs (_: colour: colour.dark) colourPairs; bright = lib.mapAttrs (_: colour: colour.bright) colourPairs; }; diff --git a/configs/backup.nix b/configs/backup.nix index d54f0e6..4d76912 100644 --- a/configs/backup.nix +++ b/configs/backup.nix @@ -1,12 +1,17 @@ -{ pkgs, config, ... }: -let - inherit (import ) restic; -in { + pkgs, + config, + ... +}: let + inherit (import ) restic; +in { services.restic.backups.niveum = { initialize = true; inherit (restic) repository; - timerConfig = { OnCalendar = "8:00"; RandomizedDelaySec = "1h"; }; + timerConfig = { + OnCalendar = "8:00"; + RandomizedDelaySec = "1h"; + }; passwordFile = toString ; extraBackupArgs = [ "--exclude=/home/kfm/projects/nixpkgs/.git" diff --git a/configs/battery.nix b/configs/battery.nix index e9ed3ff..58bdee2 100644 --- a/configs/battery.nix +++ b/configs/battery.nix @@ -1,11 +1,14 @@ -{ config, pkgs, ... }: { + config, + pkgs, + ... +}: { boot.extraModulePackages = with config.boot.kernelPackages; [ tp_smapi acpi_call ]; - boot.kernelModules = [ "tp_smapi" "acpi_call" ]; - environment.systemPackages = [ pkgs.tpacpi-bat ]; + boot.kernelModules = ["tp_smapi" "acpi_call"]; + environment.systemPackages = [pkgs.tpacpi-bat]; services.tlp = { enable = true; diff --git a/configs/beets.nix b/configs/beets.nix index af681f8..17f1591 100644 --- a/configs/beets.nix +++ b/configs/beets.nix @@ -1,11 +1,14 @@ -{ lib, pkgs, ... }: { - environment.systemPackages = [ pkgs.beets ]; + lib, + pkgs, + ... +}: { + environment.systemPackages = [pkgs.beets]; home-manager.users.me.xdg.configFile = { "beets/config.yaml".source = (pkgs.formats.yaml {}).generate "config.yaml" { directory = "~/cloud/syncthing/music"; library = "~/cloud/syncthing/common/music.db"; - plugins = toString [ "fetchart" "lastgenre" ]; + plugins = toString ["fetchart" "lastgenre"]; }; }; } diff --git a/configs/bluetooth.nix b/configs/bluetooth.nix index fc8c81f..c6c71c6 100644 --- a/configs/bluetooth.nix +++ b/configs/bluetooth.nix @@ -1,11 +1,15 @@ -{ pkgs, lib, ... }: { +{ + pkgs, + lib, + ... +}: { hardware.bluetooth = { enable = true; settings.General.Enable = - lib.concatStringsSep "," [ "Source" "Sink" "Media" "Socket" ]; + lib.concatStringsSep "," ["Source" "Sink" "Media" "Socket"]; }; - environment.systemPackages = [ pkgs.blueman ]; + environment.systemPackages = [pkgs.blueman]; - home-manager.users.me = { services.blueman-applet.enable = false; }; + home-manager.users.me = {services.blueman-applet.enable = false;}; } diff --git a/configs/ccc.nix b/configs/ccc.nix index 5634c9c..42ce414 100644 --- a/configs/ccc.nix +++ b/configs/ccc.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{pkgs, ...}: # https://paste.sr.ht/~erictapen/11716989e489b600f237041b6d657fdf0ee17b34 let certificate = pkgs.stdenv.mkDerivation rec { @@ -7,7 +7,7 @@ let 1,/DST Root CA X3/d 1,/-----END CERTIFICATE-----/p ''; - nativeBuildInputs = with pkgs; [ cacert gnused ]; + nativeBuildInputs = with pkgs; [cacert gnused]; phases = "installPhase"; installPhase = '' ${pkgs.gnused}/bin/sed -n -f $src ${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt > $out diff --git a/configs/chromium.nix b/configs/chromium.nix index f5c1f5c..05a6f47 100644 --- a/configs/chromium.nix +++ b/configs/chromium.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { programs.chromium = { enable = true; extensions = [ @@ -10,7 +10,7 @@ ]; }; - environment.systemPackages = [ pkgs.brave ]; + environment.systemPackages = [pkgs.brave]; environment.variables.BROWSER = "brave"; } diff --git a/configs/cloud.nix b/configs/cloud.nix index 4143346..f317d16 100644 --- a/configs/cloud.nix +++ b/configs/cloud.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: { +{ + config, + lib, + pkgs, + ... +}: { imports = [ ]; @@ -50,16 +55,16 @@ cert = toString ; key = toString ; inherit ((import ).syncthing) devices; - folders = - let cloud-dir = "${config.users.users.me.home}/cloud"; - in { - "${cloud-dir}/syncthing/common".devices = [ "kabsa" "manakish" ]; - "${cloud-dir}/syncthing/library".devices = [ "kabsa" "manakish" "heym" ]; - "${cloud-dir}/syncthing/mundoiu".devices = [ "kabsa" "manakish" "heym" ]; - "${cloud-dir}/syncthing/music" = { - devices = [ "kabsa" "manakish" "heym" "zaatar" ]; - id = "music"; - }; + folders = let + cloud-dir = "${config.users.users.me.home}/cloud"; + in { + "${cloud-dir}/syncthing/common".devices = ["kabsa" "manakish"]; + "${cloud-dir}/syncthing/library".devices = ["kabsa" "manakish" "heym"]; + "${cloud-dir}/syncthing/mundoiu".devices = ["kabsa" "manakish" "heym"]; + "${cloud-dir}/syncthing/music" = { + devices = ["kabsa" "manakish" "heym" "zaatar"]; + id = "music"; }; + }; }; } diff --git a/configs/copyq.nix b/configs/copyq.nix index c07c82b..33360a7 100644 --- a/configs/copyq.nix +++ b/configs/copyq.nix @@ -1,5 +1,8 @@ -{ config, pkgs, ... }: -let +{ + config, + pkgs, + ... +}: let copyqConfig = pkgs.writers.writeDash "copyq-config" '' ${pkgs.copyq}/bin/copyq config check_clipboard true ${pkgs.copyq}/bin/copyq config check_selection false @@ -18,10 +21,10 @@ let ${pkgs.copyq}/bin/copyq config text_wrap true ''; in { - environment.systemPackages = [ pkgs.copyq ]; + environment.systemPackages = [pkgs.copyq]; systemd.user.services.copyq = { - wantedBy = [ "graphical-session.target" ]; + wantedBy = ["graphical-session.target"]; environment = { DISPLAY = ":${toString config.services.xserver.display}"; }; diff --git a/configs/default.nix b/configs/default.nix index 1fee36c..df4ed51 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -1,5 +1,10 @@ -{ pkgs, lib, config, options, ... }: -let +{ + pkgs, + lib, + config, + options, + ... +}: let inherit (lib.strings) makeBinPath; inherit (import ) localAddresses kieran; in { @@ -7,7 +12,7 @@ in { { - boot.supportedFilesystems = [ "ntfs" ]; + boot.supportedFilesystems = ["ntfs"]; } { nix.nixPath = [ @@ -23,13 +28,16 @@ in { dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"''; gfs-fonts = pkgs.callPackage {}; tocharian-font = pkgs.callPackage {}; - iolanguage = pkgs.callPackage { }; - ix = pkgs.callPackage { }; + iolanguage = pkgs.callPackage {}; + ix = pkgs.callPackage {}; }; }; overlays = [ (self: super: { - scripts = import { pkgs = super; lib = super.lib; }; + scripts = import { + pkgs = super; + lib = super.lib; + }; }) ]; }; @@ -57,8 +65,7 @@ in { users.users.me = { name = "kfm"; description = kieran.name; - hashedPassword = - "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; + hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; isNormalUser = true; uid = 1000; }; @@ -72,27 +79,28 @@ in { hardware.pulseaudio = { enable = true; package = pkgs.pulseaudioFull; - extraModules = [ pkgs.pulseaudio-modules-bt ]; + extraModules = [pkgs.pulseaudio-modules-bt]; # copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine zeroconf.discovery.enable = true; extraConfig = '' - load-module ${toString [ - "module-tunnel-sink-new" - "server=zaatar.r" - "sink_name=zaatar" - "channels=2" - "rate=44100" - ]} + load-module ${ + toString [ + "module-tunnel-sink-new" + "server=zaatar.r" + "sink_name=zaatar" + "channels=2" + "rate=44100" + ] + } ''; }; - users.users.me.extraGroups = [ "audio" ]; + users.users.me.extraGroups = ["audio"]; - environment.systemPackages = [ pkgs.pavucontrol pkgs.ncpamixer pkgs.pamixer pkgs.pulsemixer ]; + environment.systemPackages = [pkgs.pavucontrol pkgs.ncpamixer pkgs.pamixer pkgs.pulsemixer]; } { - environment.interactiveShellInit = - "export PATH=$PATH:$HOME/projects/niveum"; + environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum"; environment.shellAliases = let wcd = pkgs.writers.writeDash "wcd" '' cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.." @@ -107,11 +115,10 @@ in { in { "ß" = "${pkgs.utillinux}/bin/setsid"; cat = "${pkgs.bat}/bin/bat --style=plain"; - chromium-incognito = - "chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito"; + chromium-incognito = "chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito"; cp = "cp --interactive"; ip = "${pkgs.iproute}/bin/ip -c"; - l = "ls --color=auto --time-style=long-iso --almost-all"; + l = "ls --color=auto --time-style=long-iso --almost-all"; ls = "ls --color=auto --time-style=long-iso"; ll = "ls --color=auto --time-style=long-iso -l"; la = "ls --color=auto --time-style=long-iso --almost-all -l"; @@ -131,13 +138,11 @@ in { wcd = "source ${wcd}"; im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM"; where = "source ${where}"; - yt = - "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link - yta = - "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio + yt = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link + yta = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio }; } - { i18n.defaultLocale = "en_DK.UTF-8"; } + {i18n.defaultLocale = "en_DK.UTF-8";} { services.xserver = { enable = true; @@ -150,7 +155,7 @@ in { enable = true; greeters.gtk = { enable = true; - indicators = [ "~spacer" "~host" "~spacer" "~session" "~power" ]; + indicators = ["~spacer" "~host" "~spacer" "~session" "~power"]; }; }; }; @@ -170,7 +175,7 @@ in { }; }; } - { programs.command-not-found.enable = true; } + {programs.command-not-found.enable = true;} { programs.gnupg.agent.enable = true; @@ -191,8 +196,9 @@ in { { networking.hosts = lib.mapAttrs' (name: address: { name = address; - value = [ "${name}.local" ]; - }) localAddresses; + value = ["${name}.local"]; + }) + localAddresses; } ./alacritty.nix ./backup.nix diff --git a/configs/direnv.nix b/configs/direnv.nix index 2da9aa3..ff10290 100644 --- a/configs/direnv.nix +++ b/configs/direnv.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let nixify = pkgs.writers.writeDashBin "nixify" '' set -efuC @@ -18,18 +17,18 @@ let fi ''; in { - environment.systemPackages = [ pkgs.direnv nixify ]; + environment.systemPackages = [pkgs.direnv nixify]; home-manager.users.me.programs.direnv = { enable = true; - stdlib = builtins.readFile ("${ - pkgs.fetchFromGitHub { - owner = "Mic92"; - repo = "dotfiles"; - rev = "a0a9b7e358fa70a85cd468f8ca1fbb02ae0a91df"; - sha256 = "1y9h5s1lf59sczsm0ksq2x1yhl98ba9lwk5yil3q53rg7n4574pg"; - } - }/home/.direnvrc"); + stdlib = builtins.readFile "${ + pkgs.fetchFromGitHub { + owner = "Mic92"; + repo = "dotfiles"; + rev = "a0a9b7e358fa70a85cd468f8ca1fbb02ae0a91df"; + sha256 = "1y9h5s1lf59sczsm0ksq2x1yhl98ba9lwk5yil3q53rg7n4574pg"; + } + }/home/.direnvrc"; }; programs.zsh.interactiveShellInit = '' diff --git a/configs/distrobump.nix b/configs/distrobump.nix index 2cab5de..01ba99e 100644 --- a/configs/distrobump.nix +++ b/configs/distrobump.nix @@ -1,8 +1,13 @@ -{ lib, config, pkgs, ... }: { +{ + lib, + config, + pkgs, + ... +}: { imports = [ (import { inherit lib config; - pkgs = pkgs // { writeDash = pkgs.writers.writeDash; }; + pkgs = pkgs // {writeDash = pkgs.writers.writeDash;}; }) ]; diff --git a/configs/docker.nix b/configs/docker.nix index ab87d86..7b5e59e 100644 --- a/configs/docker.nix +++ b/configs/docker.nix @@ -1,4 +1,8 @@ -{ lib, pkgs, ... }: { +{ + lib, + pkgs, + ... +}: { virtualisation.docker = { enable = true; # for ICE wifi, ref https://gist.github.com/sunsided/7840e89ff4e11b64a2d7503fafa0290c @@ -7,6 +11,6 @@ "--fixed-cidr=172.39.1.0/25" ]; }; - users.users.me.extraGroups = [ "docker" ]; - environment.systemPackages = [ pkgs.docker pkgs.docker_compose ]; + users.users.me.extraGroups = ["docker"]; + environment.systemPackages = [pkgs.docker pkgs.docker_compose]; } diff --git a/configs/dunst.nix b/configs/dunst.nix index 040b7fe..aa4dc84 100644 --- a/configs/dunst.nix +++ b/configs/dunst.nix @@ -1,5 +1,8 @@ -{ config, pkgs, ... }: -let +{ + config, + pkgs, + ... +}: let inherit (import ) defaultApplications colours theme; in { home-manager.users.me.services.dunst = { diff --git a/configs/flameshot-once.nix b/configs/flameshot-once.nix index f72f6c2..271f1b8 100644 --- a/configs/flameshot-once.nix +++ b/configs/flameshot-once.nix @@ -1,5 +1,8 @@ -{ lib, pkgs, ... }: -let +{ + lib, + pkgs, + ... +}: let inherit (import ) defaultApplications; flameshot-once = pkgs.callPackage {}; diff --git a/configs/flix.nix b/configs/flix.nix index e8c99b5..614f3ae 100644 --- a/configs/flix.nix +++ b/configs/flix.nix @@ -1,5 +1,8 @@ -{ config, pkgs, ... }: -let +{ + config, + pkgs, + ... +}: let flixLocation = "/media/flix"; cacheLocation = "/var/cache/flix"; indexFilename = "index"; @@ -35,7 +38,7 @@ in { systemd.services.flix-index = { description = "Flix indexing service"; - wants = [ "network-online.target" ]; + wants = ["network-online.target"]; script = "cp ${flixLocation}/download/index ./${indexFilename}"; startAt = "hourly"; serviceConfig = { @@ -74,5 +77,4 @@ in { | ${pkgs.findutils}/bin/xargs -I '{}' ${pkgs.utillinux}/bin/setsid ${pkgs.xdg_utils}/bin/xdg-open '{}' '') ]; - } diff --git a/configs/fonts.nix b/configs/fonts.nix index 8d88b3b..dd999a3 100644 --- a/configs/fonts.nix +++ b/configs/fonts.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { nixpkgs.config.joypixels.acceptLicense = true; fonts = { @@ -33,10 +33,10 @@ tocharian-font ]; fontconfig.defaultFonts = { - monospace = [ "JetBrains Mono" "JoyPixels" ]; - serif = [ "Roboto Slab" ]; - sansSerif = [ "Roboto" "Noto Sans" ]; - emoji = [ "JoyPixels" ]; + monospace = ["JetBrains Mono" "JoyPixels"]; + serif = ["Roboto Slab"]; + sansSerif = ["Roboto" "Noto Sans"]; + emoji = ["JoyPixels"]; }; }; } diff --git a/configs/fzf.nix b/configs/fzf.nix index 0e7f29e..494e9df 100644 --- a/configs/fzf.nix +++ b/configs/fzf.nix @@ -1,9 +1,13 @@ -{ pkgs, lib, ... }: { +{ + pkgs, + lib, + ... +}: { environment = { - systemPackages = [ pkgs.fzf ]; + systemPackages = [pkgs.fzf]; variables = { FZF_DEFAULT_OPTS = - lib.escapeShellArgs [ "--height=40%" "--layout=reverse" ]; + lib.escapeShellArgs ["--height=40%" "--layout=reverse"]; FZF_ALT_C_COMMAND = "${pkgs.fd}/bin/fd --type d"; FZF_ALT_C_OPTS = lib.escapeShellArgs [ "--preview='${pkgs.tree}/bin/tree -L 1 \"{}\"'" @@ -12,7 +16,7 @@ ]; FZF_CTRL_T_COMMAND = "${pkgs.fd}/bin/fd --type f"; FZF_CTRL_T_OPTS = - lib.escapeShellArgs [ "--preview='${pkgs.bat}/bin/bat \"{}\"'" ]; + lib.escapeShellArgs ["--preview='${pkgs.bat}/bin/bat \"{}\"'"]; }; }; diff --git a/configs/git.nix b/configs/git.nix index 972337d..3cdcda9 100644 --- a/configs/git.nix +++ b/configs/git.nix @@ -1,8 +1,11 @@ -{ pkgs, config, lib, ... }: -let - inherit (import ) kieran ignorePaths; -in { + pkgs, + config, + lib, + ... +}: let + inherit (import ) kieran ignorePaths; +in { environment.systemPackages = [ pkgs.mr pkgs.git @@ -38,8 +41,7 @@ in diffs = "diff --staged"; last = "log -1 HEAD"; logs = "log --pretty=oneline"; - graph = - "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"; + graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"; }; ignores = ignorePaths; extraConfig = { diff --git a/configs/hledger.nix b/configs/hledger.nix index cebce5f..e42b8b6 100644 --- a/configs/hledger.nix +++ b/configs/hledger.nix @@ -1,5 +1,9 @@ -{ config, pkgs, ... }: { - imports = [ ]; +{ + config, + pkgs, + ... +}: { + imports = []; niveum.hledger = { enable = true; diff --git a/configs/htop.nix b/configs/htop.nix index e9acb30..840db5a 100644 --- a/configs/htop.nix +++ b/configs/htop.nix @@ -22,8 +22,8 @@ sort_key = "PERCENT_CPU"; tree_view = true; update_process_names = false; - right_meters = [ "Uptime" "Tasks" "LoadAverage" "Battery" ]; - left_meters = [ "LeftCPUs2" "RightCPUs2" "Memory" "Swap" ]; + right_meters = ["Uptime" "Tasks" "LoadAverage" "Battery"]; + left_meters = ["LeftCPUs2" "RightCPUs2" "Memory" "Swap"]; }; }; }; diff --git a/configs/hu-berlin.nix b/configs/hu-berlin.nix index 58d2002..18c52de 100644 --- a/configs/hu-berlin.nix +++ b/configs/hu-berlin.nix @@ -1,5 +1,9 @@ -{ config, pkgs, lib, ... }: -let +{ + config, + pkgs, + lib, + ... +}: let inherit (lib.strings) fileContents; inherit (import ) sshPort; eduroam = { @@ -32,7 +36,6 @@ in { options = hu-berlin-cifs-options; }; - home-manager.users.me.programs.ssh = { matchBlocks = { "alew.hu-berlin.de" = { @@ -46,10 +49,11 @@ in { (pkgs.writers.writeDashBin "hu-ip" '' ${pkgs.w3m}/bin/w3m -dump meineip.hu-berlin.de | head --lines=-4 | tail --lines=+3 '') - (pkgs.writers.writePython3Bin "hu-eduroam-install" + ( + pkgs.writers.writePython3Bin "hu-eduroam-install" { - libraries = with pkgs.python3Packages; [ distro pyopenssl dbus-python ]; - flakeIgnore = [ "E501" "E123" "W504" "E722" "F821" "E226" "E126" "E265" "W291" ]; + libraries = with pkgs.python3Packages; [distro pyopenssl dbus-python]; + flakeIgnore = ["E501" "E123" "W504" "E722" "F821" "E226" "E126" "E265" "W291"]; } (builtins.readFile (builtins.fetchurl { url = "https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/linux-installer/eduroam-linux-hub.py"; @@ -60,20 +64,22 @@ in { systemd.services.hu-vpn = { enable = true; - wants = [ "network-online.target" ]; - conflicts = [ "openvpn-hu-berlin.service" ]; + wants = ["network-online.target"]; + conflicts = ["openvpn-hu-berlin.service"]; script = '' - ${pkgs.openfortivpn}/bin/openfortivpn -c ${pkgs.writeText "hu-berlin.config" '' - host = forti-ssl.vpn.hu-berlin.de - port = 443 - trusted-cert = 42193a913d276d9eb86217612956e1e6464d6f07bed5393a4787c87adc4bd359 - username = ${eduroam.identity}@split_tunnel - password = ${eduroam.password} - ''} + ${pkgs.openfortivpn}/bin/openfortivpn -c ${ + pkgs.writeText "hu-berlin.config" '' + host = forti-ssl.vpn.hu-berlin.de + port = 443 + trusted-cert = 42193a913d276d9eb86217612956e1e6464d6f07bed5393a4787c87adc4bd359 + username = ${eduroam.identity}@split_tunnel + password = ${eduroam.password} + '' + } ''; }; - systemd.services.openvpn-hu-berlin.conflicts = [ "hu-vpn.service" ]; + systemd.services.openvpn-hu-berlin.conflicts = ["hu-vpn.service"]; services.openvpn.servers.hu-berlin = { autoStart = false; @@ -82,8 +88,7 @@ in { password = eduroam.password; }; config = fileContents (pkgs.fetchurl { - url = - "https://www.cms.hu-berlin.de/de/dl/netze/vpn/openvpn/hu-berlin.ovpn"; + url = "https://www.cms.hu-berlin.de/de/dl/netze/vpn/openvpn/hu-berlin.ovpn"; sha256 = "15b55aibik5460svjq2gwxrcyh6ay4k8savd6cd5lncgndmd8p8h"; }); }; diff --git a/configs/i3.nix b/configs/i3.nix index 461786a..2e65cac 100644 --- a/configs/i3.nix +++ b/configs/i3.nix @@ -1,5 +1,9 @@ -{ config, pkgs, lib, ... }: -let +{ + config, + pkgs, + lib, + ... +}: let inherit (import ) defaultApplications colours; klem = import { inherit pkgs lib; @@ -45,7 +49,6 @@ let move-to-new-workspace = pkgs.writers.writeDash "new-workspace" '' i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1)) ''; - in { services.xserver = { displayManager.defaultSession = "none+i3"; @@ -73,7 +76,10 @@ in { home-manager.users.me.xsession.windowManager.i3 = { enable = true; config = rec { - fonts = {names = ["Sans"]; size = 10.0;}; + fonts = { + names = ["Sans"]; + size = 10.0; + }; modifier = "Mod4"; window = { titlebar = false; @@ -81,15 +87,15 @@ in { hideEdgeBorders = "smart"; commands = [ { - criteria = { class = "floating"; }; + criteria = {class = "floating";}; command = "floating enable"; } { - criteria = { class = "fzfmenu"; }; + criteria = {class = "fzfmenu";}; command = "floating enable"; } { - criteria = { class = "mpv"; }; + criteria = {class = "mpv";}; command = lib.strings.concatStringsSep ", " [ "floating enable" "sticky enable" @@ -111,51 +117,64 @@ in { text = colours.foreground; }; in rec { - focused = scheme // { - border = colours.cyan.bright; - indicator = colours.cyan.bright; - childBorder = colours.cyan.bright; - }; - unfocused = scheme // { - border = colours.background; - indicator = colours.background; - childBorder = colours.background; - }; - focusedInactive = unfocused; - urgent = scheme // { - border = colours.red.bright; - indicator = colours.red.bright; - childBorder = colours.red.bright; - }; - placeholder = scheme // { - border = colours.green.bright; - indicator = colours.green.bright; - childBorder = colours.green.bright; - }; - }; - bars = [{ - workspaceButtons = false; - fonts = {names = ["Sans"]; size = 8.0;}; - mode = "hide"; # "dock" - position = "bottom"; - colors = rec { - background = colours.background; - separator = background; - statusline = colours.foreground; - bindingMode = { - background = colours.red.bright; - border = colours.background; - text = colours.foreground; + focused = + scheme + // { + border = colours.cyan.bright; + indicator = colours.cyan.bright; + childBorder = colours.cyan.bright; }; - }; - statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${ + unfocused = + scheme + // { + border = colours.background; + indicator = colours.background; + childBorder = colours.background; + }; + focusedInactive = unfocused; + urgent = + scheme + // { + border = colours.red.bright; + indicator = colours.red.bright; + childBorder = colours.red.bright; + }; + placeholder = + scheme + // { + border = colours.green.bright; + indicator = colours.green.bright; + childBorder = colours.green.bright; + }; + }; + bars = [ + { + workspaceButtons = false; + fonts = { + names = ["Sans"]; + size = 8.0; + }; + mode = "hide"; # "dock" + position = "bottom"; + colors = rec { + background = colours.background; + separator = background; + statusline = colours.foreground; + bindingMode = { + background = colours.red.bright; + border = colours.background; + text = colours.foreground; + }; + }; + statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${ (pkgs.formats.toml {}).generate "i3status-rust.toml" (import { inherit (config.niveum) batteryName wirelessInterface; inherit colours; inherit pkgs; }) }"; - }]; + } + ]; modes.resize = { "Escape" = ''mode "default"''; "Return" = ''mode "default"''; @@ -207,24 +226,24 @@ in { "${modifier}+Shift+w" = "exec ${pkgs.scripts.k-lock}/bin/k-lock"; "${modifier}+d" = "exec ${pkgs.writers.writeDash "run" ''exec ${pkgs.rofi}/bin/rofi -modi run,window,ssh,filebrowser -show run''}"; "${modifier}+Shift+d" = "exec ${ - pkgs.writers.writeDash "notemenu" '' - set -efu - PATH=$PATH:${ - lib.makeBinPath [ pkgs.rofi pkgs.findutils pkgs.coreutils ] - } + pkgs.writers.writeDash "notemenu" '' + set -efu + PATH=$PATH:${ + lib.makeBinPath [pkgs.rofi pkgs.findutils pkgs.coreutils] + } - cd ~/notes - note_file=$({ - echo diary/$(date -I).md - echo diary/$(date -I -d yesterday).md - find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2 - } | rofi -dmenu -i -p 'notes') - if test "$note_file" - then - i3-sensible-terminal -e "$EDITOR" "$note_file" - fi - '' - }"; + cd ~/notes + note_file=$({ + echo diary/$(date -I).md + echo diary/$(date -I -d yesterday).md + find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2 + } | rofi -dmenu -i -p 'notes') + if test "$note_file" + then + i3-sensible-terminal -e "$EDITOR" "$note_file" + fi + '' + }"; "${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5"; "${modifier}+u" = "exec ${pkgs.scripts.unicodmenu}/bin/unicodmenu"; diff --git a/configs/kdeconnect.nix b/configs/kdeconnect.nix index 0166ce4..e0d59c7 100644 --- a/configs/kdeconnect.nix +++ b/configs/kdeconnect.nix @@ -1,13 +1,17 @@ { networking.firewall = { - allowedTCPPortRanges = [{ - from = 1714; - to = 1764; - }]; - allowedUDPPortRanges = [{ - from = 1714; - to = 1764; - }]; + allowedTCPPortRanges = [ + { + from = 1714; + to = 1764; + } + ]; + allowedUDPPortRanges = [ + { + from = 1714; + to = 1764; + } + ]; }; home-manager.users.me = { diff --git a/configs/keyboard.nix b/configs/keyboard.nix index bd05ce6..64174e1 100644 --- a/configs/keyboard.nix +++ b/configs/keyboard.nix @@ -1,17 +1,20 @@ -{ pkgs, lib, ... }: -let commaSep = builtins.concatStringsSep ","; +{ + pkgs, + lib, + ... +}: let + commaSep = builtins.concatStringsSep ","; in { services.xserver = { - layout = commaSep [ "de" "gr" ]; - xkbVariant = commaSep [ "T3" "polytonic" ]; + layout = commaSep ["de" "gr"]; + xkbVariant = commaSep ["T3" "polytonic"]; xkbOptions = - commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ]; + commaSep ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"]; libinput.enable = true; }; console.keyMap = "de"; # improve held key rate - services.xserver.displayManager.sessionCommands = - "${pkgs.xorg.xset}/bin/xset r rate 300 50"; + services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50"; } diff --git a/configs/khal.nix b/configs/khal.nix index 6befc8f..918762e 100644 --- a/configs/khal.nix +++ b/configs/khal.nix @@ -1,5 +1,9 @@ -{ config, pkgs, lib, ... }: -let +{ + config, + pkgs, + lib, + ... +}: let davHome = "~/.local/share/dav"; kmeinCloud = { davEndpoint = "https://cloud.xn--kiern-0qa.de/remote.php/dav"; @@ -11,14 +15,13 @@ let username = "kmein"; password = lib.fileContents ; }; -in -{ - environment.systemPackages = [ pkgs.khal pkgs.vdirsyncer pkgs.khard pkgs.todoman ]; +in { + environment.systemPackages = [pkgs.khal pkgs.vdirsyncer pkgs.khard pkgs.todoman]; systemd.user.services.vdirsyncer = { enable = true; - wants = [ "network-online.target" ]; - wantedBy = [ "default.target" ]; + wants = ["network-online.target"]; + wantedBy = ["default.target"]; startAt = "*:00/10"; script = '' ${pkgs.vdirsyncer}/bin/vdirsyncer sync diff --git a/configs/lb.nix b/configs/lb.nix index c1a8b51..861c19b 100644 --- a/configs/lb.nix +++ b/configs/lb.nix @@ -1,8 +1,11 @@ -{ lib, pkgs, ... }: { + lib, + pkgs, + ... +}: { systemd.services.lb-subscription = { enable = true; - wants = [ "network-online.target" ]; + wants = ["network-online.target"]; startAt = "weekly"; serviceConfig = { user = "kfm"; diff --git a/configs/mime.nix b/configs/mime.nix index f18ddba..ac01fe2 100644 --- a/configs/mime.nix +++ b/configs/mime.nix @@ -21,7 +21,6 @@ "x-scheme-handler/webcal" = "brave-browser.desktop"; "inode/directory" = "pcmanfm.desktop"; }; - }; }; } diff --git a/configs/monitoring.nix b/configs/monitoring.nix index 5ceb1aa..2f62a3e 100644 --- a/configs/monitoring.nix +++ b/configs/monitoring.nix @@ -1,5 +1,8 @@ -{ config, pkgs, ... }: { + config, + pkgs, + ... +}: { services.nginx.virtualHosts.default = { locations."= /stub_status".extraConfig = "stub_status;"; }; @@ -35,40 +38,48 @@ }; }; - networking.firewall.allowedTCPPorts = [ config.services.prometheus.exporters.node.port ]; + networking.firewall.allowedTCPPorts = [config.services.prometheus.exporters.node.port]; systemd.services.promtail = { description = "Promtail service for Loki"; - wantedBy = [ "multi-user.target" ]; + wantedBy = ["multi-user.target"]; serviceConfig = { ExecStart = '' - ${pkgs.grafana-loki}/bin/promtail --config.file ${(pkgs.formats.yaml {}).generate "promtail.yaml" { - server = { - http_listen_port = 28183; - grpc_listen_port = 0; - }; - positions.filename = "/tmp/positions.yaml"; - clients = [ - { url = "http://${if config.networking.hostName == "makanek" then "127.0.0.1" else "makanek.r"}:3100/loki/api/v1/push"; } - ]; - scrape_configs = [ - { - job_name = "journal"; - journal = { - max_age = "12h"; - labels.job = "systemd-journal"; - labels.host = config.networking.hostName; - }; - relabel_configs = [ - { - source_labels = [ "__journal__systemd_unit" ]; - target_label = "unit"; - } - ]; - } - ]; - }} + ${pkgs.grafana-loki}/bin/promtail --config.file ${ + (pkgs.formats.yaml {}).generate "promtail.yaml" { + server = { + http_listen_port = 28183; + grpc_listen_port = 0; + }; + positions.filename = "/tmp/positions.yaml"; + clients = [ + { + url = "http://${ + if config.networking.hostName == "makanek" + then "127.0.0.1" + else "makanek.r" + }:3100/loki/api/v1/push"; + } + ]; + scrape_configs = [ + { + job_name = "journal"; + journal = { + max_age = "12h"; + labels.job = "systemd-journal"; + labels.host = config.networking.hostName; + }; + relabel_configs = [ + { + source_labels = ["__journal__systemd_unit"]; + target_label = "unit"; + } + ]; + } + ]; + } + } ''; }; }; diff --git a/configs/mpv.nix b/configs/mpv.nix index 558d252..e847ca6 100644 --- a/configs/mpv.nix +++ b/configs/mpv.nix @@ -1,4 +1,8 @@ -{ pkgs, lib, ... }: let +{ + pkgs, + lib, + ... +}: let swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}"; in { environment.shellAliases.smpv = swallow "mpv"; @@ -7,7 +11,7 @@ in { programs.mpv = { enable = true; config = { - ytdl-raw-options = lib.concatStringsSep "," [ ''sub-lang="de,en"'' "write-sub=" "write-auto-sub=" ]; + ytdl-raw-options = lib.concatStringsSep "," [''sub-lang="de,en"'' "write-sub=" "write-auto-sub="]; screenshot-template = "%F-%wH%wM%wS-%#04n"; }; bindings = { diff --git a/configs/neomutt.nix b/configs/neomutt.nix index d4e1bf1..7923f40 100644 --- a/configs/neomutt.nix +++ b/configs/neomutt.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let mainMailbox = "posteo"; accounts.uni = { @@ -113,22 +116,23 @@ let trash = "[Gmail]/Papierkorb"; }; }; -in -{ - environment.systemPackages = [ pkgs.neomutt ]; +in { + environment.systemPackages = [pkgs.neomutt]; environment.shellAliases.mua = "${pkgs.neomutt}/bin/neomutt -f ${mainMailbox}←"; home-manager.users.me.xdg.configFile."neomutt/neomuttrc".text = '' - set mailcap_path = ${pkgs.writeText "mailcap" '' - text/plain; $EDITOR %s ; - text/html; ${pkgs.lynx}/bin/lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput; - image/*; ${pkgs.sxiv}/bin/sxiv %s ; - video/*; ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput - audio/*; ${pkgs.mpv}/bin/mpv %s ; - application/pdf; ${pkgs.zathura}/bin/zathura %s ; - application/pgp-encrypted; ${pkgs.gnupg}/bin/gpg -d '%s'; copiousoutput; - application/pgp-keys; ${pkgs.gnupg}/bin/gpg --import '%s'; copiousoutput; - ''}:$mailcap_path + set mailcap_path = ${ + pkgs.writeText "mailcap" '' + text/plain; $EDITOR %s ; + text/html; ${pkgs.lynx}/bin/lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput; + image/*; ${pkgs.sxiv}/bin/sxiv %s ; + video/*; ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput + audio/*; ${pkgs.mpv}/bin/mpv %s ; + application/pdf; ${pkgs.zathura}/bin/zathura %s ; + application/pgp-encrypted; ${pkgs.gnupg}/bin/gpg -d '%s'; copiousoutput; + application/pgp-keys; ${pkgs.gnupg}/bin/gpg --import '%s'; copiousoutput; + '' + }:$mailcap_path set sidebar_visible set sidebar_format = "%D%?F? [%F]?%* %?N?%N/?%S" @@ -180,69 +184,78 @@ in set header_cache="~/.cache/mutt" message_cachedir="~/.cache/mutt" - source ${pkgs.writeText "accounts.neomuttrc" '' - set realname = "Kierán Meinhardt" - account-hook . 'unset imap_user imap_pass smtp_user smtp_pass' - # set accordingly: postponed trash record - ${lib.concatStringsSep "\n\n" (lib.mapAttrsToList (name: account: let imapRoot = "imaps://${account.user}@${account.imap}"; in '' - account-hook ${account.user}@${account.imap} 'set imap_user="${account.user}" imap_pass="${account.password}"' - account-hook ${account.user}@${account.smtp} 'set smtp_user="${account.user}" smtp_pass="${account.password}"' - folder-hook ${account.user}@${account.imap} 'set smtp_url="${account.smtpSettings "${account.user}@${account.smtp}"}" from="${account.address}" record="${imapRoot}/${account.folders.sent}" postponed="${imapRoot}/${account.folders.drafts}" trash="${imapRoot}/${account.folders.trash}"' - named-mailboxes "${name}←" "${imapRoot}" "${name}→" "${imapRoot}/${account.folders.sent}" - '') accounts)} - ''} + source ${ + pkgs.writeText "accounts.neomuttrc" '' + set realname = "Kierán Meinhardt" + account-hook . 'unset imap_user imap_pass smtp_user smtp_pass' + # set accordingly: postponed trash record + ${ + lib.concatStringsSep "\n\n" (lib.mapAttrsToList (name: account: let + imapRoot = "imaps://${account.user}@${account.imap}"; + in '' + account-hook ${account.user}@${account.imap} 'set imap_user="${account.user}" imap_pass="${account.password}"' + account-hook ${account.user}@${account.smtp} 'set smtp_user="${account.user}" smtp_pass="${account.password}"' + folder-hook ${account.user}@${account.imap} 'set smtp_url="${account.smtpSettings "${account.user}@${account.smtp}"}" from="${account.address}" record="${imapRoot}/${account.folders.sent}" postponed="${imapRoot}/${account.folders.drafts}" trash="${imapRoot}/${account.folders.trash}"' + named-mailboxes "${name}←" "${imapRoot}" "${name}→" "${imapRoot}/${account.folders.sent}" + '') + accounts) + } + '' + } set spoolfile="${mainMailbox}" - source ${pkgs.writeText "colors.neomuttrc" '' - # Default index colors: - color index_number blue default - color index red default '.*' - color index_flags lightcyan default '.*' - color index_author yellow default '.*' - color index_subject lightblack default '.*' + source ${ + pkgs.writeText "colors.neomuttrc" '' + # Default index colors: + color index_number blue default + color index red default '.*' + color index_flags lightcyan default '.*' + color index_author yellow default '.*' + color index_subject lightblack default '.*' - # New mail is boldened: - color index_author lightyellow black "~N" - color index_subject lightwhite black "~N" + # New mail is boldened: + color index_author lightyellow black "~N" + color index_subject lightwhite black "~N" - # Flagged mail is highlighted: - color index_flags lightmagenta default '~F' + # Flagged mail is highlighted: + color index_flags lightmagenta default '~F' - # Other colors and aesthetic settings: - mono bold bold - mono underline underline - mono error bold - mono indicator reverse - # color sidebar_flagged red black - mono sidebar_new bold - color error red default - color message cyan default - color search brightmagenta default - color hdrdefault lightblack default - color quoted green default - color quoted1 blue default - color quoted2 cyan default - color quoted3 yellow default - color quoted4 red default - color quoted5 brightred default - color signature lightblack default - color tree color235 default + # Other colors and aesthetic settings: + mono bold bold + mono underline underline + mono error bold + mono indicator reverse + # color sidebar_flagged red black + mono sidebar_new bold + color error red default + color message cyan default + color search brightmagenta default + color hdrdefault lightblack default + color quoted green default + color quoted1 blue default + color quoted2 cyan default + color quoted3 yellow default + color quoted4 red default + color quoted5 brightred default + color signature lightblack default + color tree color235 default - # Regex highlighting: - color header red default "^(Date)" - color header yellow default "^(From)" - color header white default "^(B?CC)" - color header brightwhite default "^(Subject)" - color body cyan default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses - color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL - color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow - color body red default "(BAD signature)|^gpg: BAD signature from.*" - color body brightgreen default "(Good signature)|^gpg: Good signature .*" - color body brightyellow default "^gpg: " - mono body bold "^gpg: Good signature" - mono body bold "^gpg: BAD signature from.*" - color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" - ''} + # Regex highlighting: + color header red default "^(Date)" + color header yellow default "^(From)" + color header white default "^(B?CC)" + color header brightwhite default "^(Subject)" + color body cyan default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses + color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL + color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow + color body red default "(BAD signature)|^gpg: BAD signature from.*" + color body brightgreen default "(Good signature)|^gpg: Good signature .*" + color body brightyellow default "^gpg: " + mono body bold "^gpg: Good signature" + mono body bold "^gpg: BAD signature from.*" + color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" + '' + } ''; } diff --git a/configs/neovim.nix b/configs/neovim.nix index 02dcf70..b5cc7ac 100644 --- a/configs/neovim.nix +++ b/configs/neovim.nix @@ -1,21 +1,23 @@ -{ pkgs, ... }: { +{pkgs, ...}: { environment.variables.EDITOR = pkgs.lib.mkForce "nvim"; environment.shellAliases.vi = "nvim"; environment.shellAliases.vim = "nvim"; environment.shellAliases.view = "nvim -R"; nixpkgs.config.packageOverrides = pkgs: { - vimPlugins = pkgs.vimPlugins // { - cheat-sh-vim = pkgs.callPackage { }; - vim-fetch = pkgs.callPackage { }; - vim-colors-paramount = pkgs.callPackage { }; - vim-256noir = pkgs.callPackage { }; - icalendar-vim = pkgs.callPackage { }; - jq-vim = pkgs.callPackage { }; - vim-fsharp = pkgs.callPackage { }; - vim-reason-plus = pkgs.callPackage { }; - vim-mail = pkgs.callPackage { }; - }; + vimPlugins = + pkgs.vimPlugins + // { + cheat-sh-vim = pkgs.callPackage {}; + vim-fetch = pkgs.callPackage {}; + vim-colors-paramount = pkgs.callPackage {}; + vim-256noir = pkgs.callPackage {}; + icalendar-vim = pkgs.callPackage {}; + jq-vim = pkgs.callPackage {}; + vim-fsharp = pkgs.callPackage {}; + vim-reason-plus = pkgs.callPackage {}; + vim-mail = pkgs.callPackage {}; + }; }; environment.systemPackages = [ diff --git a/configs/networkmanager.nix b/configs/networkmanager.nix index 8f2123d..92537b6 100644 --- a/configs/networkmanager.nix +++ b/configs/networkmanager.nix @@ -1,20 +1,25 @@ -{ lib, pkgs, ... }: -let - profile = name: custom: lib.recursiveUpdate { - connection.id = name; - connection.type = "wifi"; - connection.interface-name = "wlp3s0"; - connection.permissions = ""; - wifi.mac-address-blacklist = ""; - wifi.ssid = name; - wifi.mode = "infrastructure"; - ipv4.dns-search = ""; - ipv4.method = "auto"; - ipv6.addr-gen-mode = "stable-privacy"; - ipv6.dns-search = ""; - ipv6.method = "auto"; - proxy = {}; - } custom; +{ + lib, + pkgs, + ... +}: let + profile = name: custom: + lib.recursiveUpdate { + connection.id = name; + connection.type = "wifi"; + connection.interface-name = "wlp3s0"; + connection.permissions = ""; + wifi.mac-address-blacklist = ""; + wifi.ssid = name; + wifi.mode = "infrastructure"; + ipv4.dns-search = ""; + ipv4.method = "auto"; + ipv6.addr-gen-mode = "stable-privacy"; + ipv6.dns-search = ""; + ipv6.method = "auto"; + proxy = {}; + } + custom; eduroamProfile = { connection.uuid = "eae9fee6-a7d2-4120-a609-440b457d6fcf"; wifi-security = { @@ -36,9 +41,8 @@ let phase2-auth = "pap"; }; }; -in -{ - imports = [ ]; +in { + imports = []; programs.nm-applet.enable = true; @@ -50,7 +54,7 @@ in ]; wifi.macAddress = "random"; ethernet.macAddress = "random"; - unmanaged = [ "docker*" ]; + unmanaged = ["docker*"]; profiles = lib.mapAttrs profile { Aether = { connection.uuid = "7138bb0f-1aeb-4905-890e-a6628427aa21"; @@ -86,7 +90,7 @@ in }; }; - users.users.me.extraGroups = [ "networkmanager" ]; + users.users.me.extraGroups = ["networkmanager"]; environment.systemPackages = [ pkgs.speedtest-cli diff --git a/configs/newsboat.nix b/configs/newsboat.nix index 29f314f..de886f6 100644 --- a/configs/newsboat.nix +++ b/configs/newsboat.nix @@ -1,11 +1,13 @@ -{ pkgs, config, ... }: -let +{ + pkgs, + config, + ... +}: let ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'"; youtube-download = "${pkgs.ts}/bin/ts ${pkgs.youtube-dl}/bin/youtube-dl -f ${ytdl-format} --add-metadata"; - newsboat-home = - "${config.users.users.me.home}/cloud/Seafile/Documents/newsboat"; + newsboat-home = "${config.users.users.me.home}/cloud/Seafile/Documents/newsboat"; linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler"; newsboat-config = pkgs.writeText "config" '' diff --git a/configs/nix.nix b/configs/nix.nix index 228c2f2..942fd4a 100644 --- a/configs/nix.nix +++ b/configs/nix.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { nixpkgs = { config.allowUnfree = true; overlays = [ diff --git a/configs/openweathermap.nix b/configs/openweathermap.nix index fa11ff4..ccb6383 100644 --- a/configs/openweathermap.nix +++ b/configs/openweathermap.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let openweathermap-repo = pkgs.fetchFromGitHub { owner = "ip1981"; repo = "openweathermap"; @@ -15,5 +18,5 @@ in { ''; }; - environment.systemPackages = [ pkgs.weather ]; + environment.systemPackages = [pkgs.weather]; } diff --git a/configs/packages.nix b/configs/packages.nix index a666298..eb347af 100644 --- a/configs/packages.nix +++ b/configs/packages.nix @@ -1,13 +1,19 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let hc = pkgs.callPackage {}; worldradio = pkgs.callPackage {}; menstruation = pkgs.callPackage {}; pandoc-doc = pkgs.callPackage {}; - nixpkgs-unstable = import { config.allowUnfree = true; }; + nixpkgs-unstable = import {config.allowUnfree = true;}; - zoteroStyle = { name, sha256 }: { + zoteroStyle = { + name, + sha256, + }: { name = "${name}.csl"; path = pkgs.fetchurl { url = "https://www.zotero.org/styles/${name}"; @@ -29,28 +35,28 @@ let }) ]; - - astrolog = nixpkgs-unstable.astrolog.overrideAttrs (old: old // { - installPhase = '' - ${old.installPhase} - # set sensible defaults - sed -i ' - /^-z /s/8:00W/1:00E/ # timezone - /^-zl /s/122W19:59 47N36:35/13E22:42 52N27:42/ # default location - /^-zj /s/"Current moment now"/Now/ # default name - /^-zj /s/"Seattle, WA, USA"/Berlin/ # default location - /^_k/s/_k/=k/ # use color - /^_Yd/s/_Yd/=Yd/ # sensible date format - /^_Yt/s/_Yt/=Yt/ # sensible time format - /^_Yv/s/_Yv/=Yv/ # sensible length format - /^:Xbw/s/:Xbw/:Xbn/ # set X11 bitmap format - /^:I /s/80/120/ # wider text output - ' $out/astrolog/astrolog.as - ''; - }); + astrolog = nixpkgs-unstable.astrolog.overrideAttrs (old: + old + // { + installPhase = '' + ${old.installPhase} + # set sensible defaults + sed -i ' + /^-z /s/8:00W/1:00E/ # timezone + /^-zl /s/122W19:59 47N36:35/13E22:42 52N27:42/ # default location + /^-zj /s/"Current moment now"/Now/ # default name + /^-zj /s/"Seattle, WA, USA"/Berlin/ # default location + /^_k/s/_k/=k/ # use color + /^_Yd/s/_Yd/=Yd/ # sensible date format + /^_Yt/s/_Yt/=Yt/ # sensible time format + /^_Yv/s/_Yv/=Yv/ # sensible length format + /^:Xbw/s/:Xbw/:Xbn/ # set X11 bitmap format + /^:I /s/80/120/ # wider text output + ' $out/astrolog/astrolog.as + ''; + }); recht = pkgs.callPackage {}; - in { home-manager.users.me.home.file = { ".csl".source = cslDirectory; @@ -120,6 +126,7 @@ in { anki # flashcards jbofihe # lojbanic software nixpkgs-unstable.zoom-us # video conferencing + nixpkgs-unstable.alejandra # nix formatter pdfgrep # search in pdf pdftk # pdf toolkit mupdf @@ -235,7 +242,7 @@ in { nodePackages.javascript-typescript-langserver texlive.combined.scheme-full latexrun - (aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ])) + (aspellWithDicts (dict: [dict.de dict.en dict.en-computers])) # haskellPackages.pandoc-citeproc scripts.text2pdf lowdown @@ -255,10 +262,8 @@ in { shellcheck ]; - home-manager.users.me.xdg.configFile."pycodestyle".text = '' [pycodestyle] max-line-length = 110 ''; - } diff --git a/configs/polkit.nix b/configs/polkit.nix index 8b321bb..3763f85 100644 --- a/configs/polkit.nix +++ b/configs/polkit.nix @@ -1,8 +1,6 @@ -{ config, ... }: -let +{config, ...}: let user = config.users.users.me.name; -in -{ +in { security.polkit.extraConfig = '' polkit.addRule(function(action, subject) { if (subject.user == "${user}" && action.id == "org.freedesktop.systemd1.manage-units") { diff --git a/configs/power-action.nix b/configs/power-action.nix index f03bfaa..7006442 100644 --- a/configs/power-action.nix +++ b/configs/power-action.nix @@ -1,9 +1,11 @@ -{ pkgs, config, ... }: -let - suspend = pkgs.writers.writeDash "suspend" "${pkgs.systemd}/bin/systemctl suspend"; -in { - imports = [ ]; + pkgs, + config, + ... +}: let + suspend = pkgs.writers.writeDash "suspend" "${pkgs.systemd}/bin/systemctl suspend"; +in { + imports = []; krebs.power-action = { enable = true; diff --git a/configs/printing.nix b/configs/printing.nix index ac773d5..725b6b2 100644 --- a/configs/printing.nix +++ b/configs/printing.nix @@ -1,33 +1,35 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let inherit (import ) localAddresses; hp-driver = pkgs.hplipWithPlugin; in { services.printing = { enable = true; - drivers = [ hp-driver ]; + drivers = [hp-driver]; }; hardware.sane = { enable = true; - extraBackends = [ hp-driver ]; + extraBackends = [hp-driver]; }; - hardware.printers.ensurePrinters = [{ - name = "OfficeJet"; - location = "Zimmer"; - deviceUri = "https://${localAddresses.officejet}"; - model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd"; - ppdOptions = { - Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None - PageSize = "A4"; # A4 A4.FB A4.Duplex - MediaType = "Plain"; - OutputMode = "Normal"; - ColorModel = "KGray"; # RGB CMYGray KGray - }; - }]; + hardware.printers.ensurePrinters = [ + { + name = "OfficeJet"; + location = "Zimmer"; + deviceUri = "https://${localAddresses.officejet}"; + model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd"; + ppdOptions = { + Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None + PageSize = "A4"; # A4 A4.FB A4.Duplex + MediaType = "Plain"; + OutputMode = "Normal"; + ColorModel = "KGray"; # RGB CMYGray KGray + }; + } + ]; } +/* + HP/hp-officejet_4650_series.ppd.gz + drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd + */ -/* HP/hp-officejet_4650_series.ppd.gz - drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd -*/ diff --git a/configs/redshift.nix b/configs/redshift.nix index e44a947..647360b 100644 --- a/configs/redshift.nix +++ b/configs/redshift.nix @@ -1 +1 @@ -{ services.redshift.enable = false; } +{services.redshift.enable = false;} diff --git a/configs/retiolum.nix b/configs/retiolum.nix index 9f3f5b2..8b43e20 100644 --- a/configs/retiolum.nix +++ b/configs/retiolum.nix @@ -1,7 +1,11 @@ -{ config, pkgs, ... }: { +{ + config, + pkgs, + ... +}: { imports = [ ]; - networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; }; + networking.hosts = {"42:0:ca48:f98f:63d7:31ce:922b:245d" = ["go"];}; } diff --git a/configs/rofi.nix b/configs/rofi.nix index e1b46b7..b1956a1 100644 --- a/configs/rofi.nix +++ b/configs/rofi.nix @@ -1,7 +1,10 @@ -{ config, pkgs, ... }: -let +{ + config, + pkgs, + ... +}: let inherit (import ) colours; -in{ +in { home-manager.users.me.programs.rofi = { enable = true; font = "Monospace 10"; diff --git a/configs/seafile.nix b/configs/seafile.nix index 75f7965..9522286 100644 --- a/configs/seafile.nix +++ b/configs/seafile.nix @@ -1,5 +1,8 @@ -{ pkgs, config, ... }: { + pkgs, + config, + ... +}: { services.xserver.displayManager.sessionCommands = "${pkgs.seafile-client}/bin/seafile-applet &"; home-manager.users.me.xdg.configFile = { @@ -16,5 +19,5 @@ }; }; - environment.systemPackages = [ pkgs.seafile-client ]; + environment.systemPackages = [pkgs.seafile-client]; } diff --git a/configs/ssh.nix b/configs/ssh.nix index 245d0dd..0a0ab5c 100644 --- a/configs/ssh.nix +++ b/configs/ssh.nix @@ -1,5 +1,9 @@ -{ pkgs, config, lib, ... }: -let +{ + pkgs, + config, + lib, + ... +}: let inherit (import ) sshPort kieran; in { services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add"; diff --git a/configs/sshd.nix b/configs/sshd.nix index 32730e2..d04c89e 100644 --- a/configs/sshd.nix +++ b/configs/sshd.nix @@ -1,13 +1,16 @@ -{ config, lib, pkgs, ... }: -let - inherit (import ) sshPort kieran; -in { + config, + lib, + pkgs, + ... +}: let + inherit (import ) sshPort kieran; +in { users.motd = "Welcome to ${config.networking.hostName}!"; services.openssh = { enable = true; - ports = [ sshPort ]; + ports = [sshPort]; passwordAuthentication = false; forwardX11 = true; }; diff --git a/configs/stardict.nix b/configs/stardict.nix index e3d6f8c..416c5e8 100644 --- a/configs/stardict.nix +++ b/configs/stardict.nix @@ -1,5 +1,9 @@ -{ config, pkgs, lib, ... }: -let +{ + config, + pkgs, + lib, + ... +}: let dictionaries = { lojban = { jbo-deu = pkgs.fetchzip { @@ -100,7 +104,9 @@ let sha256 = "0cx086zvb86bmz7i8vnsch4cj4fb0cp165g4hig4982zakj6f2jd"; }; }; - sanskrit = let repo = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f"; in { + sanskrit = let + repo = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f"; + in { BoehtlingkRoth = pkgs.fetchzip { url = "${repo}/sa-head/german-entries/tars/Bohtlingk-and-Roth-Grosses-Petersburger-Worterbuch__2021-10-05_14-23-18Z__19MB.tar.gz"; sha256 = "13414a8rgd7hd5ffar6nl68nk3ys60wjkgb7m11hp0ahaasmf6ly"; @@ -154,13 +160,14 @@ let }; }; - makeStardictDataDir = dicts: pkgs.linkFarm "dictionaries" (lib.mapAttrsToList (name: path: { inherit name path; }) dicts); + makeStardictDataDir = dicts: pkgs.linkFarm "dictionaries" (lib.mapAttrsToList (name: path: {inherit name path;}) dicts); - makeStardict = name: dicts: pkgs.writers.writeDashBin name '' - set -efu - export SDCV_PAGER=${toString sdcvPager} - exec ${pkgs.sdcv}/bin/sdcv --color --only-data-dir --data-dir ${makeStardictDataDir dicts} "$@" - ''; + makeStardict = name: dicts: + pkgs.writers.writeDashBin name '' + set -efu + export SDCV_PAGER=${toString sdcvPager} + exec ${pkgs.sdcv}/bin/sdcv --color --only-data-dir --data-dir ${makeStardictDataDir dicts} "$@" + ''; sdcvPager = pkgs.writeDash "sdcvPager" '' export PATH=${lib.makeBinPath [pkgs.gnused pkgs.ncurses pkgs.less]} @@ -266,8 +273,7 @@ let s!]*>!!gI " | less -FR ''; -in -{ +in { environment.etc.stardict.source = toString (makeStardictDataDir ({ Crum = pkgs.fetchzip { url = "http://download.huzheng.org/misc/stardict-Coptic-English_all_dialects-2.4.2.tar.bz2"; @@ -281,7 +287,12 @@ in url = "https://github.com/latin-dict/Smith1890/releases/download/v1.0/Smith1890-stardict.zip"; sha256 = "0vpsv62p2lrzmgys4d1swpnc6lqhdi7rxwkj2ngy3lz5dk3fysyb"; }; - } // dictionaries.classics // dictionaries.sanskrit // dictionaries.oed // dictionaries.russian // dictionaries.englishGerman)); + } + // dictionaries.classics + // dictionaries.sanskrit + // dictionaries.oed + // dictionaries.russian + // dictionaries.englishGerman)); environment.systemPackages = [ pkgs.goldendict @@ -293,65 +304,65 @@ in (makeStardict "jbo" dictionaries.lojban) ]; } - /* -https://github.com/latin-dict/Georges1910/releases/download/v1.0/Georges1910-stardict.zip -https://github.com/nikita-moor/latin-dictionary/releases/download/2020-02-14/LiddellScott1940-stardict.zip -http://download.huzheng.org/bigdict/stardict-Cambridge_Dictionary_of_American_Idioms-2.4.2.tar.bz2 -http://download.huzheng.org/bigdict/stardict-Concise_Oxford_Thesaurus_2nd_Ed-2.4.2.tar.bz2 -http://download.huzheng.org/bigdict/stardict-Urban_Dictionary_P1-2.4.2.tar.bz2 -http://download.huzheng.org/bigdict/stardict-Urban_Dictionary_P2-2.4.2.tar.bz2 + https://github.com/latin-dict/Georges1910/releases/download/v1.0/Georges1910-stardict.zip + https://github.com/nikita-moor/latin-dictionary/releases/download/2020-02-14/LiddellScott1940-stardict.zip + http://download.huzheng.org/bigdict/stardict-Cambridge_Dictionary_of_American_Idioms-2.4.2.tar.bz2 + http://download.huzheng.org/bigdict/stardict-Concise_Oxford_Thesaurus_2nd_Ed-2.4.2.tar.bz2 + http://download.huzheng.org/bigdict/stardict-Urban_Dictionary_P1-2.4.2.tar.bz2 + http://download.huzheng.org/bigdict/stardict-Urban_Dictionary_P2-2.4.2.tar.bz2 + + Duden_Rechtschreibung = pkgs.fetchzip { + url = "http://download.huzheng.org/babylon/german/stardict-Duden_Rechtschreibung-2.4.2.tar.bz2"; + sha256 = "0xiprb45s88w62rn8rlbjrsagbiliay9hszsiy20glwabf6zsfji"; + }; + Duden = pkgs.fetchzip { + url = "http://download.huzheng.org/de/stardict-duden-2.4.2.tar.bz2"; + sha256 = "049i4ynfqqxykv1nlkyks94mvn14s22qdax5gg7hx1ks5y4xw64j"; + }; + FreeOnlineDictionaryOfComputing = pkgs.fetchzip { + url = "http://download.huzheng.org/dict.org/stardict-dictd_www.dict.org_foldoc-2.4.2.tar.bz2"; + sha256 = "1lw2i8dzxpx929cpgvv0x366dnh4drr10wzqmrhcd0kvwglqawgm"; + }; + Cappeller = pkgs.fetchzip { + url = "${repo}/sa-head/german-entries/tars/capeller-sanskrit-german__2021-10-05_14-23-18Z__1MB.tar.gz"; + sha256 = "0jwrj2aih2lrcjg0lqm8jrvq9vsas9s8j4c9ggbg2n0jyz03kci3"; + stripRoot = false; + }; + Yates = pkgs.fetchzip { + url = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f/sa-head/en-entries/tars/yates__2021-10-05_14-23-18Z__2MB.tar.gz"; + sha256 = "1k7gbalysf48pwa06zfykrqhdk466g35xy64b30k4z8bybgdn8z2"; + stripRoot = false; + }; + Wilson = pkgs.fetchzip { + url = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f/sa-head/en-entries/tars/wilson__2021-10-05_14-23-18Z__3MB.tar.gz"; + sha256 = "0r5z1xif56zlw9r2jp3fvwmcjv4f2fhd9r17j30nah9awx2m1isg"; + stripRoot = false; + }; + SpokenSanskrit = pkgs.fetchzip { + url = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f/sa-head/en-entries/tars/spokensanskrit__2019-01-12_05-13-52Z__12MB.tar.gz"; + sha256 = "0x8j657mawvdcyd1knzvf33yp15z77d661n3h6g9hcj7wn9s5xyk"; + stripRoot = false; + }; + Grassmann = pkgs.fetchzip { + url = "${repo}/sa-head/german-entries/tars/grassman-sanskrit-german__2021-10-05_14-23-18Z__2MB.tar.gz"; + sha256 = "0jalsykaxkl6wzrky72lz8g3jdz26lmjpyibbfaf7a5vvnr55k02"; + stripRoot = false; + }; + Benfey = pkgs.fetchzip { + url = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f/sa-head/en-entries/tars/benfey__2021-10-05_14-23-18Z__2MB.tar.gz"; + sha256 = "0lj3hgphqgnihn482g9kgjwbvdrcd38vc29v1fi36srn08qdhvcb"; + stripRoot = false; + }; + ApteSa = pkgs.fetchzip { + url = "${repo}/sa-head/en-entries/tars/apte-sa__2021-12-18_13-20-56Z__6MB.tar.gz"; + sha256 = "0cq1dd02d1pvmjnibbs2cscifjnk2z0nqccf5yzzilxkzsrarh32"; + stripRoot = false; + }; + MacDonell = pkgs.fetchzip { + url = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f/sa-head/en-entries/tars/macdonell__2021-10-05_14-23-18Z__2MB.tar.gz"; + sha256 = "1yzmj0393mxvjv4n2lnvd2c722v2bmxxiyq7pscdwni3bxip3h8s"; + stripRoot = false; + }; + */ -Duden_Rechtschreibung = pkgs.fetchzip { - url = "http://download.huzheng.org/babylon/german/stardict-Duden_Rechtschreibung-2.4.2.tar.bz2"; - sha256 = "0xiprb45s88w62rn8rlbjrsagbiliay9hszsiy20glwabf6zsfji"; -}; -Duden = pkgs.fetchzip { - url = "http://download.huzheng.org/de/stardict-duden-2.4.2.tar.bz2"; - sha256 = "049i4ynfqqxykv1nlkyks94mvn14s22qdax5gg7hx1ks5y4xw64j"; -}; -FreeOnlineDictionaryOfComputing = pkgs.fetchzip { - url = "http://download.huzheng.org/dict.org/stardict-dictd_www.dict.org_foldoc-2.4.2.tar.bz2"; - sha256 = "1lw2i8dzxpx929cpgvv0x366dnh4drr10wzqmrhcd0kvwglqawgm"; -}; -Cappeller = pkgs.fetchzip { - url = "${repo}/sa-head/german-entries/tars/capeller-sanskrit-german__2021-10-05_14-23-18Z__1MB.tar.gz"; - sha256 = "0jwrj2aih2lrcjg0lqm8jrvq9vsas9s8j4c9ggbg2n0jyz03kci3"; - stripRoot = false; -}; -Yates = pkgs.fetchzip { - url = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f/sa-head/en-entries/tars/yates__2021-10-05_14-23-18Z__2MB.tar.gz"; - sha256 = "1k7gbalysf48pwa06zfykrqhdk466g35xy64b30k4z8bybgdn8z2"; - stripRoot = false; -}; -Wilson = pkgs.fetchzip { - url = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f/sa-head/en-entries/tars/wilson__2021-10-05_14-23-18Z__3MB.tar.gz"; - sha256 = "0r5z1xif56zlw9r2jp3fvwmcjv4f2fhd9r17j30nah9awx2m1isg"; - stripRoot = false; -}; -SpokenSanskrit = pkgs.fetchzip { - url = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f/sa-head/en-entries/tars/spokensanskrit__2019-01-12_05-13-52Z__12MB.tar.gz"; - sha256 = "0x8j657mawvdcyd1knzvf33yp15z77d661n3h6g9hcj7wn9s5xyk"; - stripRoot = false; -}; -Grassmann = pkgs.fetchzip { - url = "${repo}/sa-head/german-entries/tars/grassman-sanskrit-german__2021-10-05_14-23-18Z__2MB.tar.gz"; - sha256 = "0jalsykaxkl6wzrky72lz8g3jdz26lmjpyibbfaf7a5vvnr55k02"; - stripRoot = false; -}; -Benfey = pkgs.fetchzip { - url = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f/sa-head/en-entries/tars/benfey__2021-10-05_14-23-18Z__2MB.tar.gz"; - sha256 = "0lj3hgphqgnihn482g9kgjwbvdrcd38vc29v1fi36srn08qdhvcb"; - stripRoot = false; -}; -ApteSa = pkgs.fetchzip { - url = "${repo}/sa-head/en-entries/tars/apte-sa__2021-12-18_13-20-56Z__6MB.tar.gz"; - sha256 = "0cq1dd02d1pvmjnibbs2cscifjnk2z0nqccf5yzzilxkzsrarh32"; - stripRoot = false; -}; -MacDonell = pkgs.fetchzip { - url = "https://github.com/indic-dict/stardict-sanskrit/raw/4ebd2d3db5820f7cbe3a649c3d5aa8f83d19b29f/sa-head/en-entries/tars/macdonell__2021-10-05_14-23-18Z__2MB.tar.gz"; - sha256 = "1yzmj0393mxvjv4n2lnvd2c722v2bmxxiyq7pscdwni3bxip3h8s"; - stripRoot = false; -}; -*/ diff --git a/configs/sudo.nix b/configs/sudo.nix index 1e58b2d..a122336 100644 --- a/configs/sudo.nix +++ b/configs/sudo.nix @@ -6,5 +6,5 @@ ''; }; - users.users.me.extraGroups = [ "wheel" ]; + users.users.me.extraGroups = ["wheel"]; } diff --git a/configs/sxiv.nix b/configs/sxiv.nix index 0b75f68..068191d 100644 --- a/configs/sxiv.nix +++ b/configs/sxiv.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let important-directories = pkgs.writeText "directories" '' h ~/ d ~/cloud/Dropbox/ @@ -12,7 +15,7 @@ let cf ''${XDG_CONFIG_HOME:-$HOME/.config} ''; in { - environment.systemPackages = [ pkgs.sxiv ]; + environment.systemPackages = [pkgs.sxiv]; # TODO fix home-manager.users.me.xdg.configFile."sxiv/exec/key-handler".source = diff --git a/configs/telegram-bots/astrology.nix b/configs/telegram-bots/astrology.nix index 9613479..48e5ea0 100644 --- a/configs/telegram-bots/astrology.nix +++ b/configs/telegram-bots/astrology.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let nixpkgs-unstable = import {}; toSymbols = pkgs.writers.writeDash "to-symbols" '' ${pkgs.gnused}/bin/sed ' @@ -42,7 +45,7 @@ in { enable = true; time = "*:0/1"; token = lib.strings.fileContents ; - chatIds = [ "-1001796440545" ]; + chatIds = ["-1001796440545"]; command = toString (pkgs.writers.writeDash "common-transits" '' now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//') date=$(${pkgs.coreutils}/bin/date +'%m %d %Y') diff --git a/configs/telegram-bots/autorenkalender.nix b/configs/telegram-bots/autorenkalender.nix index 578e82a..0f7a947 100644 --- a/configs/telegram-bots/autorenkalender.nix +++ b/configs/telegram-bots/autorenkalender.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let autorenkalender-package = pkgs.fetchFromGitHub { owner = "kmein"; repo = "autorenkalender"; @@ -7,13 +10,13 @@ let sha256 = "1pa7sjg33vdnjianrqldv445jdzzv3mn231ljk1j58hs0cd505gs"; }; autorenkalender = - pkgs.python3Packages.callPackage autorenkalender-package { }; + pkgs.python3Packages.callPackage autorenkalender-package {}; in { niveum.telegramBots.autorenkalender = { enable = true; time = "07:00"; token = lib.strings.fileContents ; - chatIds = [ "@autorenkalender" ]; + chatIds = ["@autorenkalender"]; parseMode = "Markdown"; command = "${autorenkalender}/bin/autorenkalender"; }; diff --git a/configs/telegram-bots/default.nix b/configs/telegram-bots/default.nix index 00885ad..bb79b2a 100644 --- a/configs/telegram-bots/default.nix +++ b/configs/telegram-bots/default.nix @@ -1,5 +1,9 @@ -{ config, pkgs, lib, ... }: -let +{ + config, + pkgs, + lib, + ... +}: let telebots = pkgs.callPackage {}; reverseDirectory = "/run/telegram-reverse"; proverbDirectory = "/run/telegram-proverb"; @@ -14,17 +18,18 @@ in { ]; - systemd.tmpfiles.rules = map (path: tmpfilesConfig { - type = "d"; - mode = "0750"; - age = "1h"; - inherit path; - }) [ reverseDirectory proverbDirectory ]; + systemd.tmpfiles.rules = map (path: + tmpfilesConfig { + type = "d"; + mode = "0750"; + age = "1h"; + inherit path; + }) [reverseDirectory proverbDirectory]; systemd.services.telegram-reverse = { - wantedBy = [ "multi-user.target" ]; + wantedBy = ["multi-user.target"]; description = "Telegram reverse bot"; - path = [ pkgs.ffmpeg ]; + path = [pkgs.ffmpeg]; environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents ; enable = true; script = "${telebots}/bin/telegram-reverse"; @@ -33,7 +38,7 @@ in { }; systemd.services.telegram-betacode = { - wantedBy = [ "multi-user.target" ]; + wantedBy = ["multi-user.target"]; description = "Telegram beta code bot"; environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents ; enable = true; @@ -42,7 +47,7 @@ in { }; systemd.services.telegram-proverb = { - wantedBy = [ "multi-user.target" ]; + wantedBy = ["multi-user.target"]; description = "Telegram proverb bot"; environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents ; enable = true; diff --git a/configs/telegram-bots/literature-quote.nix b/configs/telegram-bots/literature-quote.nix index 04f919d..c09c568 100644 --- a/configs/telegram-bots/literature-quote.nix +++ b/configs/telegram-bots/literature-quote.nix @@ -1,13 +1,16 @@ -{ pkgs, lib, ... }: -let - scripts = import { inherit pkgs lib; }; +{ + pkgs, + lib, + ... +}: let + scripts = import {inherit pkgs lib;}; inherit (scripts) literature-quote; in { niveum.telegramBots.quotebot = { enable = true; time = "08/6:00"; token = lib.strings.fileContents ; - chatIds = [ "18980945" "757821027" "455964311" ]; + chatIds = ["18980945" "757821027" "455964311"]; command = "${literature-quote}/bin/literature-quote"; parseMode = "Markdown"; }; diff --git a/configs/telegram-bots/nachtischsatan.nix b/configs/telegram-bots/nachtischsatan.nix index a84c84e..6b7a5bd 100644 --- a/configs/telegram-bots/nachtischsatan.nix +++ b/configs/telegram-bots/nachtischsatan.nix @@ -1,8 +1,11 @@ -{ pkgs, lib, ... }: -let - nachtischsatan-bot = { token }: +{ + pkgs, + lib, + ... +}: let + nachtischsatan-bot = {token}: pkgs.writers.writePython3 "nachtischsatan-bot" { - libraries = [ pkgs.python3Packages.python-telegram-bot ]; + libraries = [pkgs.python3Packages.python-telegram-bot]; } '' from telegram.ext import Updater, MessageHandler from telegram.ext.filters import Filters @@ -23,7 +26,7 @@ let ''; in { systemd.services.telegram-nachtischsatan = { - wantedBy = [ "multi-user.target" ]; + wantedBy = ["multi-user.target"]; description = "*flubberflubber*"; enable = true; script = toString (nachtischsatan-bot { diff --git a/configs/telegram-bots/tlg-wotd.nix b/configs/telegram-bots/tlg-wotd.nix index 38eee2f..c4a3a18 100644 --- a/configs/telegram-bots/tlg-wotd.nix +++ b/configs/telegram-bots/tlg-wotd.nix @@ -1,10 +1,13 @@ -{ pkgs, lib, ... }: { + pkgs, + lib, + ... +}: { niveum.telegramBots.tlg-wotd = { enable = true; time = "9:30"; token = lib.strings.fileContents ; - chatIds = [ "@tlgwotd" ]; + chatIds = ["@tlgwotd"]; command = toString (pkgs.writers.writeDash "tlg-wotd" '' ${pkgs.curl}/bin/curl -sSL http://stephanus.tlg.uci.edu/Iris/Wotd \ | ${pkgs.recode}/bin/recode html..utf8 \ diff --git a/configs/theming.nix b/configs/theming.nix index 55ff483..46478fb 100644 --- a/configs/theming.nix +++ b/configs/theming.nix @@ -1,13 +1,16 @@ -{ lib, config, pkgs, ... }: -let +{ + lib, + config, + pkgs, + ... +}: let theme = (import ).theme pkgs; in { - environment.systemPackages = - [ theme.gtk.package theme.icon.package theme.cursor.package ]; + environment.systemPackages = [theme.gtk.package theme.icon.package theme.cursor.package]; services.xserver.displayManager.lightdm.greeters.gtk = { - theme = { inherit (theme.gtk) name package; }; - iconTheme = { inherit (theme.icon) name package; }; + theme = {inherit (theme.gtk) name package;}; + iconTheme = {inherit (theme.icon) name package;}; }; home-manager.users.me = { @@ -20,6 +23,6 @@ in { enable = true; platformTheme = "gtk"; }; - xsession.pointerCursor = theme.cursor // { size = 16; }; + xsession.pointerCursor = theme.cursor // {size = 16;}; }; } diff --git a/configs/tmux.nix b/configs/tmux.nix index 24eb975..7eed14c 100644 --- a/configs/tmux.nix +++ b/configs/tmux.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { environment.systemPackages = [ pkgs.tmuxp pkgs.reptyr # move programs over to a tmux session diff --git a/configs/traadfri.nix b/configs/traadfri.nix index 6162961..0fcd71e 100644 --- a/configs/traadfri.nix +++ b/configs/traadfri.nix @@ -1,10 +1,12 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let inherit (import ) localAddresses; living-room-id = 131090; -in -{ - imports = [ ]; +in { + imports = []; environment.systemPackages = [ (pkgs.writers.writeDashBin "traadfri-party" '' diff --git a/configs/vscode.nix b/configs/vscode.nix index 6b683eb..8210338 100644 --- a/configs/vscode.nix +++ b/configs/vscode.nix @@ -1 +1 @@ -{ pkgs, ... }: { environment.systemPackages = [ pkgs.vscode ]; } +{pkgs, ...}: {environment.systemPackages = [pkgs.vscode];} diff --git a/configs/wallpaper.nix b/configs/wallpaper.nix index 47d2678..e9de2d7 100644 --- a/configs/wallpaper.nix +++ b/configs/wallpaper.nix @@ -1,6 +1,9 @@ -{ pkgs, lib, ... }: { - imports = [ ]; + pkgs, + lib, + ... +}: { + imports = []; krebs.fetchWallpaper = { enable = true; diff --git a/configs/watson.nix b/configs/watson.nix index c70a803..67a1e05 100644 --- a/configs/watson.nix +++ b/configs/watson.nix @@ -1,6 +1,9 @@ -{ config, pkgs, ... }: { - environment.systemPackages = [ pkgs.watson ]; + config, + pkgs, + ... +}: { + environment.systemPackages = [pkgs.watson]; environment.variables.WATSON_DIR = "${config.users.users.me.home}/cloud/Seafile/Documents/watson"; } diff --git a/configs/zsh.nix b/configs/zsh.nix index 93499df..bb1eba8 100644 --- a/configs/zsh.nix +++ b/configs/zsh.nix @@ -1,4 +1,8 @@ -{ config, pkgs, ... }: { +{ + config, + pkgs, + ... +}: { home-manager.users.me.home.file.".zshrc".text = '' # nothing to see here ''; @@ -21,7 +25,7 @@ enableCompletion = true; autosuggestions.enable = true; syntaxHighlighting.enable = true; - syntaxHighlighting.highlighters = [ "main" "brackets" "pattern" "line" ]; + syntaxHighlighting.highlighters = ["main" "brackets" "pattern" "line"]; interactiveShellInit = '' setopt INTERACTIVE_COMMENTS CORRECT setopt MULTIOS diff --git a/flake.nix b/flake.nix index 36cc1d0..8c1601a 100644 --- a/flake.nix +++ b/flake.nix @@ -16,60 +16,100 @@ }; # legacy - menstruation-backend = { url = "github:kmein/menstruation.rs"; flake = false; }; - menstruation-telegram = { url = "github:kmein/menstruation-telegram"; flake = false; }; - nix-writers = { url = "git+https://cgit.krebsco.de/nix-writers"; flake = false; }; - recht = { url = "github:kmein/recht"; flake = false; }; - retiolum = { url = "github:krebs/retiolum"; flake = false; }; - scripts = { url = "github:kmein/scripts"; flake = false; }; - stockholm = { url = "git+https://cgit.lassul.us/stockholm"; flake = false; }; - telebots = { url = "github:kmein/telebots"; flake = false; }; - tinc-graph = { url = "github:kmein/tinc-graph"; flake = false; }; - traadfri = { url = "github:kmein/traadfri"; flake = false; }; - tuna = { url = "github:kmein/tuna"; flake = false; }; + menstruation-backend = { + url = "github:kmein/menstruation.rs"; + flake = false; + }; + menstruation-telegram = { + url = "github:kmein/menstruation-telegram"; + flake = false; + }; + nix-writers = { + url = "git+https://cgit.krebsco.de/nix-writers"; + flake = false; + }; + recht = { + url = "github:kmein/recht"; + flake = false; + }; + retiolum = { + url = "github:krebs/retiolum"; + flake = false; + }; + scripts = { + url = "github:kmein/scripts"; + flake = false; + }; + stockholm = { + url = "git+https://cgit.lassul.us/stockholm"; + flake = false; + }; + telebots = { + url = "github:kmein/telebots"; + flake = false; + }; + tinc-graph = { + url = "github:kmein/tinc-graph"; + flake = false; + }; + traadfri = { + url = "github:kmein/traadfri"; + flake = false; + }; + tuna = { + url = "github:kmein/tuna"; + flake = false; + }; }; - outputs = - { self - , flake-utils - , home-manager - , krops - , menstruation-backend - , menstruation-telegram - , nix-writers - , nixpkgs - , nixpkgs-unstable - , recht - , retiolum - , scripts - , stockholm - , telebots - , tinc-graph - , traadfri - , tuna - }@inputs: - let + outputs = { + self, + flake-utils, + home-manager, + krops, + menstruation-backend, + menstruation-telegram, + nix-writers, + nixpkgs, + nixpkgs-unstable, + recht, + retiolum, + scripts, + stockholm, + telebots, + tinc-graph, + traadfri, + tuna, + } @ inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; - source = name: { - niveum.file = toString ./.; - nixos-config.symlink = "niveum/systems/${name}/configuration.nix"; - system-secrets.pass = { - dir = toString ~/.password-store; - name = "systems/${name}"; - }; - secrets.pass = { - dir = toString ~/.password-store; - name = "shared"; - }; - } // nixpkgs.lib.mapAttrs' (name: value: { - inherit name; - value.file = toString value; - }) (nixpkgs.lib.filterAttrs (name: _: !builtins.elem name [ "flake-utils" "krops" "self" ]) inputs); - deployScriptFor = {name, host}: let inherit (import ./lib/default.nix) sshPort; in toString (krops.packages.${system}.writeDeploy "deploy-${name}" { - source = krops.lib.evalSource [ (source name) ]; - target = "root@${host}:${toString sshPort}"; - }); + source = name: + { + niveum.file = toString ./.; + nixos-config.symlink = "niveum/systems/${name}/configuration.nix"; + system-secrets.pass = { + dir = toString ~/.password-store; + name = "systems/${name}"; + }; + secrets.pass = { + dir = toString ~/.password-store; + name = "shared"; + }; + } + // nixpkgs.lib.mapAttrs' (name: value: { + inherit name; + value.file = toString value; + }) (nixpkgs.lib.filterAttrs (name: _: !builtins.elem name ["flake-utils" "krops" "self"]) inputs); + deployScriptFor = { + name, + host, + }: let + inherit (import ./lib/default.nix) sshPort; + in + toString (krops.packages.${system}.writeDeploy "deploy-${name}" { + source = krops.lib.evalSource [(source name)]; + target = "root@${host}:${toString sshPort}"; + }); in { apps.${system} = let forSystems = f: builtins.listToAttrs (map f (builtins.attrNames (builtins.readDir ./systems))); @@ -77,16 +117,20 @@ name = "deploy-${name}"; value = { type = "app"; - program = deployScriptFor { inherit name; host = "${name}.r"; }; + program = deployScriptFor { + inherit name; + host = "${name}.r"; + }; }; }); ciScripts = forSystems (name: { name = "build-${name}"; value = { type = "app"; - program = import ./ci.nix { inherit name system inputs; }; + program = import ./ci.nix {inherit name system inputs;}; }; }); - in deployScripts // ciScripts; + in + deployScripts // ciScripts; }; } diff --git a/lib/default.nix b/lib/default.nix index 7270db1..3e0ef71 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,5 +1,13 @@ rec { - tmpfilesConfig = {type, path, mode ? "-", user ? "-", group ? "-", age ? "-", argument ? "-"}: "${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}"; + tmpfilesConfig = { + type, + path, + mode ? "-", + user ? "-", + group ? "-", + age ? "-", + argument ? "-", + }: "${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}"; restic = rec { port = 3571; @@ -8,14 +16,25 @@ rec { }; firewall = lib: { - accept = { source, protocol, dport }: "nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept"; + accept = { + source, + protocol, + dport, + }: "nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept"; addRules = lib.concatMapStringsSep "\n" (rule: "iptables -A ${rule}"); removeRules = lib.concatMapStringsSep "\n" (rule: "iptables -D ${rule} || true"); }; serveHtml = file: pkgs: '' default_type "text/html"; - root ${pkgs.linkFarm "fahrplan" [{ name = "index.html"; path = file; }]}; + root ${ + pkgs.linkFarm "fahrplan" [ + { + name = "index.html"; + path = file; + } + ] + }; index index.html; ''; @@ -50,10 +69,11 @@ rec { github = "kmein"; email = "kmein@posteo.de"; name = "Kierán Meinhardt"; - sshKeys = pkgs: pkgs.lib.strings.splitString "\n" (pkgs.lib.strings.fileContents (pkgs.fetchurl { - url = "https://github.com/kmein.keys"; - sha256 = "09c6ny0rmpid1m0pc1wsmb3wyy9g721lf4kv55i4lrp42b3i2d5b"; - })); + sshKeys = pkgs: + pkgs.lib.strings.splitString "\n" (pkgs.lib.strings.fileContents (pkgs.fetchurl { + url = "https://github.com/kmein.keys"; + sha256 = "09c6ny0rmpid1m0pc1wsmb3wyy9g721lf4kv55i4lrp42b3i2d5b"; + })); }; syncthing.devices = { diff --git a/lib/goldendict-config.nix b/lib/goldendict-config.nix index 2eeb15a..f1079fa 100644 --- a/lib/goldendict-config.nix +++ b/lib/goldendict-config.nix @@ -1,4 +1,7 @@ -{pkgs, path}: '' +{ + pkgs, + path, +}: '' ${path} diff --git a/lib/i3status-rust.nix b/lib/i3status-rust.nix index 12ffd5b..67cee5a 100644 --- a/lib/i3status-rust.nix +++ b/lib/i3status-rust.nix @@ -1,5 +1,9 @@ -{ pkgs, wirelessInterface, colours, batteryName }: -let +{ + pkgs, + wirelessInterface, + colours, + batteryName, +}: let inherit (pkgs) lib; setsid = script: @@ -95,37 +99,43 @@ in { { block = "custom"; interval = 60 * 5; - command = let spacetime = import ; in pkgs.writers.writePython3 "sun.py" { libraries = [ pkgs.python3Packages.astral ]; flakeIgnore = [ "E121" "E501" ]; } - '' - import astral - import astral.moon - import astral.sun - - moon_phases = { - 0: "🌑", - 3.5: "🌒", - 7: "🌓", - 10.5: "🌔", - 14: "🌕", - 17.5: "🌖", - 21: "🌗", - 24.5: "🌘", - 28: "🌑", + command = let + spacetime = import ; + in + pkgs.writers.writePython3 "sun.py" { + libraries = [pkgs.python3Packages.astral]; + flakeIgnore = ["E121" "E501"]; } - current_phase = astral.moon.phase() - closest_phase = min(moon_phases.keys(), key=lambda x: abs(current_phase - x)) + '' + import astral + import astral.moon + import astral.sun - city = astral.LocationInfo("Berlin", "Germany", "${spacetime.time.timeZone}", ${toString spacetime.location.latitude}, ${toString spacetime.location.longitude}) - sun = astral.sun.sun(city.observer, date=astral.today(), tzinfo=city.timezone) + moon_phases = { + 0: "🌑", + 3.5: "🌒", + 7: "🌓", + 10.5: "🌔", + 14: "🌕", + 17.5: "🌖", + 21: "🌗", + 24.5: "🌘", + 28: "🌑", + } + current_phase = astral.moon.phase() + closest_phase = min(moon_phases.keys(), key=lambda x: abs(current_phase - x)) - print("🌅 {} 🌇 {} {} {}".format(sun["sunrise"].strftime("%R"), sun["sunset"].strftime("%R"), moon_phases[closest_phase], round(current_phase, 1))) - ''; + city = astral.LocationInfo("Berlin", "Germany", "${spacetime.time.timeZone}", ${toString spacetime.location.latitude}, ${toString spacetime.location.longitude}) + sun = astral.sun.sun(city.observer, date=astral.today(), tzinfo=city.timezone) + + print("🌅 {} 🌇 {} {} {}".format(sun["sunrise"].strftime("%R"), sun["sunset"].strftime("%R"), moon_phases[closest_phase], round(current_phase, 1))) + ''; } { block = "custom"; interval = 5; command = pkgs.writers.writeDash "hu-berlin-vpn" '' - PATH=${lib.makeBinPath [ pkgs.systemd ]} + PATH=${lib.makeBinPath [pkgs.systemd]} (systemctl is-active --quiet openvpn-hu-berlin.service && echo "🎓👍 (OpenVPN)") \ || (systemctl is-active --quiet hu-vpn.service && echo "🎓👍 (PPP+SSL)") \ || echo "🎓👎" @@ -154,7 +164,7 @@ in { format_mem = "{mem_used;G}"; clickable = false; } - { block = "load"; } + {block = "load";} { block = "time"; interval = 1; diff --git a/lib/streams.nix b/lib/streams.nix index 27e5081..a06d25e 100644 --- a/lib/streams.nix +++ b/lib/streams.nix @@ -1,4 +1,4 @@ -{ di-fm-key }: +{di-fm-key}: # DI generated via: cat /tmp/di-fm.html| pup '.channel-tile-component json{}' | jq 'map({logo: .children[0].children[1].children[1].src | sub("^"; "http:"), station: .children[3].children[0].children[0].text, desc: .children[3].children[1].text | gsub("\\s+"; " ")})' > /tmp/di-fm.json # soma.fm generated via: curl https://somafm.com/ | pup '.cbshort json{}' | jq 'map({logo:.children[0].children[0].src|sub("^"; "http://soma.fm"), desc: .children[2].text, station: .children[1].text})' let @@ -42,1381 +42,1434 @@ let radiorecord-logo = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 144 46'%3E%3Cpath d='M68.3 24H79c8-11.4 29.8-18.8 41.7-24l-5.4 1.6-.3.2-15.3 4.6-3.1.9-17 5.3-3.4-3.1h-5.4l-3.5 3.2L43 5 32 1.6 26.6 0c12.3 5.4 35.1 14.5 41.7 24zm5.2-11.4c.9 0 1.6.3 2.2.8.6.5.9 1.1.9 1.9 0 .8-.4 2-1.1 3-.5.7-1.2 1.2-1.9 1.3-.7 0-1.3-.5-1.8-1.2-.7-.9-1.1-2-1.1-2.9v-.2c-.2-1.5 1.1-2.7 2.8-2.7zm70.3 17.5c-.5-1.3-2.4-1.5-4.1-1.5h-15.9l-.1.4-.1.2-4.8 16-.1.2-.2.7h16.8c2.8 0 4.6-1 5.5-3.6L143 35c1-2.6 1.2-3.9.8-4.9zm-10.2 11.7h-6.3l2.7-8.9h6.3l-2.7 8.9zM94.5 29.1c-.8-.4-2-.5-3.1-.5H79.9c-2.8 0-4.6 1-5.5 3.6l-2.2 7.5c-.6 2-1.8 4.8.3 5.9.8.4 2 .5 3.1.5h11.5c2.8 0 4.6-1 5.5-3.6l2.2-7.5c.6-2 1.8-4.9-.3-5.9zm-9.2 12.7h-6.4l2.7-8.9H88l-2.7 8.9zm-39.8 0H32.8l.7-2.3h10.9l.1-.4.1-.2.9-2.9.1-.2.2-.7h-11l.7-2.3h13.8l.1-.4.1-.2.8-2.8.1-.2.2-.7H29.3l-.1.4-.2.2-4.8 16-.1.2-.1.7h21.2l.1-.4.1-.2.8-2.8.1-.2.2-.7h-1zm70.2-13.3H99.2c-1.6 5.5-3.3 11-4.9 16.6l-.1.2-.3.7h7.5l.1-.4.1-.2 1.7-5.6h2.5l2.7 5.7.1.1.1.3h8.2l-3.3-6.6c3.4-.4 4.2-1.8 4.8-4.2.2-.6.3-1.2.5-1.7 1.2-3.5-.1-4.8-3.2-4.9zm-4.3 5.1L111 35c-.1.4-.3.5-.7.6l-6.4 1.7 1.4-4.5h5.5c.6 0 .8.2.6.8zm-86.9 1.6c.2-.6.3-1.2.5-1.7 1.2-3.6-.1-4.9-3.2-4.9H5.3C3.7 34.1 2 39.6.4 45.2l-.1.2-.3.6h7.4l.1-.4.1-.2 1.7-5.6h2.5l2.7 5.7.1.1.1.3h8.2l-3.3-6.6c3.5-.3 4.3-1.7 4.9-4.1zm-7-1.6l-.4 1.4c-.1.4-.3.5-.7.6L10 37.3l1.4-4.5h5.5c.6 0 .8.2.6.8zM71.1 35l1.2-3.8c.5-1.3-.4-2.8-1.9-2.7H57c-2.8 0-4.6 1-5.5 3.6l-2.2 7.5c-.6 2-1.8 4.8.3 5.9.8.4 2 .5 3.1.5h12.5c1.5 0 3.2-1.4 3.6-2.7l1-3.7h-5.7l-.6 2.1h-7.3l2.7-8.9h7l-.8 2.2h6z' fill-rule='evenodd' clip-rule='evenodd' fill='%23fff'/%3E%3C/svg%3E"; caster-fm = subdomain: port: "http://${subdomain}.caster.fm:${toString port}/listen.mp3?authn0b0236758bd0e178156d0787327a055d"; -in [ - { - stream = "http://lassul.us:8000/radio.ogg"; - station = "Radio lassulus"; - logo = "http://lassul.us/art/portraits/selbstportrait.jpg"; - desc = "Diminutive from lassus (“weary, faint, tired”). A programming human. Doing superior professional art."; - } - { - station = "C3 Lounge"; - stream = "https://c3lounge.de/radio/8000/radio.mp3"; - } - { - stream = "https://radio.kmein.de/lyrik.ogg"; - station = "Lyrik"; - desc = "Lyrik-Lesung rund um die Uhr."; - } - { - stream = "https://radio.kmein.de/lyrikline.ogg"; - station = "Lyrikline"; - logo = "https://www.lyrikline.org/themes/lyrik/svg/Logo_lyrikline_pure.svg"; - desc = "24/7 zufällige Wiedergaben von lyrikline.org."; - } - { - stream = "https://radio.kmein.de/wikipedia.ogg"; - station = "Wikipedia"; - desc = "Zufällige Wikipedia-Artikel"; - logo = "https://de.wikipedia.org/wiki/Wikipedia:Enzyklop%C3%A4die/Logo_von_Wikipedia#/media/Datei:Wikipedia-logo-v2.svg"; - } - { - stream = "http://162.244.80.20:6948"; - station = "Cool Jazz Florida"; - logo = "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/d1/30/24209/c300.png"; - desc = "Sit Back and Relax and Enjoy the Sophisticated Cool Jazz on Cool Jazz Florida!"; - } - { - stream = "https://stream1.mfm.plexpark.com/radio/8000/simulcast-berlin-sd-64.aac"; - station = "Metropol FM Berlin"; - logo = "https://www.metropolfm.de/wp-content/uploads/2017/04/berlin.png"; - } - { - stream = "https://stream2.mfm.plexpark.com/radio/8040/genre-keyf-sd-64.aac"; - station = "Metropol FM KEYF"; - logo = "https://www.metropolfm.de/wp-content/uploads/2017/04/berlin.png"; - } - { - stream = "https://stream2.mfm.plexpark.com/radio/8050/genre-popslow-sd-64.aac"; - station = "Metropol FM Slow"; - logo = "https://www.metropolfm.de/wp-content/uploads/2017/04/berlin.png"; - } - { - stream = "https://stream1.mfm.plexpark.com/radio/8030/genre-arabesk-sd-64.aac"; - station = "Metropol FM Arabesk"; - logo = "https://www.metropolfm.de/wp-content/uploads/2017/04/berlin.png"; - } - { - stream = "http://rb-stream.de:8000/rrb_128.mp3"; - station = "Radio Russkij Berlin"; - logo = "http://radio-rb.de/img/site/logo.png"; - desc = "Голос нашего города ..."; - } - { - stream = "https://drachenhits.stream.laut.fm/drachenhits"; - station = "Drachenhits"; - } -] ++ -# generated via: curl https://radiorecord.ru/api/stations | jq '.result.stations | sort_by(.sort) | map({station:.title,desc:.tooltip,logo:.icon_fill_colored,stream:.stream_320})' > radiorecord.json -importJSON ./radiorecord.json -++ [ - { - desc = "Your favorite dance tunes from the start of the decade. Familiar hits and overlooked classics in abundance."; - station = di-fm-name "00s Club Hits"; - stream = di-fm "00sclubhits"; - } - { - desc = "Electronic sounds and atmospheric textures create a genre to enhance your state of mind and take you deeper."; - station = di-fm-name "Ambient"; - stream = di-fm "ambient"; - } - { - desc = "Spaced out, melodic and full of warmth – these broken beat dance tunes will keep you dazed and amused."; - station = di-fm-name "Atmospheric Breaks"; - stream = di-fm "atmosphericbreaks"; - } - { - desc = "From the funkiest grooves to the dirtiest beats. Hard-hitting, high energy 4/4 club cuts to move the masses."; - station = di-fm-name "Bass & Jackin' House"; - stream = di-fm "bassnjackinhouse"; - } - { - desc = "Blending together elements of house music, speed garage, and techno – it's all about the low end frequencies."; - station = di-fm-name "Bassline"; - stream = di-fm "bassline"; - } - { - desc = "Heavily focused on breakbeats and dusty samples. A defining 90s musical movement still going strong today."; - station = di-fm-name "Big Beat"; - stream = di-fm "bigbeat"; - } - { - desc = "Fusing together house elements from the past and the present – prime time music full of uplifting high energy."; - station = di-fm-name "Big Room House"; - stream = di-fm "bigroomhouse"; - } - { - desc = "Inspired by hip hop and UK rave music, breaks features broken up drum loops and creative samples, synths and fx."; - station = di-fm-name "Breaks"; - stream = di-fm "breaks"; - } - { - desc = "The sounds of Chill & Tropical House are expertly made for lounging and dancing alike with its deeper house vibes."; - station = di-fm-name "Chill & Tropical House"; - stream = di-fm "chillntropicalhouse"; - } - { - desc = "Good EDM doesn't have to blow out your speakers and our curated selection of Chill EDM is a testament to the strength of mellow, chilled out electronic music."; - station = di-fm-name "Chill EDM"; - stream = di-fm "chilledm"; - } - { - desc = "Mellow chill beats, lofi hip-hop, trip hop, downtempo beats and jazz, blended together in a laid back style for perfect listening."; - station = di-fm-name "ChillHop"; - stream = di-fm "chillhop"; - } - { - desc = "Electronic sounds, mellow mid-tempo rhythms, and a groove meant to calm the senses and ease the mind."; - station = di-fm-name "Chillout"; - stream = di-fm "chillout"; - } - { - desc = "The perfect musical soundtrack for when you want to close your eyes, get truly comfortable, and drift away."; - station = di-fm-name "Chillout Dreams"; - stream = di-fm "chilloutdreams"; - } - { - desc = "The brilliant combination of dubstep rhythms with the mellow grooves of chillout. A unique sound all its own."; - station = di-fm-name "Chillstep"; - stream = di-fm "chillstep"; - } - { - desc = "European pop music born in the 90s full of high energy sounds and big hooks – now heard in gyms and malls worldwide."; - station = di-fm-name "Classic EuroDance"; - stream = di-fm "classiceurodance"; - } - { - desc = "Conceived in the European discos in the 70s, evolving through the decades into modern electronic masterpieces."; - station = di-fm-name "Classic EuroDisco"; - stream = di-fm "classiceurodisco"; - } - { - desc = "The classic melodies, the epic breakdowns and gigantic builds. Re-experience Trance music in her prime."; - station = di-fm-name "Classic Trance"; - stream = di-fm "classictrance"; - } - { - desc = "Classic sounds of Vocal Trance"; - station = di-fm-name "Classic Vocal Trance"; - stream = di-fm "classicvocaltrance"; - } - { - desc = "The bassbin rattling, speaker-freaking hits of Dubstep – all tried, tested and approved to work in the clubs."; - station = di-fm-name "Club Dubstep"; - stream = di-fm "clubdubstep"; - } - { - desc = "The music heard in the biggest venues worldwide. From prime time pushers to deeper house shakers – the sounds of now."; - station = di-fm-name "Club Sounds"; - stream = di-fm "club"; - } - { - desc = "From techno, deep house, progressive and trance – check out the sounds of the DJ deep in the mix."; - station = di-fm-name "DJ Mixes"; - stream = di-fm "djmixes"; - } - { - desc = "Evil, gritty and twisted DnB / Drum & Bass. at 160+ BPM, hear the darkest basslines and the hardest hitting percussion."; - station = di-fm-name "Dark DnB"; - stream = di-fm "darkdnb"; - } - { - desc = "The darker form of PsyTrance, which is a sound all its own – direct from Goa to your headphones."; - station = di-fm-name "Dark PsyTrance"; - stream = di-fm "darkpsytrance"; - } - { - desc = "House music crafted for the smaller and mid-sized rooms – deeper tracks full of silky, smooth grooves."; - station = di-fm-name "Deep House"; - stream = di-fm "deephouse"; - } - { - desc = "Elements of house, funk, and disco. Mid-tempo beats, soulful grooves and head nodding selections."; - station = di-fm-name "Deep Nu-Disco"; - stream = di-fm "deepnudisco"; - } - { - desc = "This smooth, groove-heavy selection of deep progressive house tracks is the perfect soundtrack for smaller and mid-sized rooms."; - station = di-fm-name "Deep Progressive House"; - stream = di-fm "deepprogressivehouse"; - } - { - desc = "A fusion of deep house & techno. Punchy grooves, spaced out sounds and forward thinking productions."; - station = di-fm-name "Deep Tech"; - stream = di-fm "deeptech"; - } - { - desc = "Where would dance music be without Detroit? The city that started it all continues to inspire and educate."; - station = di-fm-name "Detroit House & Techno"; - stream = di-fm "detroithousentechno"; - } - { - desc = "The feel good sound inspired from 70s disco combined with the warm kick drum of modern house music."; - station = di-fm-name "Disco House"; - stream = di-fm "discohouse"; - } - { - desc = "Head nodding beats, chilled vocals, and lush soundscapes to bring down the sun and start the night."; - station = di-fm-name "Downtempo Lounge"; - stream = di-fm "downtempolounge"; - } - { - desc = "Born in the mid 90s, Drum and Bass / DnB is all about fast breakbeats, urban vibes, and rib rattling basslines."; - station = di-fm-name "Drum and Bass"; - stream = di-fm "drumandbass"; - } - { - desc = "A hybrid of half-time Dubstep and intense Drum and Bass / DnB."; - station = di-fm-name "Drumstep"; - stream = di-fm "drumstep"; - } - { - desc = "An emphasis on the bass and drums / DnB, delayed effects, sampled vocals and smokey Reggae inspired vibes."; - station = di-fm-name "Dub"; - stream = di-fm "dub"; - } - { - desc = "The beloved sounds of deep techno saturated with tape delays, heavy reverb and ice cold atmospherics."; - station = di-fm-name "Dub Techno"; - stream = di-fm "dubtechno"; - } - { - desc = "The wobbles of the bass, the party rocking beats, and the biggest crowd destroying drops."; - station = di-fm-name "Dubstep"; - stream = di-fm "dubstep"; - } - { - desc = "The sound of the largest events. From the gargantuan festivals, the huge main rooms and the biggest DJs."; - station = di-fm-name "EDM Festival"; - stream = di-fm "edmfestival"; - } - { - desc = "Where dance meets pop. Crossover favorites, stadium-sized anthems and the biggest electronic tunes in existence."; - station = di-fm-name "EDM Hits"; - stream = di-fm "edm"; - } - { - desc = "Buzzing basslines, huge kicks, party rocking drops. House music packed full of gigantic bass and massive synths."; - station = di-fm-name "Electro House"; - stream = di-fm "electrohouse"; - } - { - desc = "The combination of 1920s-1940s jazz and swing music, big band horns and modern day electro house."; - station = di-fm-name "Electro Swing"; - stream = di-fm "electroswing"; - } - { - desc = "The trailblazers, the renegades and the experimental musicians who gave early inspiration with electronic instruments."; - station = di-fm-name "Electronic Pioneers"; - stream = di-fm "electronicpioneers"; - } - { - desc = "Catchy pop music blended together with vintage synthesizers and electronic instrumentation."; - station = di-fm-name "Electropop"; - stream = di-fm "electropop"; - } - { - desc = "Trance in its most boisterous form. Uplifting melodies on top of high energy beats create these euphoric anthems."; - station = di-fm-name "Epic Trance"; - stream = di-fm "epictrance"; - } - { - desc = "Pop music infused with a high energy 4/4 pulse. Heavy on the synthesizers, the melodies and the vocals."; - station = di-fm-name "EuroDance"; - stream = di-fm "eurodance"; - } - { - desc = "Focused on the funkiest grooves, with plenty of the guitar licks and clever samples placed around a 4/4 swing."; - station = di-fm-name "Funky House"; - stream = di-fm "funkyhouse"; - } - { - desc = "Hard basslines, booming beats and insatiable grooves. Inspired by Trap, Juke and Garage – molded together into a unique booming style."; - station = di-fm-name "Future Bass"; - stream = di-fm "futurebass"; - } - { - desc = "2step Garage rhythms, chunky bass line driven grooves and plenty of forward thinking innovation."; - station = di-fm-name "Future Garage"; - stream = di-fm "futuregarage"; - } - { - desc = "Finest selection of futurepop and synthpop."; - station = di-fm-name "Future Synthpop"; - stream = di-fm "futuresynthpop"; - } - { - desc = "The hardest form of techno with punishing tracks designed to drive the crowds into a sweaty frenzy."; - station = di-fm-name "Gabber"; - stream = di-fm "gabber"; - } - { - desc = "The sound of digital malfunctions, electric hum and bit rate distortions perfectly placed alongside laid-back hip hop beats."; - station = di-fm-name "Glitch Hop"; - stream = di-fm "glitchhop"; - } - { - desc = "A very psychedelic form of trance, Goa-Psy Trance is a sound full of arpeggiated synths and trippy effects."; - station = di-fm-name "Goa-Psy Trance"; - stream = di-fm "goapsy"; - } - { - desc = "A channel showcasing everything from hard dance, trance and happy hardcore to lift the spirits (and the arms)."; - station = di-fm-name "Hands Up"; - stream = di-fm "handsup"; - } - { - desc = "Concrete kicks and punching rhythms, hard dance is a tougher side of music with sharp edges and aggressive power."; - station = di-fm-name "Hard Dance"; - stream = di-fm "harddance"; - } - { - desc = "Tough as nails warehouse jams full of cold aggression, sinister structures and pounding rhythms that hit hard."; - station = di-fm-name "Hard Techno"; - stream = di-fm "hardtechno"; - } - { - desc = "Strictly for the hardcore. These are the biggest and boldest bangers, and the hardest hitting tracks."; - station = di-fm-name "Hardcore"; - stream = di-fm "hardcore"; - } - { - desc = "Hard techno & hardcore. A global phenomenon with powerful kicks, distorted effects and infectious melodies."; - station = di-fm-name "Hardstyle"; - stream = di-fm "hardstyle"; - } - { - desc = "Born in Chicago and now global, house music is always evolving but remains true to its pure 4/4 structure."; - station = di-fm-name "House"; - stream = di-fm "house"; - } - { - desc = "Smooth, groovy and full of cutting-edge, fresh ideas – beats to kick back and enjoy far from the club setting."; - station = di-fm-name "Indie Beats"; - stream = di-fm "indiebeats"; - } - { - desc = "The spirit of Rock & Roll with an electronic soul. Club culture and live music combined."; - station = di-fm-name "Indie Dance"; - stream = di-fm "indiedance"; - } - { - desc = "One of the biggest cultural soundtracks with the infectious thump of house music. Expect sultry saxophones, trumpets, and finger snapping grooves."; - station = di-fm-name "Jazz House"; - stream = di-fm "jazzhouse"; - } - { - desc = "Jungle keeps the breakbeat tempos high and celebrates the diverse ideas found within urban and rave music."; - station = di-fm-name "Jungle"; - stream = di-fm "jungle"; - } - { - desc = "The sounds of Salsa, Brazilian beats and Latin Jazz with the steady grooves of modern East Coast dance music."; - station = di-fm-name "Latin House"; - stream = di-fm "latinhouse"; - } - { - desc = "Smooth as water, with the fast paced rhythms, Liquid DNB / Drum and Bass flows with rolling ease without losing momentum."; - station = di-fm-name "Liquid DnB"; - stream = di-fm "liquiddnb"; - } - { - desc = "Smooth, rolling and steady – this fresh formation of Dubstep keeps the sounds you love with a flowing Drum and Bass groove."; - station = di-fm-name "Liquid Dubstep"; - stream = di-fm "liquiddubstep"; - } - { - desc = "The smoother side of Trap but still packed with mechanical grooves and hip hop moods."; - station = di-fm-name "Liquid Trap"; - stream = di-fm "liquidtrap"; - } - { - desc = "Tastefully selected LoFi Hip-Hop tunes with textured atmospheres & laid back beats – with a dash of chillhop and perfectly designed to chill your ears."; - station = di-fm-name "LoFi Hip-Hop"; - stream = di-fm "lofihiphop"; - } - { - desc = "Punch your one-way ticket to peace of mind and mental clarity with this curated selection of LoFi Lounge & Chill tracks today."; - station = di-fm-name "LoFi Lounge & Chill"; - stream = di-fm "lofiloungenchill"; - } - { - desc = "Music to chill to. Music made for when it's all about kicking off your shoes, laying back, and totally relaxing."; - station = di-fm-name "Lounge"; - stream = di-fm "lounge"; - } - { - desc = "The melodic side of progressive house, packed with driving rhythms and forward thinking sounds."; - station = di-fm-name "Melodic Progressive"; - stream = di-fm "melodicprogressive"; - } - { - desc = "Minimal fuses elements of house, techno and electronica and strips it back to focus on the spaces between the sound."; - station = di-fm-name "Minimal"; - stream = di-fm "minimal"; - } - { - desc = "Pitched up vocals, happy hardcore beats, and high energy music non-stop."; - station = di-fm-name "Nightcore"; - stream = di-fm "nightcore"; - } - { - desc = "Modern disco music blending the familiar funk of the 70s and 80s with futuristic beats and up to date grooves."; - station = di-fm-name "Nu Disco"; - stream = di-fm "nudisco"; - } - { - desc = "Acid, one of the characteristics of the TB-303, is celebrated here with the best tracks from house, techno and trance."; - station = di-fm-name "Oldschool Acid"; - stream = di-fm "oldschoolacid"; - } - { - desc = "The biggest classics and secret weapons – this is a true treasure chest of house tracks from back in the day."; - station = di-fm-name "Oldschool House"; - stream = di-fm "oldschoolhouse"; - } - { - desc = "Grab your whistles, white gloves and reach for the laser beams. This is the sound of raving when raving was new."; - station = di-fm-name "Oldschool Rave"; - stream = di-fm "oldschoolrave"; - } - { - desc = "Go back in time and hear the biggest and best tracks within techno and trance that defined a decade of dance culture."; - station = di-fm-name "Oldschool Techno & Trance"; - stream = di-fm "oldschool"; - } - { - desc = "Always moving forward, progressive continues to reinvent itself into new sounds and styles made for the floor."; - station = di-fm-name "Progressive"; - stream = di-fm "progressive"; - } - { - desc = "Progress your mind to undiscovered psychedelic dimensions."; - station = di-fm-name "Progressive Psy"; - stream = di-fm "progressivepsy"; - } - { - desc = "Downtempo psychedelic dub grooves, goa ambient, and world beats."; - station = di-fm-name "PsyChill"; - stream = di-fm "psychill"; - } - { - desc = "Dub, ambient, and psychedelic trance, fused together in atmospheric harmony."; - station = di-fm-name "PsyDub"; - stream = di-fm "psydub"; - } - { - desc = "The psychedelic side of ambient."; - station = di-fm-name "Psybient"; - stream = di-fm "psybient"; - } - { - desc = "Russia's hottest club hits."; - station = di-fm-name "Russian Club Hits"; - stream = di-fm "russianclubhits"; - } - { - desc = "House music saturated with feeling – full of melodies, vocals and true soul. Steady warm 4/4 vibes."; - station = di-fm-name "Soulful House"; - stream = di-fm "soulfulhouse"; - } - { - desc = "Ambient space music for expanding minds."; - station = di-fm-name "Space Dreams"; - stream = di-fm "spacemusic"; - } - { - desc = "This selection of summer chill house classics has been handpicked to elicit that special summer feeling year-round."; - station = di-fm-name "Summer Chill House"; - stream = di-fm "summerchillhouse"; - } - { - desc = "Influenced by video games and movie soundtracks of the 80s, Synthwave's mission continues today with great new music keeping things future retro."; - station = di-fm-name "Synthwave"; - stream = di-fm "synthwave"; - } - { - desc = "Blending the warmth of house music with the cold structural precision of techno, tech house bridges the divide."; - station = di-fm-name "Tech House"; - stream = di-fm "techhouse"; - } - { - desc = "Techno is a true musical force full of structure and style. Robotic, mechanical and full of soul, always facing the future."; - station = di-fm-name "Techno"; - stream = di-fm "techno"; - } - { - desc = "Emotive dance music which embraces incredible melodies, future-facing production and energetic anthems heard worldwide."; - station = di-fm-name "Trance"; - stream = di-fm "trance"; - } - { - desc = "Born out of Southern Hip-Hop and influenced by techno, trap is analog drum machines / DnB & with hip-hop aesthetics."; - station = di-fm-name "Trap"; - stream = di-fm "trap"; - } - { - desc = "The percussive side of the house and tech house scene, tribal house takes drums and puts them in the forefront."; - station = di-fm-name "Tribal House"; - stream = di-fm "tribalhouse"; - } - { - desc = "UMF Radio 24/7"; - station = di-fm-name "UMF Radio"; - stream = di-fm "umfradio"; - } - { - desc = "From gritty Berlin streets to dark corners of Brooklyn, this is techno made by artists pushing the genre further."; - station = di-fm-name "Underground Techno"; - stream = di-fm "undergroundtechno"; - } - { - desc = "Relaxing vibes and a collection of vocal songs providing the laid back soundtrack to your day."; - station = di-fm-name "Vocal Chillout"; - stream = di-fm "vocalchillout"; - } - { - desc = "The glorious 4/4 thump of House music paired perfectly with the human voice. Sultry, soulful, sexy sounds."; - station = di-fm-name "Vocal House"; - stream = di-fm "vocalhouse"; - } - { - desc = "Laid back grooves and a collection of smooth vocals soothe the ears and relax the mind."; - station = di-fm-name "Vocal Lounge"; - stream = di-fm "vocallounge"; - } - { - desc = "Lush vocals paired together with emotive dance music. Beautiful melodies and endless energy."; - station = di-fm-name "Vocal Trance"; - stream = di-fm "vocaltrance"; - } - { - desc = "All Vaporwave. All the time."; - logo = "http://soma.fm/img/vaporwaves120.jpg"; - station = soma-fm-name "Vaporwaves"; - stream = soma-fm "vaporwaves"; - } - { - desc = "Emotional Experiments in Music: Ambient, modern composition, post-rock, & experimental electronic music"; - logo = "http://soma.fm/img/n5md120.png"; - station = soma-fm-name "n5MD Radio"; - stream = soma-fm "n5md"; - } - { - desc = "A nicely chilled plate of ambient/downtempo beats and grooves."; - logo = "http://soma.fm/img/groovesalad120.png"; - station = soma-fm-name "Groove Salad"; - stream = soma-fm "groovesalad"; - } - { - desc = "The classic (early 2000s) version of a nicely chilled plate of ambient/downtempo beats and grooves."; - logo = "http://soma.fm/img3/gsclassic120.jpg"; - station = soma-fm-name "Groove Salad Classic"; - stream = soma-fm "gsclassic"; - } - { - desc = "Deep ambient electronic, experimental and space music. For inner and outer space exploration."; - logo = "http://soma.fm/img/deepspaceone120.gif"; - station = soma-fm-name "Deep Space One"; - stream = soma-fm "deepspaceone"; - } - { - desc = "Tune in, turn on, space out. Spaced-out ambient and mid-tempo electronica."; - logo = "http://soma.fm/img/sss.jpg"; - station = soma-fm-name "Space Station Soma"; - stream = soma-fm "spacestation"; - } - { - desc = "Served best chilled, safe with most medications. Atmospheric textures with minimal beats."; - logo = "http://soma.fm/img/dronezone120.jpg"; - station = soma-fm-name "Drone Zone"; - stream = soma-fm "dronezone"; - } - { - desc = "Progressive house / trance. Tip top tunes."; - logo = "http://soma.fm/img/thetrip120.jpg"; - station = soma-fm-name "The Trip"; - stream = soma-fm "thetrip"; - } - { - desc = "Music for Hacking. The DEF CON Year-Round Channel."; - logo = "http://soma.fm/img/defcon120.png"; - station = soma-fm-name "DEF CON Radio"; - stream = soma-fm "defcon"; - } - { - desc = "Transcending the world of jazz with eclectic, avant-garde takes on tradition."; - logo = "http://soma.fm/img/sonicuniverse120.jpg"; - station = soma-fm-name "Sonic Universe"; - stream = soma-fm "sonicuniverse"; - } - { - desc = "NEW! Reggae, Ska, Rocksteady classic and deep tracks."; - logo = "http://soma.fm/img3/reggae120.png"; - station = soma-fm-name "Heavyweight Reggae"; - stream = soma-fm "reggae"; - } - { - desc = "Vintage soul tracks from the original 45 RPM vinyl."; - logo = "http://soma.fm/img/7soul120.png"; - station = soma-fm-name "Seven Inch Soul"; - stream = soma-fm "7soul"; - } - { - desc = "Mellow album rock from the Seventies. Yacht not required."; - logo = "http://soma.fm/img/seventies120.jpg"; - station = soma-fm-name "Left Coast 70s"; - stream = soma-fm "seventies"; - } - { - desc = "Early 80s UK Synthpop and a bit of New Wave."; - logo = "http://soma.fm/img/u80s-120.png"; - station = soma-fm-name "Underground 80s"; - stream = soma-fm "u80s"; - } - { - desc = "The soundtrack for your stylish, mysterious, dangerous life. For Spies and PIs too!"; - logo = "http://soma.fm/img/secretagent120.jpg"; - station = soma-fm-name "Secret Agent"; - stream = soma-fm "secretagent"; - } - { - desc = "Sensuous and mellow vocals, mostly female, with an electronic influence."; - logo = "http://soma.fm/img/lush120.jpg"; - station = soma-fm-name "Lush"; - stream = soma-fm "lush"; - } - { - desc = "Exploring music from Celtic roots and branches"; - logo = "http://soma.fm/img/thistle120.png"; - station = soma-fm-name "ThistleRadio"; - stream = soma-fm "thistle"; - } - { - desc = "Drown in the electronic sound of instrumental hiphop, future soul and liquid trap."; - logo = "http://soma.fm/img/fluid120.jpg"; - station = soma-fm-name "Fluid"; - stream = soma-fm "fluid"; - } - { - desc = "Electropop and indie dance rock with sparkle and pop."; - logo = "http://soma.fm/img/poptron120.png"; - station = soma-fm-name "PopTron"; - stream = soma-fm "poptron"; - } - { - desc = "A late night blend of deep-house and downtempo chill."; - logo = "http://soma.fm/img/blender120.png"; - station = soma-fm-name "Beat Blender"; - stream = soma-fm "beatblender"; - } - { - desc = "Americana Roots music for Cowhands, Cowpokes and Cowtippers"; - logo = "http://soma.fm/img/bootliquor120.jpg"; - station = soma-fm-name "Boot Liquor"; - stream = soma-fm "bootliquor"; - } - { - desc = "Classic bachelor pad, playful exotica and vintage music of tomorrow."; - logo = "http://soma.fm/img/illstreet.jpg"; - station = soma-fm-name "Illinois Street Lounge"; - stream = soma-fm "illstreet"; - } - { - desc = "What alternative rock radio should sound like. [explicit]"; - logo = "http://soma.fm/img/bagel120.png"; - station = soma-fm-name "BAGeL Radio"; - stream = soma-fm "bagel"; - } - { - desc = "New and classic favorite indie pop tracks."; - logo = "http://soma.fm/img/indychick.jpg"; - station = soma-fm-name "Indie Pop Rocks!"; - stream = soma-fm "indiepop"; - } - { - desc = "Digitally affected analog rock to calm the agitated heart."; - logo = "http://soma.fm/img/digitalis120.png"; - station = soma-fm-name "Digitalis"; - stream = soma-fm "digitalis"; - } - { - desc = "Indie Folk, Alt-folk and the occasional folk classics."; - logo = "http://soma.fm/img/folkfwd120.jpg"; - station = soma-fm-name "Folk Forward"; - stream = soma-fm "folkfwd"; - } - { - desc = "Blips'n'beeps backed mostly w/beats. Intelligent Dance Music."; - logo = "http://soma.fm/img/cliqhop120.png"; - station = soma-fm-name "cliqhop idm"; - stream = soma-fm "cliqhop"; - } - { - desc = "Dubstep, Dub and Deep Bass. May damage speakers at high volume."; - logo = "http://soma.fm/img/dubstep120.png"; - station = soma-fm-name "Dub Step Beyond"; - stream = soma-fm "dubstep"; - } - { - desc = "Desi-influenced Asian world beats and beyond."; - logo = "http://soma.fm/img/sog120.jpg"; - station = soma-fm-name "Suburbs of Goa"; - stream = soma-fm "suburbsofgoa"; - } - { - desc = "Ambient music mixed with the sounds of San Francisco public safety radio traffic."; - logo = "http://soma.fm/img/sf1033120.png"; - station = soma-fm-name "SF 10-33"; - stream = soma-fm "sf1033"; - } - { - desc = "San Francisco Public Safety Scanner Feed"; - logo = "http://soma.fm/img/sf1033120.png"; - station = soma-fm-name "SF Police Scanner"; - stream = soma-fm "scanner"; - } - { - desc = "Celebrating NASA and Space Explorers everywhere."; - logo = "http://soma.fm/img/missioncontrol120.jpg"; - station = soma-fm-name "Mission Control"; - stream = soma-fm "missioncontrol"; - } - { - desc = "From black to doom, prog to sludge, thrash to post, stoner to crossover, punk to industrial."; - logo = "http://soma.fm/img3/metal120.png"; - station = soma-fm-name "Metal Detector"; - stream = soma-fm "metal"; - } - { - desc = "Just covers. Songs you know by artists you don't. We've got you covered."; - logo = "http://soma.fm/img/covers120.jpg"; - station = soma-fm-name "Covers"; - stream = soma-fm "covers"; - } - { - desc = "From the Playa to the world, for the annual Burning Man festival."; - logo = "http://soma.fm/img/1023brc.jpg"; - station = soma-fm-name "Black Rock FM"; - stream = soma-fm "brfm"; - } - { - desc = "Special Live Events and rebroadcasts of past live events"; - logo = "http://soma.fm/img/SomaFMDJSquare120.jpg"; - station = soma-fm-name "SomaFM Live"; - stream = soma-fm "live"; - } - { - desc = "SomaFM's wacky and eclectic holiday mix. Not for the easily offended."; - logo = "http://soma.fm/img/xmasinfrisco120.jpg"; - station = soma-fm-name "Xmas in Frisko"; - stream = soma-fm "xmasinfrisko"; - } - { - desc = "Chilled holiday grooves and classic winter lounge tracks. (Kid and Parent safe!)"; - logo = "http://soma.fm/img/christmaslounge120.png"; - station = soma-fm-name "Christmas Lounge"; - stream = soma-fm "christmas"; - } - { - desc = "Have your self an indie/alternative holiday season!"; - logo = "http://soma.fm/img/xmasrocks120.png"; - station = soma-fm-name "Christmas Rocks!"; - stream = soma-fm "xmasrocks"; - } - { - desc = "Where we cut right to the soul of the season."; - logo = "http://soma.fm/img/jollysoul120.png"; - station = soma-fm-name "Jolly Ol' Soul"; - stream = soma-fm "jollysoul"; - } - { - desc = "Department Store Christmas (extended through Jan 31)"; - logo = "http://soma.fm/img/SomaFMDJSquare120.jpg"; - station = soma-fm-name "SomaFM Specials"; - stream = soma-fm "specials"; - } - { - desc = "HandsUp / Dance"; - logo = "https://www.technobase.fm/content/images/site/logo-technobase.fm.png"; - station = we-are-one-name "TechnoBase.FM"; - stream = we-are-one "technobase"; - } - { - desc = "Dance & Pop"; - logo = "https://www.housetime.fm/content/images/site/logo-housetime.fm.png"; - station = we-are-one-name "HouseTime.FM"; - stream = we-are-one "housetime"; - } - { - desc = "Hardstyle"; - logo = "https://www.hardbase.fm/content/images/site/logo-hardbase.fm.png"; - station = we-are-one-name "HardBase.FM"; - stream = we-are-one "hardbase"; - } - { - desc = "Vocal & Uplifting Trance"; - logo = "https://www.trancebase.fm/content/images/site/logo-trancebase.fm.png"; - station = we-are-one-name "TranceBase.FM"; - stream = we-are-one "trancebase"; - } - { - desc = "Hardcore"; - logo = "https://www.coretime.fm/content/images/site/logo-coretime.fm.png"; - station = we-are-one-name "CoreTime.FM"; - stream = we-are-one "coretime"; - } - { - desc = "Techno / Minimal"; - logo = "https://www.clubtime.fm/content/images/site/logo-clubtime.fm.png"; - station = we-are-one-name "ClubTime.FM"; - stream = we-are-one "clubtime"; - } - { - desc = "Happy Hardcore / DnB"; - logo = "https://www.teatime.fm/content/images/site/logo-teatime.fm.png"; - station = we-are-one-name "TeaTime.FM"; - stream = we-are-one "teatime"; - } - { - desc = "90s / 00s"; - logo = "https://www.replay.fm/content/images/site/logo-replay.fm.png"; - station = we-are-one-name "Replay.FM"; - stream = we-are-one "replay"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Bigg-G-Quadrat-Webstream-final-klein.jpg"; - station = big-fm-name "Dancehall – Reggae – Afrobeat"; - stream = big-fm "reggaevibes"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/bigBALKAN_0.jpg"; - station = big-fm-name "bigBALKAN"; - stream = big-fm "balkan"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/bigSES_0.jpg"; - station = big-fm-name "bigSES (Türkei)"; - stream = big-fm "turkey"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/I_love_bigFM_CHARTS.jpg"; - station = big-fm-name "Charts"; - stream = big-fm "charts"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Rock_am_Ring_720_Webradio_Crowd_2.jpg"; - station = big-fm-name "Rock am Ring"; - stream = big-fm "rockamring"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/I_love_bigFM_MASHUP_0.jpg"; - station = big-fm-name "Mashup"; - stream = big-fm "mashup"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/bigFM_US_Rap_Hip-Hop.jpg"; - station = big-fm-name "US Rap & Hip Hop"; - stream = big-fm "usrap"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/I_love_bigFM_HIP-HOP_0.jpg"; - station = big-fm-name "Hip-Hop"; - stream = big-fm "hiphop"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Oldschool_Rap_Hip_Hop_720x720.jpg"; - station = big-fm-name "Oldschool Rap & Hip Hop"; - stream = big-fm "oldschool"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Hip_Hop_Charts_DJ_blau.jpg"; - station = big-fm-name "Deutscher Hip-Hop Charts"; - stream = big-fm "dhiphopcharts"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/bigFM_DEUTSCHRAP.jpg"; - station = big-fm-name "Deutschrap"; - stream = big-fm "deutschrap"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Markus-Spiske-unsplash-quadrat-berlin.jpg"; - station = big-fm-name "Neu Berlin Deutschrap"; - stream = big-fm "rapfeature"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Oldschool_Deutsch_720x720.jpeg"; - station = big-fm-name "Oldschool Deutschrap"; - stream = big-fm "oldschooldeutsch"; - } - { - logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/I_love_bigFM_MASHUP_0.jpg"; - station = big-fm-name "Mashup"; - stream = big-fm "mashup"; - } - { - station = "Schlagerparadies"; - stream = "https://webstream.schlagerparadies.de/schlagerparadies128k.mp3"; - logo = "https://cdn.schlagerparadies.de/images/rsp_setup/logo-radio-schlagerparadies.svg"; - } - { - station = rautemusik-name "Volksmusik"; - desc = "Volksmusik, Blasmusik, Schlager"; - stream = rautemusik "volksmusik"; - } - { - station = rautemusik-name "Study"; - stream = rautemusik "study"; - desc = "Lo-Fi, Chillout, Easy Listening"; - } - { - station = rautemusik-name "TechHouse"; - stream = rautemusik "techhouse"; - desc = "Techhouse, Deephouse, Techno, Minimal"; - } - { - station = rautemusik-name "Goldies"; - stream = rautemusik "goldies"; - desc = "Oldies, 60s, 70s, 80s"; - } - { - station = rautemusik-name "90s"; - stream = rautemusik "90s"; - desc = "90s, Eurodance, Pop, HipHop"; - } - { - station = rautemusik-name "Schlager"; - stream = rautemusik "schlager"; - desc = "Schlager, Discofox, Deutsch, Pop"; - } - { - station = rautemusik-name "Country"; - stream = rautemusik "country"; - desc = "Country, Western, Americana"; - } - { - station = rautemusik-name "Sex"; - stream = rautemusik "sex"; - desc = "RnB, Pop, Easy Listening"; - } - { - station = rautemusik-name "LoveHits"; - stream = rautemusik "lovehits"; - desc = "Lovesongs, Balladen, RnB, Pop"; - } - { - station = rautemusik-name "Klassik"; - stream = rautemusik "klassik"; - desc = "Symphonie, Orchester, Klassik"; - } - { - station = rautemusik-name "Traurig"; - stream = rautemusik "traurig"; - desc = "Balladen, Pop, Easy Listening"; - } - { - station = rautemusik-name "Happy"; - stream = rautemusik "happy"; - desc = "Pop, Dance, Charts"; - } - { - station = rautemusik-name "Solo Piano"; - stream = rautemusik "solopiano"; - desc = "Klavier, Instrumental, Easy Listening"; - } - { - station = rautemusik-name "HappyHardcore"; - stream = rautemusik "happyhardcore"; - desc = "UK Core, Happy Hardcore, Dance"; - } - { - station = rautemusik-name "HardeR"; - stream = rautemusik "harder"; - desc = "Hardstyle, Hardcore, Jumpstyle"; - } - { - station = rautemusik-name "BigCityBeats"; - stream = rautemusik "bigcitybeats"; - desc = "EDM, Dance, House, Electro, Star DJs"; - } - { - station = rautemusik-name "Lounge"; - stream = rautemusik "lounge"; - desc = "Ambient, Jazz, Chillout, Easy Listening"; - } - { - station = rautemusik-name "Oriental"; - stream = rautemusik "oriental"; - desc = "Arabisch, Oriental, HipHop"; - } - { - station = rautemusik-name "Salsa"; - stream = rautemusik "salsa"; - desc = "Salsa, Latina, Tropical"; - } - { - station = rautemusik-name "Christmas"; - stream = rautemusik "christmas"; - desc = "Weihnachtslieder, Balladen, Schlager"; - } - { - station = rautemusik-name "Christmas Chor"; - stream = rautemusik "christmas-chor"; - desc = "Chor, Weihnachtslieder, Gesang"; - } - { - station = rautemusik-name "Christmas Schlager"; - stream = rautemusik "christmas-schlager"; - desc = "Schlager, Weihnachtslieder"; - } - { - station = rautemusik-name "Weihnachten.FM"; - stream = rautemusik "weihnachten"; - desc = "Weihnachtslieder, Pop"; - } - { - station = rautemusik-name "Top40"; - stream = rautemusik "top40"; - desc = "Charts, Top40, Dance, Hiphop"; - } - { - station = rautemusik-name "Rock"; - desc = "Rock, Alternative, Punk"; - stream = rautemusik "rock"; - } - { - station = rautemusik-name "PartyHits"; - desc = "Karneval, Mallorca, Après Ski, Schlager"; - stream = rautemusik "partyhits"; - } - { - station = rautemusik-name "Deutschrap Charts"; - stream = rautemusik "deutschrap-charts"; - desc = "Deutschrap, HipHop, Rap, Charts"; - } - { - station = rautemusik-name "Deutschrap Classic"; - stream = rautemusik "deutschrap-classic"; - desc = "Oldschool, Rap, HipHop, Deutschrap"; - } - { - station = rautemusik-name "ChartHits"; - stream = rautemusik "ChartHits"; - desc = "House, RnB, Dance, Electro"; - } - { - station = rautemusik-name "BreakZ.FM"; - stream = rautemusik "breakz"; - desc = "RnB, House, HipHop, Dance, Mixtapes"; - } - { - station = rautemusik-name "Bass"; - stream = rautemusik "bass"; - desc = "DnB, Dubstep, Trap & Bass House"; - } - { - station = rautemusik-name "12punks"; - stream = rautemusik "12punks"; - desc = "Punk, Punk Rock, Ska, Hardcore"; - } - { - logo = "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/77/a4/13931/1/c175.png"; - station = "Raidió Rírá"; - stream = "http://185.80.220.12:8166/stream"; - desc = "Is cairt-staisiún ceoil é Raidió Rí-Rá a bhíonn ag craoladh go hiomlán trí Ghaeilge! Bíonn an ceol ar fad ó na cairteacha le cloisteáil ar an stáisiún, mar aon leis an bpopnuacht, an nuacht spóirt agus an nuacht scannánaíochta is déanaí!"; - } - { - stream = "http://188.247.86.67:8008"; - station = "Rotana Tarab"; - logo = "https://liveonlineradio.net/wp-content/uploads/2017/11/Rotana-Tarab-100x47.jpg"; - } - { - stream = "http://asima.out.airtime.pro:8000/asima_a"; - station = "Asima"; - } - { - station = "ARTA FM"; - stream = "http://edge.mixlr.com/channel/qtgru"; - } - { - station = "Ninar FM"; - stream = "http://ninarfm.grtvstream.com:8896/stream"; - } - { - stream = "http://5.9.16.111:8210/arabic_live"; - station = "Radio Arabica"; - logo = "https://radioarabica.de/wp-content/uploads/2020/09/LOGO_klein-1.png"; - } - { - stream = "http://iphone.live24.gr/derty1000"; - station = "Derti FM"; - desc = "Μόνο λαϊκά"; - logo = "https://cdn-radiotime-logos.tunein.com/s87063q.png"; - } - { - logo = "http://www.stoxosfm.gr/images/stoxosfm-logo-small.png"; - desc = "Ο Στόχος FM μετράει σχεδόν 25 χρόνια ηχηρής παρουσίας στα ερτζιανά. Ιδρύθηκε το 1990 και έκτοτε έχει διαγράψει μια δυναμική και άκρως επιτυχημένη πορεία, κατακτώντας την προτίμηση ενός σταθερού και ολοένα αυξανόμενου ακροατηρίου."; - station = "Stoxos FM"; - stream = "http://s3.onweb.gr:8016/;"; - } - { - stream = "http://62.210.24.124:8379/;stream.mp3"; - station = "Gjirokastër Albania"; - logo = "https://cdn-radiotime-logos.tunein.com/s151734q.png"; - } - { - stream = "http://radio.hostonnet.com:8000/"; - station = "Malayalam Radio"; - } - { - stream = "http://gill.sukhpal.net:8000/;stream.mp3"; - station = "Dhol Radio"; - desc = "ਪੰਜਾਬੀ ਸੰਗੀਤ"; - } - { stream = bhaktiworld "2bhanuman"; station = bhaktiworld-name "Hanuman"; } - { stream = bhaktiworld "djbeat"; station = bhaktiworld-name "Mantra Shakti"; } - { stream = bhaktiworld "gurbani"; station = bhaktiworld-name "Sangam"; } - { stream = bhaktiworld "hot"; station = bhaktiworld-name "Shiv"; } - { stream = bhaktiworld "ibadat"; station = bhaktiworld-name "Devi Maa"; } - { stream = bhaktiworld "iskon2b"; station = bhaktiworld-name "Om Sai"; } - { stream = bhaktiworld "millenniumhits"; station = bhaktiworld-name "Krishna"; } - { stream = bhaktiworld "dard"; station = bhaktiworld-name "Shri Ram"; } - { stream = bhaktiworld "bhaktiworldindia"; station = bhaktiworld-name "Ganesh"; } - { - station = "Rockabilly Radio"; - stream = "http://lin3.ash.fast-serv.com:6026/stream_96"; - logo = "https://static.wixstatic.com/media/c62c90_074ca7d75d204a7a9f9ee576e3e5c6fb~mv2.png/v1/fill/w_521,h_168,al_c,q_85,usm_0.66_1.00_0.01/rbrbannernewblue_edited.webp"; - desc = "The home of rockin' music."; - } - { - logo = "https://www.liveradio.ie/files/images/115732/resized/180x172c/rte_raidio_na_gaeltachta.jpg"; - station = rte-name "Raidió Na Gaeltachta"; - desc = "Stáisiún Náisiúnta na Gaeltachta agus na Gaeilge, ag craoladh as Gaeilge."; - stream = rte "rnag"; - } - { - logo = "https://www.liveradio.ie/files/images/115762/resized/180x172c/rte_gold.jpg"; - stream = rte "gold"; - station = rte-name "Gold"; - desc = "RTÉ Gold is a play list service offering a carefully chosen selection of classic hits as well as album tracks from top selling artists spanning the '50s, '60s, ‘70s and ‘80s."; - } - { - logo = "https://www.liveradio.ie/files/images/101096/resized/180x172c/rte_lyric_fm.png"; - stream = rte "lyric"; - station = rte-name "Lyric FM"; - desc = "“Without doubt RTÉ lyric fm is for listeners that are looking for a real alternative. With an increase in people tuning to the station ‘where life sounds better’ across weekends, there is something to satisfy everyone’s taste for specialist or more mainstream music.”"; - } - { - logo = "https://www.liveradio.ie/files/images/329303/resized/180x172c/rte_pulse.jpg"; - station = rte-name "Pulse"; - stream = rte "pulse"; - desc = "RTÉ Pulse is an electronic dance music station from Raidió Teilifís Éireann (RTÉ), Ireland's national broadcaster."; - } - { - logo = "https://www.liveradio.ie/files/images/338090/resized/180x172c/rte_radio_1.jpg"; - station = rte-name "Radio 1"; - stream = rte "radio1"; - desc = "RTÉ Radio 1 is the principal radio channel of Irish public-service broadcaster Raidió Teilifís Éireann. The station is a rare modern example of a mixed radio network, broadcasting a mixture of music and speech programming."; - } - { - logo = "https://www.liveradio.ie/files/images/115731/resized/180x172c/rte_radio_1_extra.jpg"; - station = rte-name "Radio 1 Extra"; - stream = rte "radio1extra"; - desc = "RTE Radio 1 Extra (aka RTE Radio 1xtra) – Quality speech radio from home and abroad."; - } - { - logo = "https://cdn-profiles.tunein.com/s96877/images/logoq.png"; - station = "DWG Radio"; - desc = "Bibeltreues Radio im Internet"; - stream = "http://server25531.streamplus.de/;stream.mp3"; - } - { - station = "Wake News"; - logo = "https://stream.wakenews.net/wakenews-radio-200px.jpg"; - stream = "https://stream.wakenews.net/radio-high.ogg"; - desc = "Ohne Blatt vor dem Mund! Für alle, die aufwachen wollen."; - } - { - logo = "http://www.beatlesradio.com/content/images/thumbs/0000587.gif"; - station = "Beatles Radio"; - stream = "http://www.beatlesradio.com:8000/stream"; - desc = ""; - } - { - stream = "http://www.c64.com:8000"; - station = "C64"; - logo = "http://www.c64.com/games/recommended.small.jpg.php?id=1969"; - desc = "ChipTune 24/7."; - } - { - logo = "https://knr.gl/sites/knr/themes/knr/gfx/sprite.png"; - station = "Kalaallit Nunaata Radioa"; - stream = "https://knr.gl/radiolivestream"; - } - { - logo = "http://sithafm.lk/sithafm.jpg"; - station = "Sitha.FM"; - stream = caster-fm "shaincast" 48148; - } - { - stream = royal "RoyalPopsa"; - station = royal-name "Popsa"; - desc = "из Санкт-Петербурга"; - } - { - stream = royal "RoyalTrance"; - station = royal-name "Trance"; - desc = "из Санкт-Петербурга"; - } - { - stream = royal "RoyalDrum"; - station = royal-name "Drum"; - desc = "из Санкт-Петербурга"; - } - { - stream = royal "RoyalTrap"; - station = royal-name "Trap"; - desc = "из Санкт-Петербурга"; - } - { - stream = royal "RoyalRock"; - station = royal-name "Rock"; - desc = "из Санкт-Петербурга"; - } - { - stream = royal "RoyalLounge"; - station = royal-name "Lounge"; - desc = "из Санкт-Петербурга"; - } - { - stream = royal "RoyaLove"; - station = royal-name "Love"; - desc = "из Санкт-Петербурга"; - } - { - station = "Radio Сигма"; - stream = "http://195.191.130.125:8000/sigma"; - desc = "Novy Urengoy 102.3 FM"; - } - { - station = "Rap Français | Mouv"; - stream = "http://icecast.radiofrance.fr/mouvrapfr-midfi.mp3"; - logo = "https://cdn.radiofrance.fr/s3/cruiser-production/2019/01/3c4dc967-ed2c-4ce5-a998-9437a64e05d5/300x300_rapfr.jpg"; - } - { - stream = "http://66.45.232.131:9994/;stream.mp3"; - station = "ERTU Al Quran Al Kareem"; - } - { - stream = "http://onair15.xdevel.com:7064/1/"; - station = "Radio Mozart Italia"; - logo = "https://www.lafenicepubblicita.it/rmi/wp-content/uploads/2020/12/360x180.jpg"; - desc = "Emittente ufficiale delle Associazioni Mozart Italia nel mondo"; - } - { - stream = "http://onair7.xdevel.com:7126/1/"; - station = "Opera Radio Budapest"; - logo = "https://www.opera.hu/static/default/asset/img/common/opera-logo.svg"; - } - { - stream = "http://peacefulpiano.stream.publicradio.org/peacefulpiano.mp3"; - station = "Peaceful Piano"; - } - { - logo = "https://cdn.promodj.com/afs/11a5f0be108d5f48084aac34ec54da9f11:e598f2"; - stream = "https://radio.promodj.com/fullmoon"; - station = "Trance | PromoDJ"; - } - { - stream = "http://worship.lobpreisradio.de:8000/anbetung-lobpreis-radio-37k-ogg-stereo"; - station = "Lobpreisradio"; - desc = "Aufladen mit Lobpreis und Anbetung über Lobpreisradio, täglich auch Evangelium und Predigten sowie die Worship-Hits. Wir wollen Herzen von Gott berühren vor allem mit deutschen aber auch englischem Lobpreis"; - } - { - stream = "http://91.121.134.23:8648/stream"; - station = "The UK 1950s Radio Station"; - logo = "http://www.1950sukradio.co.uk/images/page_componants/1950s_Station_Logo.png"; - } - { - stream = stereoscenic "mod-h"; - station = stereoscenic-name "Ambient Modern"; - } - { - stream = stereoscenic "asp-h"; - station = stereoscenic-name "Ambient Sleeping Pill"; - } - { - stream = stereoscenic "ama-h"; - station = stereoscenic-name "A. M. Ambient"; - } - { - stream = "http://1a-schlagergold.radionetz.de/1a-schlagergold.aac"; - station = "1A Schlagergold"; - } - { - stream = "http://streams.freetalklive.com:8000/"; - station = "Free Talk Live"; - logo = "https://upload.wikimedia.org/wikipedia/en/8/8d/FreeTalkLive_Logo.png"; - desc = "Talk Radio You Control"; - } - { - stream = "https://listen1.outpostradio.com/omagic"; - station = "Organ Magic"; - desc = "Pipe Organ music 24/7. An Outpost Radio station."; - logo = "https://outpostradio.com/organmagic/organ-magic-1-web.jpg"; - } - { - stream = "http://79.120.77.11:8002/poetryru"; - station = "Стихи"; - desc = "Russian poetry"; - } - { - stream = "http://listen.radiopartywelle.com:8000"; - station = "Radio Partywelle"; - logo = "https://www.radiopartywelle.com/wp-content/uploads/2020/11/RPW-HAUPTLOGO-einfach-gute-Laune-1.png"; - desc = "... einfach gute Laune!"; - } - { stream = paloma "RP-Fresh"; station = paloma-name "Fresh"; logo = paloma-logo; } - { stream = paloma "RP-Kultschlager"; station = paloma-name "Kultschlager"; logo = paloma-logo; } - { stream = paloma "RP-Kuschelschlager"; station = paloma-name "Kuschelschlager"; logo = paloma-logo; } - { stream = paloma "RP-Partyschlager"; station = paloma-name "Partyschlager"; logo = paloma-logo; } - { stream = paloma "RP-Volksmusik"; station = paloma-name "Volksmusik"; logo = paloma-logo; } - { stream = paloma "RADIOPALOMA"; station = paloma-name "Live"; logo = paloma-logo; } - { - stream = "http://91.121.59.45:8013/autodj"; - station = "Feeling Floyd | AutoDJ"; - } - { - stream = "http://91.121.59.45:8013/live"; - station = "Feeling Floyd | Live"; - } -] +in + [ + { + stream = "http://lassul.us:8000/radio.ogg"; + station = "Radio lassulus"; + logo = "http://lassul.us/art/portraits/selbstportrait.jpg"; + desc = "Diminutive from lassus (“weary, faint, tired”). A programming human. Doing superior professional art."; + } + { + station = "C3 Lounge"; + stream = "https://c3lounge.de/radio/8000/radio.mp3"; + } + { + stream = "https://radio.kmein.de/lyrik.ogg"; + station = "Lyrik"; + desc = "Lyrik-Lesung rund um die Uhr."; + } + { + stream = "https://radio.kmein.de/lyrikline.ogg"; + station = "Lyrikline"; + logo = "https://www.lyrikline.org/themes/lyrik/svg/Logo_lyrikline_pure.svg"; + desc = "24/7 zufällige Wiedergaben von lyrikline.org."; + } + { + stream = "https://radio.kmein.de/wikipedia.ogg"; + station = "Wikipedia"; + desc = "Zufällige Wikipedia-Artikel"; + logo = "https://de.wikipedia.org/wiki/Wikipedia:Enzyklop%C3%A4die/Logo_von_Wikipedia#/media/Datei:Wikipedia-logo-v2.svg"; + } + { + stream = "http://162.244.80.20:6948"; + station = "Cool Jazz Florida"; + logo = "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/d1/30/24209/c300.png"; + desc = "Sit Back and Relax and Enjoy the Sophisticated Cool Jazz on Cool Jazz Florida!"; + } + { + stream = "https://stream1.mfm.plexpark.com/radio/8000/simulcast-berlin-sd-64.aac"; + station = "Metropol FM Berlin"; + logo = "https://www.metropolfm.de/wp-content/uploads/2017/04/berlin.png"; + } + { + stream = "https://stream2.mfm.plexpark.com/radio/8040/genre-keyf-sd-64.aac"; + station = "Metropol FM KEYF"; + logo = "https://www.metropolfm.de/wp-content/uploads/2017/04/berlin.png"; + } + { + stream = "https://stream2.mfm.plexpark.com/radio/8050/genre-popslow-sd-64.aac"; + station = "Metropol FM Slow"; + logo = "https://www.metropolfm.de/wp-content/uploads/2017/04/berlin.png"; + } + { + stream = "https://stream1.mfm.plexpark.com/radio/8030/genre-arabesk-sd-64.aac"; + station = "Metropol FM Arabesk"; + logo = "https://www.metropolfm.de/wp-content/uploads/2017/04/berlin.png"; + } + { + stream = "http://rb-stream.de:8000/rrb_128.mp3"; + station = "Radio Russkij Berlin"; + logo = "http://radio-rb.de/img/site/logo.png"; + desc = "Голос нашего города ..."; + } + { + stream = "https://drachenhits.stream.laut.fm/drachenhits"; + station = "Drachenhits"; + } + ] + ++ + # generated via: curl https://radiorecord.ru/api/stations | jq '.result.stations | sort_by(.sort) | map({station:.title,desc:.tooltip,logo:.icon_fill_colored,stream:.stream_320})' > radiorecord.json + importJSON ./radiorecord.json + ++ [ + { + desc = "Your favorite dance tunes from the start of the decade. Familiar hits and overlooked classics in abundance."; + station = di-fm-name "00s Club Hits"; + stream = di-fm "00sclubhits"; + } + { + desc = "Electronic sounds and atmospheric textures create a genre to enhance your state of mind and take you deeper."; + station = di-fm-name "Ambient"; + stream = di-fm "ambient"; + } + { + desc = "Spaced out, melodic and full of warmth – these broken beat dance tunes will keep you dazed and amused."; + station = di-fm-name "Atmospheric Breaks"; + stream = di-fm "atmosphericbreaks"; + } + { + desc = "From the funkiest grooves to the dirtiest beats. Hard-hitting, high energy 4/4 club cuts to move the masses."; + station = di-fm-name "Bass & Jackin' House"; + stream = di-fm "bassnjackinhouse"; + } + { + desc = "Blending together elements of house music, speed garage, and techno – it's all about the low end frequencies."; + station = di-fm-name "Bassline"; + stream = di-fm "bassline"; + } + { + desc = "Heavily focused on breakbeats and dusty samples. A defining 90s musical movement still going strong today."; + station = di-fm-name "Big Beat"; + stream = di-fm "bigbeat"; + } + { + desc = "Fusing together house elements from the past and the present – prime time music full of uplifting high energy."; + station = di-fm-name "Big Room House"; + stream = di-fm "bigroomhouse"; + } + { + desc = "Inspired by hip hop and UK rave music, breaks features broken up drum loops and creative samples, synths and fx."; + station = di-fm-name "Breaks"; + stream = di-fm "breaks"; + } + { + desc = "The sounds of Chill & Tropical House are expertly made for lounging and dancing alike with its deeper house vibes."; + station = di-fm-name "Chill & Tropical House"; + stream = di-fm "chillntropicalhouse"; + } + { + desc = "Good EDM doesn't have to blow out your speakers and our curated selection of Chill EDM is a testament to the strength of mellow, chilled out electronic music."; + station = di-fm-name "Chill EDM"; + stream = di-fm "chilledm"; + } + { + desc = "Mellow chill beats, lofi hip-hop, trip hop, downtempo beats and jazz, blended together in a laid back style for perfect listening."; + station = di-fm-name "ChillHop"; + stream = di-fm "chillhop"; + } + { + desc = "Electronic sounds, mellow mid-tempo rhythms, and a groove meant to calm the senses and ease the mind."; + station = di-fm-name "Chillout"; + stream = di-fm "chillout"; + } + { + desc = "The perfect musical soundtrack for when you want to close your eyes, get truly comfortable, and drift away."; + station = di-fm-name "Chillout Dreams"; + stream = di-fm "chilloutdreams"; + } + { + desc = "The brilliant combination of dubstep rhythms with the mellow grooves of chillout. A unique sound all its own."; + station = di-fm-name "Chillstep"; + stream = di-fm "chillstep"; + } + { + desc = "European pop music born in the 90s full of high energy sounds and big hooks – now heard in gyms and malls worldwide."; + station = di-fm-name "Classic EuroDance"; + stream = di-fm "classiceurodance"; + } + { + desc = "Conceived in the European discos in the 70s, evolving through the decades into modern electronic masterpieces."; + station = di-fm-name "Classic EuroDisco"; + stream = di-fm "classiceurodisco"; + } + { + desc = "The classic melodies, the epic breakdowns and gigantic builds. Re-experience Trance music in her prime."; + station = di-fm-name "Classic Trance"; + stream = di-fm "classictrance"; + } + { + desc = "Classic sounds of Vocal Trance"; + station = di-fm-name "Classic Vocal Trance"; + stream = di-fm "classicvocaltrance"; + } + { + desc = "The bassbin rattling, speaker-freaking hits of Dubstep – all tried, tested and approved to work in the clubs."; + station = di-fm-name "Club Dubstep"; + stream = di-fm "clubdubstep"; + } + { + desc = "The music heard in the biggest venues worldwide. From prime time pushers to deeper house shakers – the sounds of now."; + station = di-fm-name "Club Sounds"; + stream = di-fm "club"; + } + { + desc = "From techno, deep house, progressive and trance – check out the sounds of the DJ deep in the mix."; + station = di-fm-name "DJ Mixes"; + stream = di-fm "djmixes"; + } + { + desc = "Evil, gritty and twisted DnB / Drum & Bass. at 160+ BPM, hear the darkest basslines and the hardest hitting percussion."; + station = di-fm-name "Dark DnB"; + stream = di-fm "darkdnb"; + } + { + desc = "The darker form of PsyTrance, which is a sound all its own – direct from Goa to your headphones."; + station = di-fm-name "Dark PsyTrance"; + stream = di-fm "darkpsytrance"; + } + { + desc = "House music crafted for the smaller and mid-sized rooms – deeper tracks full of silky, smooth grooves."; + station = di-fm-name "Deep House"; + stream = di-fm "deephouse"; + } + { + desc = "Elements of house, funk, and disco. Mid-tempo beats, soulful grooves and head nodding selections."; + station = di-fm-name "Deep Nu-Disco"; + stream = di-fm "deepnudisco"; + } + { + desc = "This smooth, groove-heavy selection of deep progressive house tracks is the perfect soundtrack for smaller and mid-sized rooms."; + station = di-fm-name "Deep Progressive House"; + stream = di-fm "deepprogressivehouse"; + } + { + desc = "A fusion of deep house & techno. Punchy grooves, spaced out sounds and forward thinking productions."; + station = di-fm-name "Deep Tech"; + stream = di-fm "deeptech"; + } + { + desc = "Where would dance music be without Detroit? The city that started it all continues to inspire and educate."; + station = di-fm-name "Detroit House & Techno"; + stream = di-fm "detroithousentechno"; + } + { + desc = "The feel good sound inspired from 70s disco combined with the warm kick drum of modern house music."; + station = di-fm-name "Disco House"; + stream = di-fm "discohouse"; + } + { + desc = "Head nodding beats, chilled vocals, and lush soundscapes to bring down the sun and start the night."; + station = di-fm-name "Downtempo Lounge"; + stream = di-fm "downtempolounge"; + } + { + desc = "Born in the mid 90s, Drum and Bass / DnB is all about fast breakbeats, urban vibes, and rib rattling basslines."; + station = di-fm-name "Drum and Bass"; + stream = di-fm "drumandbass"; + } + { + desc = "A hybrid of half-time Dubstep and intense Drum and Bass / DnB."; + station = di-fm-name "Drumstep"; + stream = di-fm "drumstep"; + } + { + desc = "An emphasis on the bass and drums / DnB, delayed effects, sampled vocals and smokey Reggae inspired vibes."; + station = di-fm-name "Dub"; + stream = di-fm "dub"; + } + { + desc = "The beloved sounds of deep techno saturated with tape delays, heavy reverb and ice cold atmospherics."; + station = di-fm-name "Dub Techno"; + stream = di-fm "dubtechno"; + } + { + desc = "The wobbles of the bass, the party rocking beats, and the biggest crowd destroying drops."; + station = di-fm-name "Dubstep"; + stream = di-fm "dubstep"; + } + { + desc = "The sound of the largest events. From the gargantuan festivals, the huge main rooms and the biggest DJs."; + station = di-fm-name "EDM Festival"; + stream = di-fm "edmfestival"; + } + { + desc = "Where dance meets pop. Crossover favorites, stadium-sized anthems and the biggest electronic tunes in existence."; + station = di-fm-name "EDM Hits"; + stream = di-fm "edm"; + } + { + desc = "Buzzing basslines, huge kicks, party rocking drops. House music packed full of gigantic bass and massive synths."; + station = di-fm-name "Electro House"; + stream = di-fm "electrohouse"; + } + { + desc = "The combination of 1920s-1940s jazz and swing music, big band horns and modern day electro house."; + station = di-fm-name "Electro Swing"; + stream = di-fm "electroswing"; + } + { + desc = "The trailblazers, the renegades and the experimental musicians who gave early inspiration with electronic instruments."; + station = di-fm-name "Electronic Pioneers"; + stream = di-fm "electronicpioneers"; + } + { + desc = "Catchy pop music blended together with vintage synthesizers and electronic instrumentation."; + station = di-fm-name "Electropop"; + stream = di-fm "electropop"; + } + { + desc = "Trance in its most boisterous form. Uplifting melodies on top of high energy beats create these euphoric anthems."; + station = di-fm-name "Epic Trance"; + stream = di-fm "epictrance"; + } + { + desc = "Pop music infused with a high energy 4/4 pulse. Heavy on the synthesizers, the melodies and the vocals."; + station = di-fm-name "EuroDance"; + stream = di-fm "eurodance"; + } + { + desc = "Focused on the funkiest grooves, with plenty of the guitar licks and clever samples placed around a 4/4 swing."; + station = di-fm-name "Funky House"; + stream = di-fm "funkyhouse"; + } + { + desc = "Hard basslines, booming beats and insatiable grooves. Inspired by Trap, Juke and Garage – molded together into a unique booming style."; + station = di-fm-name "Future Bass"; + stream = di-fm "futurebass"; + } + { + desc = "2step Garage rhythms, chunky bass line driven grooves and plenty of forward thinking innovation."; + station = di-fm-name "Future Garage"; + stream = di-fm "futuregarage"; + } + { + desc = "Finest selection of futurepop and synthpop."; + station = di-fm-name "Future Synthpop"; + stream = di-fm "futuresynthpop"; + } + { + desc = "The hardest form of techno with punishing tracks designed to drive the crowds into a sweaty frenzy."; + station = di-fm-name "Gabber"; + stream = di-fm "gabber"; + } + { + desc = "The sound of digital malfunctions, electric hum and bit rate distortions perfectly placed alongside laid-back hip hop beats."; + station = di-fm-name "Glitch Hop"; + stream = di-fm "glitchhop"; + } + { + desc = "A very psychedelic form of trance, Goa-Psy Trance is a sound full of arpeggiated synths and trippy effects."; + station = di-fm-name "Goa-Psy Trance"; + stream = di-fm "goapsy"; + } + { + desc = "A channel showcasing everything from hard dance, trance and happy hardcore to lift the spirits (and the arms)."; + station = di-fm-name "Hands Up"; + stream = di-fm "handsup"; + } + { + desc = "Concrete kicks and punching rhythms, hard dance is a tougher side of music with sharp edges and aggressive power."; + station = di-fm-name "Hard Dance"; + stream = di-fm "harddance"; + } + { + desc = "Tough as nails warehouse jams full of cold aggression, sinister structures and pounding rhythms that hit hard."; + station = di-fm-name "Hard Techno"; + stream = di-fm "hardtechno"; + } + { + desc = "Strictly for the hardcore. These are the biggest and boldest bangers, and the hardest hitting tracks."; + station = di-fm-name "Hardcore"; + stream = di-fm "hardcore"; + } + { + desc = "Hard techno & hardcore. A global phenomenon with powerful kicks, distorted effects and infectious melodies."; + station = di-fm-name "Hardstyle"; + stream = di-fm "hardstyle"; + } + { + desc = "Born in Chicago and now global, house music is always evolving but remains true to its pure 4/4 structure."; + station = di-fm-name "House"; + stream = di-fm "house"; + } + { + desc = "Smooth, groovy and full of cutting-edge, fresh ideas – beats to kick back and enjoy far from the club setting."; + station = di-fm-name "Indie Beats"; + stream = di-fm "indiebeats"; + } + { + desc = "The spirit of Rock & Roll with an electronic soul. Club culture and live music combined."; + station = di-fm-name "Indie Dance"; + stream = di-fm "indiedance"; + } + { + desc = "One of the biggest cultural soundtracks with the infectious thump of house music. Expect sultry saxophones, trumpets, and finger snapping grooves."; + station = di-fm-name "Jazz House"; + stream = di-fm "jazzhouse"; + } + { + desc = "Jungle keeps the breakbeat tempos high and celebrates the diverse ideas found within urban and rave music."; + station = di-fm-name "Jungle"; + stream = di-fm "jungle"; + } + { + desc = "The sounds of Salsa, Brazilian beats and Latin Jazz with the steady grooves of modern East Coast dance music."; + station = di-fm-name "Latin House"; + stream = di-fm "latinhouse"; + } + { + desc = "Smooth as water, with the fast paced rhythms, Liquid DNB / Drum and Bass flows with rolling ease without losing momentum."; + station = di-fm-name "Liquid DnB"; + stream = di-fm "liquiddnb"; + } + { + desc = "Smooth, rolling and steady – this fresh formation of Dubstep keeps the sounds you love with a flowing Drum and Bass groove."; + station = di-fm-name "Liquid Dubstep"; + stream = di-fm "liquiddubstep"; + } + { + desc = "The smoother side of Trap but still packed with mechanical grooves and hip hop moods."; + station = di-fm-name "Liquid Trap"; + stream = di-fm "liquidtrap"; + } + { + desc = "Tastefully selected LoFi Hip-Hop tunes with textured atmospheres & laid back beats – with a dash of chillhop and perfectly designed to chill your ears."; + station = di-fm-name "LoFi Hip-Hop"; + stream = di-fm "lofihiphop"; + } + { + desc = "Punch your one-way ticket to peace of mind and mental clarity with this curated selection of LoFi Lounge & Chill tracks today."; + station = di-fm-name "LoFi Lounge & Chill"; + stream = di-fm "lofiloungenchill"; + } + { + desc = "Music to chill to. Music made for when it's all about kicking off your shoes, laying back, and totally relaxing."; + station = di-fm-name "Lounge"; + stream = di-fm "lounge"; + } + { + desc = "The melodic side of progressive house, packed with driving rhythms and forward thinking sounds."; + station = di-fm-name "Melodic Progressive"; + stream = di-fm "melodicprogressive"; + } + { + desc = "Minimal fuses elements of house, techno and electronica and strips it back to focus on the spaces between the sound."; + station = di-fm-name "Minimal"; + stream = di-fm "minimal"; + } + { + desc = "Pitched up vocals, happy hardcore beats, and high energy music non-stop."; + station = di-fm-name "Nightcore"; + stream = di-fm "nightcore"; + } + { + desc = "Modern disco music blending the familiar funk of the 70s and 80s with futuristic beats and up to date grooves."; + station = di-fm-name "Nu Disco"; + stream = di-fm "nudisco"; + } + { + desc = "Acid, one of the characteristics of the TB-303, is celebrated here with the best tracks from house, techno and trance."; + station = di-fm-name "Oldschool Acid"; + stream = di-fm "oldschoolacid"; + } + { + desc = "The biggest classics and secret weapons – this is a true treasure chest of house tracks from back in the day."; + station = di-fm-name "Oldschool House"; + stream = di-fm "oldschoolhouse"; + } + { + desc = "Grab your whistles, white gloves and reach for the laser beams. This is the sound of raving when raving was new."; + station = di-fm-name "Oldschool Rave"; + stream = di-fm "oldschoolrave"; + } + { + desc = "Go back in time and hear the biggest and best tracks within techno and trance that defined a decade of dance culture."; + station = di-fm-name "Oldschool Techno & Trance"; + stream = di-fm "oldschool"; + } + { + desc = "Always moving forward, progressive continues to reinvent itself into new sounds and styles made for the floor."; + station = di-fm-name "Progressive"; + stream = di-fm "progressive"; + } + { + desc = "Progress your mind to undiscovered psychedelic dimensions."; + station = di-fm-name "Progressive Psy"; + stream = di-fm "progressivepsy"; + } + { + desc = "Downtempo psychedelic dub grooves, goa ambient, and world beats."; + station = di-fm-name "PsyChill"; + stream = di-fm "psychill"; + } + { + desc = "Dub, ambient, and psychedelic trance, fused together in atmospheric harmony."; + station = di-fm-name "PsyDub"; + stream = di-fm "psydub"; + } + { + desc = "The psychedelic side of ambient."; + station = di-fm-name "Psybient"; + stream = di-fm "psybient"; + } + { + desc = "Russia's hottest club hits."; + station = di-fm-name "Russian Club Hits"; + stream = di-fm "russianclubhits"; + } + { + desc = "House music saturated with feeling – full of melodies, vocals and true soul. Steady warm 4/4 vibes."; + station = di-fm-name "Soulful House"; + stream = di-fm "soulfulhouse"; + } + { + desc = "Ambient space music for expanding minds."; + station = di-fm-name "Space Dreams"; + stream = di-fm "spacemusic"; + } + { + desc = "This selection of summer chill house classics has been handpicked to elicit that special summer feeling year-round."; + station = di-fm-name "Summer Chill House"; + stream = di-fm "summerchillhouse"; + } + { + desc = "Influenced by video games and movie soundtracks of the 80s, Synthwave's mission continues today with great new music keeping things future retro."; + station = di-fm-name "Synthwave"; + stream = di-fm "synthwave"; + } + { + desc = "Blending the warmth of house music with the cold structural precision of techno, tech house bridges the divide."; + station = di-fm-name "Tech House"; + stream = di-fm "techhouse"; + } + { + desc = "Techno is a true musical force full of structure and style. Robotic, mechanical and full of soul, always facing the future."; + station = di-fm-name "Techno"; + stream = di-fm "techno"; + } + { + desc = "Emotive dance music which embraces incredible melodies, future-facing production and energetic anthems heard worldwide."; + station = di-fm-name "Trance"; + stream = di-fm "trance"; + } + { + desc = "Born out of Southern Hip-Hop and influenced by techno, trap is analog drum machines / DnB & with hip-hop aesthetics."; + station = di-fm-name "Trap"; + stream = di-fm "trap"; + } + { + desc = "The percussive side of the house and tech house scene, tribal house takes drums and puts them in the forefront."; + station = di-fm-name "Tribal House"; + stream = di-fm "tribalhouse"; + } + { + desc = "UMF Radio 24/7"; + station = di-fm-name "UMF Radio"; + stream = di-fm "umfradio"; + } + { + desc = "From gritty Berlin streets to dark corners of Brooklyn, this is techno made by artists pushing the genre further."; + station = di-fm-name "Underground Techno"; + stream = di-fm "undergroundtechno"; + } + { + desc = "Relaxing vibes and a collection of vocal songs providing the laid back soundtrack to your day."; + station = di-fm-name "Vocal Chillout"; + stream = di-fm "vocalchillout"; + } + { + desc = "The glorious 4/4 thump of House music paired perfectly with the human voice. Sultry, soulful, sexy sounds."; + station = di-fm-name "Vocal House"; + stream = di-fm "vocalhouse"; + } + { + desc = "Laid back grooves and a collection of smooth vocals soothe the ears and relax the mind."; + station = di-fm-name "Vocal Lounge"; + stream = di-fm "vocallounge"; + } + { + desc = "Lush vocals paired together with emotive dance music. Beautiful melodies and endless energy."; + station = di-fm-name "Vocal Trance"; + stream = di-fm "vocaltrance"; + } + { + desc = "All Vaporwave. All the time."; + logo = "http://soma.fm/img/vaporwaves120.jpg"; + station = soma-fm-name "Vaporwaves"; + stream = soma-fm "vaporwaves"; + } + { + desc = "Emotional Experiments in Music: Ambient, modern composition, post-rock, & experimental electronic music"; + logo = "http://soma.fm/img/n5md120.png"; + station = soma-fm-name "n5MD Radio"; + stream = soma-fm "n5md"; + } + { + desc = "A nicely chilled plate of ambient/downtempo beats and grooves."; + logo = "http://soma.fm/img/groovesalad120.png"; + station = soma-fm-name "Groove Salad"; + stream = soma-fm "groovesalad"; + } + { + desc = "The classic (early 2000s) version of a nicely chilled plate of ambient/downtempo beats and grooves."; + logo = "http://soma.fm/img3/gsclassic120.jpg"; + station = soma-fm-name "Groove Salad Classic"; + stream = soma-fm "gsclassic"; + } + { + desc = "Deep ambient electronic, experimental and space music. For inner and outer space exploration."; + logo = "http://soma.fm/img/deepspaceone120.gif"; + station = soma-fm-name "Deep Space One"; + stream = soma-fm "deepspaceone"; + } + { + desc = "Tune in, turn on, space out. Spaced-out ambient and mid-tempo electronica."; + logo = "http://soma.fm/img/sss.jpg"; + station = soma-fm-name "Space Station Soma"; + stream = soma-fm "spacestation"; + } + { + desc = "Served best chilled, safe with most medications. Atmospheric textures with minimal beats."; + logo = "http://soma.fm/img/dronezone120.jpg"; + station = soma-fm-name "Drone Zone"; + stream = soma-fm "dronezone"; + } + { + desc = "Progressive house / trance. Tip top tunes."; + logo = "http://soma.fm/img/thetrip120.jpg"; + station = soma-fm-name "The Trip"; + stream = soma-fm "thetrip"; + } + { + desc = "Music for Hacking. The DEF CON Year-Round Channel."; + logo = "http://soma.fm/img/defcon120.png"; + station = soma-fm-name "DEF CON Radio"; + stream = soma-fm "defcon"; + } + { + desc = "Transcending the world of jazz with eclectic, avant-garde takes on tradition."; + logo = "http://soma.fm/img/sonicuniverse120.jpg"; + station = soma-fm-name "Sonic Universe"; + stream = soma-fm "sonicuniverse"; + } + { + desc = "NEW! Reggae, Ska, Rocksteady classic and deep tracks."; + logo = "http://soma.fm/img3/reggae120.png"; + station = soma-fm-name "Heavyweight Reggae"; + stream = soma-fm "reggae"; + } + { + desc = "Vintage soul tracks from the original 45 RPM vinyl."; + logo = "http://soma.fm/img/7soul120.png"; + station = soma-fm-name "Seven Inch Soul"; + stream = soma-fm "7soul"; + } + { + desc = "Mellow album rock from the Seventies. Yacht not required."; + logo = "http://soma.fm/img/seventies120.jpg"; + station = soma-fm-name "Left Coast 70s"; + stream = soma-fm "seventies"; + } + { + desc = "Early 80s UK Synthpop and a bit of New Wave."; + logo = "http://soma.fm/img/u80s-120.png"; + station = soma-fm-name "Underground 80s"; + stream = soma-fm "u80s"; + } + { + desc = "The soundtrack for your stylish, mysterious, dangerous life. For Spies and PIs too!"; + logo = "http://soma.fm/img/secretagent120.jpg"; + station = soma-fm-name "Secret Agent"; + stream = soma-fm "secretagent"; + } + { + desc = "Sensuous and mellow vocals, mostly female, with an electronic influence."; + logo = "http://soma.fm/img/lush120.jpg"; + station = soma-fm-name "Lush"; + stream = soma-fm "lush"; + } + { + desc = "Exploring music from Celtic roots and branches"; + logo = "http://soma.fm/img/thistle120.png"; + station = soma-fm-name "ThistleRadio"; + stream = soma-fm "thistle"; + } + { + desc = "Drown in the electronic sound of instrumental hiphop, future soul and liquid trap."; + logo = "http://soma.fm/img/fluid120.jpg"; + station = soma-fm-name "Fluid"; + stream = soma-fm "fluid"; + } + { + desc = "Electropop and indie dance rock with sparkle and pop."; + logo = "http://soma.fm/img/poptron120.png"; + station = soma-fm-name "PopTron"; + stream = soma-fm "poptron"; + } + { + desc = "A late night blend of deep-house and downtempo chill."; + logo = "http://soma.fm/img/blender120.png"; + station = soma-fm-name "Beat Blender"; + stream = soma-fm "beatblender"; + } + { + desc = "Americana Roots music for Cowhands, Cowpokes and Cowtippers"; + logo = "http://soma.fm/img/bootliquor120.jpg"; + station = soma-fm-name "Boot Liquor"; + stream = soma-fm "bootliquor"; + } + { + desc = "Classic bachelor pad, playful exotica and vintage music of tomorrow."; + logo = "http://soma.fm/img/illstreet.jpg"; + station = soma-fm-name "Illinois Street Lounge"; + stream = soma-fm "illstreet"; + } + { + desc = "What alternative rock radio should sound like. [explicit]"; + logo = "http://soma.fm/img/bagel120.png"; + station = soma-fm-name "BAGeL Radio"; + stream = soma-fm "bagel"; + } + { + desc = "New and classic favorite indie pop tracks."; + logo = "http://soma.fm/img/indychick.jpg"; + station = soma-fm-name "Indie Pop Rocks!"; + stream = soma-fm "indiepop"; + } + { + desc = "Digitally affected analog rock to calm the agitated heart."; + logo = "http://soma.fm/img/digitalis120.png"; + station = soma-fm-name "Digitalis"; + stream = soma-fm "digitalis"; + } + { + desc = "Indie Folk, Alt-folk and the occasional folk classics."; + logo = "http://soma.fm/img/folkfwd120.jpg"; + station = soma-fm-name "Folk Forward"; + stream = soma-fm "folkfwd"; + } + { + desc = "Blips'n'beeps backed mostly w/beats. Intelligent Dance Music."; + logo = "http://soma.fm/img/cliqhop120.png"; + station = soma-fm-name "cliqhop idm"; + stream = soma-fm "cliqhop"; + } + { + desc = "Dubstep, Dub and Deep Bass. May damage speakers at high volume."; + logo = "http://soma.fm/img/dubstep120.png"; + station = soma-fm-name "Dub Step Beyond"; + stream = soma-fm "dubstep"; + } + { + desc = "Desi-influenced Asian world beats and beyond."; + logo = "http://soma.fm/img/sog120.jpg"; + station = soma-fm-name "Suburbs of Goa"; + stream = soma-fm "suburbsofgoa"; + } + { + desc = "Ambient music mixed with the sounds of San Francisco public safety radio traffic."; + logo = "http://soma.fm/img/sf1033120.png"; + station = soma-fm-name "SF 10-33"; + stream = soma-fm "sf1033"; + } + { + desc = "San Francisco Public Safety Scanner Feed"; + logo = "http://soma.fm/img/sf1033120.png"; + station = soma-fm-name "SF Police Scanner"; + stream = soma-fm "scanner"; + } + { + desc = "Celebrating NASA and Space Explorers everywhere."; + logo = "http://soma.fm/img/missioncontrol120.jpg"; + station = soma-fm-name "Mission Control"; + stream = soma-fm "missioncontrol"; + } + { + desc = "From black to doom, prog to sludge, thrash to post, stoner to crossover, punk to industrial."; + logo = "http://soma.fm/img3/metal120.png"; + station = soma-fm-name "Metal Detector"; + stream = soma-fm "metal"; + } + { + desc = "Just covers. Songs you know by artists you don't. We've got you covered."; + logo = "http://soma.fm/img/covers120.jpg"; + station = soma-fm-name "Covers"; + stream = soma-fm "covers"; + } + { + desc = "From the Playa to the world, for the annual Burning Man festival."; + logo = "http://soma.fm/img/1023brc.jpg"; + station = soma-fm-name "Black Rock FM"; + stream = soma-fm "brfm"; + } + { + desc = "Special Live Events and rebroadcasts of past live events"; + logo = "http://soma.fm/img/SomaFMDJSquare120.jpg"; + station = soma-fm-name "SomaFM Live"; + stream = soma-fm "live"; + } + { + desc = "SomaFM's wacky and eclectic holiday mix. Not for the easily offended."; + logo = "http://soma.fm/img/xmasinfrisco120.jpg"; + station = soma-fm-name "Xmas in Frisko"; + stream = soma-fm "xmasinfrisko"; + } + { + desc = "Chilled holiday grooves and classic winter lounge tracks. (Kid and Parent safe!)"; + logo = "http://soma.fm/img/christmaslounge120.png"; + station = soma-fm-name "Christmas Lounge"; + stream = soma-fm "christmas"; + } + { + desc = "Have your self an indie/alternative holiday season!"; + logo = "http://soma.fm/img/xmasrocks120.png"; + station = soma-fm-name "Christmas Rocks!"; + stream = soma-fm "xmasrocks"; + } + { + desc = "Where we cut right to the soul of the season."; + logo = "http://soma.fm/img/jollysoul120.png"; + station = soma-fm-name "Jolly Ol' Soul"; + stream = soma-fm "jollysoul"; + } + { + desc = "Department Store Christmas (extended through Jan 31)"; + logo = "http://soma.fm/img/SomaFMDJSquare120.jpg"; + station = soma-fm-name "SomaFM Specials"; + stream = soma-fm "specials"; + } + { + desc = "HandsUp / Dance"; + logo = "https://www.technobase.fm/content/images/site/logo-technobase.fm.png"; + station = we-are-one-name "TechnoBase.FM"; + stream = we-are-one "technobase"; + } + { + desc = "Dance & Pop"; + logo = "https://www.housetime.fm/content/images/site/logo-housetime.fm.png"; + station = we-are-one-name "HouseTime.FM"; + stream = we-are-one "housetime"; + } + { + desc = "Hardstyle"; + logo = "https://www.hardbase.fm/content/images/site/logo-hardbase.fm.png"; + station = we-are-one-name "HardBase.FM"; + stream = we-are-one "hardbase"; + } + { + desc = "Vocal & Uplifting Trance"; + logo = "https://www.trancebase.fm/content/images/site/logo-trancebase.fm.png"; + station = we-are-one-name "TranceBase.FM"; + stream = we-are-one "trancebase"; + } + { + desc = "Hardcore"; + logo = "https://www.coretime.fm/content/images/site/logo-coretime.fm.png"; + station = we-are-one-name "CoreTime.FM"; + stream = we-are-one "coretime"; + } + { + desc = "Techno / Minimal"; + logo = "https://www.clubtime.fm/content/images/site/logo-clubtime.fm.png"; + station = we-are-one-name "ClubTime.FM"; + stream = we-are-one "clubtime"; + } + { + desc = "Happy Hardcore / DnB"; + logo = "https://www.teatime.fm/content/images/site/logo-teatime.fm.png"; + station = we-are-one-name "TeaTime.FM"; + stream = we-are-one "teatime"; + } + { + desc = "90s / 00s"; + logo = "https://www.replay.fm/content/images/site/logo-replay.fm.png"; + station = we-are-one-name "Replay.FM"; + stream = we-are-one "replay"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Bigg-G-Quadrat-Webstream-final-klein.jpg"; + station = big-fm-name "Dancehall – Reggae – Afrobeat"; + stream = big-fm "reggaevibes"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/bigBALKAN_0.jpg"; + station = big-fm-name "bigBALKAN"; + stream = big-fm "balkan"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/bigSES_0.jpg"; + station = big-fm-name "bigSES (Türkei)"; + stream = big-fm "turkey"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/I_love_bigFM_CHARTS.jpg"; + station = big-fm-name "Charts"; + stream = big-fm "charts"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Rock_am_Ring_720_Webradio_Crowd_2.jpg"; + station = big-fm-name "Rock am Ring"; + stream = big-fm "rockamring"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/I_love_bigFM_MASHUP_0.jpg"; + station = big-fm-name "Mashup"; + stream = big-fm "mashup"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/bigFM_US_Rap_Hip-Hop.jpg"; + station = big-fm-name "US Rap & Hip Hop"; + stream = big-fm "usrap"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/I_love_bigFM_HIP-HOP_0.jpg"; + station = big-fm-name "Hip-Hop"; + stream = big-fm "hiphop"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Oldschool_Rap_Hip_Hop_720x720.jpg"; + station = big-fm-name "Oldschool Rap & Hip Hop"; + stream = big-fm "oldschool"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Hip_Hop_Charts_DJ_blau.jpg"; + station = big-fm-name "Deutscher Hip-Hop Charts"; + stream = big-fm "dhiphopcharts"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/bigFM_DEUTSCHRAP.jpg"; + station = big-fm-name "Deutschrap"; + stream = big-fm "deutschrap"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Markus-Spiske-unsplash-quadrat-berlin.jpg"; + station = big-fm-name "Neu Berlin Deutschrap"; + stream = big-fm "rapfeature"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/Oldschool_Deutsch_720x720.jpeg"; + station = big-fm-name "Oldschool Deutschrap"; + stream = big-fm "oldschooldeutsch"; + } + { + logo = "https://cdn.bigfm.de/sites/default/files/styles/small_webstream_200/public/I_love_bigFM_MASHUP_0.jpg"; + station = big-fm-name "Mashup"; + stream = big-fm "mashup"; + } + { + station = "Schlagerparadies"; + stream = "https://webstream.schlagerparadies.de/schlagerparadies128k.mp3"; + logo = "https://cdn.schlagerparadies.de/images/rsp_setup/logo-radio-schlagerparadies.svg"; + } + { + station = rautemusik-name "Volksmusik"; + desc = "Volksmusik, Blasmusik, Schlager"; + stream = rautemusik "volksmusik"; + } + { + station = rautemusik-name "Study"; + stream = rautemusik "study"; + desc = "Lo-Fi, Chillout, Easy Listening"; + } + { + station = rautemusik-name "TechHouse"; + stream = rautemusik "techhouse"; + desc = "Techhouse, Deephouse, Techno, Minimal"; + } + { + station = rautemusik-name "Goldies"; + stream = rautemusik "goldies"; + desc = "Oldies, 60s, 70s, 80s"; + } + { + station = rautemusik-name "90s"; + stream = rautemusik "90s"; + desc = "90s, Eurodance, Pop, HipHop"; + } + { + station = rautemusik-name "Schlager"; + stream = rautemusik "schlager"; + desc = "Schlager, Discofox, Deutsch, Pop"; + } + { + station = rautemusik-name "Country"; + stream = rautemusik "country"; + desc = "Country, Western, Americana"; + } + { + station = rautemusik-name "Sex"; + stream = rautemusik "sex"; + desc = "RnB, Pop, Easy Listening"; + } + { + station = rautemusik-name "LoveHits"; + stream = rautemusik "lovehits"; + desc = "Lovesongs, Balladen, RnB, Pop"; + } + { + station = rautemusik-name "Klassik"; + stream = rautemusik "klassik"; + desc = "Symphonie, Orchester, Klassik"; + } + { + station = rautemusik-name "Traurig"; + stream = rautemusik "traurig"; + desc = "Balladen, Pop, Easy Listening"; + } + { + station = rautemusik-name "Happy"; + stream = rautemusik "happy"; + desc = "Pop, Dance, Charts"; + } + { + station = rautemusik-name "Solo Piano"; + stream = rautemusik "solopiano"; + desc = "Klavier, Instrumental, Easy Listening"; + } + { + station = rautemusik-name "HappyHardcore"; + stream = rautemusik "happyhardcore"; + desc = "UK Core, Happy Hardcore, Dance"; + } + { + station = rautemusik-name "HardeR"; + stream = rautemusik "harder"; + desc = "Hardstyle, Hardcore, Jumpstyle"; + } + { + station = rautemusik-name "BigCityBeats"; + stream = rautemusik "bigcitybeats"; + desc = "EDM, Dance, House, Electro, Star DJs"; + } + { + station = rautemusik-name "Lounge"; + stream = rautemusik "lounge"; + desc = "Ambient, Jazz, Chillout, Easy Listening"; + } + { + station = rautemusik-name "Oriental"; + stream = rautemusik "oriental"; + desc = "Arabisch, Oriental, HipHop"; + } + { + station = rautemusik-name "Salsa"; + stream = rautemusik "salsa"; + desc = "Salsa, Latina, Tropical"; + } + { + station = rautemusik-name "Christmas"; + stream = rautemusik "christmas"; + desc = "Weihnachtslieder, Balladen, Schlager"; + } + { + station = rautemusik-name "Christmas Chor"; + stream = rautemusik "christmas-chor"; + desc = "Chor, Weihnachtslieder, Gesang"; + } + { + station = rautemusik-name "Christmas Schlager"; + stream = rautemusik "christmas-schlager"; + desc = "Schlager, Weihnachtslieder"; + } + { + station = rautemusik-name "Weihnachten.FM"; + stream = rautemusik "weihnachten"; + desc = "Weihnachtslieder, Pop"; + } + { + station = rautemusik-name "Top40"; + stream = rautemusik "top40"; + desc = "Charts, Top40, Dance, Hiphop"; + } + { + station = rautemusik-name "Rock"; + desc = "Rock, Alternative, Punk"; + stream = rautemusik "rock"; + } + { + station = rautemusik-name "PartyHits"; + desc = "Karneval, Mallorca, Après Ski, Schlager"; + stream = rautemusik "partyhits"; + } + { + station = rautemusik-name "Deutschrap Charts"; + stream = rautemusik "deutschrap-charts"; + desc = "Deutschrap, HipHop, Rap, Charts"; + } + { + station = rautemusik-name "Deutschrap Classic"; + stream = rautemusik "deutschrap-classic"; + desc = "Oldschool, Rap, HipHop, Deutschrap"; + } + { + station = rautemusik-name "ChartHits"; + stream = rautemusik "ChartHits"; + desc = "House, RnB, Dance, Electro"; + } + { + station = rautemusik-name "BreakZ.FM"; + stream = rautemusik "breakz"; + desc = "RnB, House, HipHop, Dance, Mixtapes"; + } + { + station = rautemusik-name "Bass"; + stream = rautemusik "bass"; + desc = "DnB, Dubstep, Trap & Bass House"; + } + { + station = rautemusik-name "12punks"; + stream = rautemusik "12punks"; + desc = "Punk, Punk Rock, Ska, Hardcore"; + } + { + logo = "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/77/a4/13931/1/c175.png"; + station = "Raidió Rírá"; + stream = "http://185.80.220.12:8166/stream"; + desc = "Is cairt-staisiún ceoil é Raidió Rí-Rá a bhíonn ag craoladh go hiomlán trí Ghaeilge! Bíonn an ceol ar fad ó na cairteacha le cloisteáil ar an stáisiún, mar aon leis an bpopnuacht, an nuacht spóirt agus an nuacht scannánaíochta is déanaí!"; + } + { + stream = "http://188.247.86.67:8008"; + station = "Rotana Tarab"; + logo = "https://liveonlineradio.net/wp-content/uploads/2017/11/Rotana-Tarab-100x47.jpg"; + } + { + stream = "http://asima.out.airtime.pro:8000/asima_a"; + station = "Asima"; + } + { + station = "ARTA FM"; + stream = "http://edge.mixlr.com/channel/qtgru"; + } + { + station = "Ninar FM"; + stream = "http://ninarfm.grtvstream.com:8896/stream"; + } + { + stream = "http://5.9.16.111:8210/arabic_live"; + station = "Radio Arabica"; + logo = "https://radioarabica.de/wp-content/uploads/2020/09/LOGO_klein-1.png"; + } + { + stream = "http://iphone.live24.gr/derty1000"; + station = "Derti FM"; + desc = "Μόνο λαϊκά"; + logo = "https://cdn-radiotime-logos.tunein.com/s87063q.png"; + } + { + logo = "http://www.stoxosfm.gr/images/stoxosfm-logo-small.png"; + desc = "Ο Στόχος FM μετράει σχεδόν 25 χρόνια ηχηρής παρουσίας στα ερτζιανά. Ιδρύθηκε το 1990 και έκτοτε έχει διαγράψει μια δυναμική και άκρως επιτυχημένη πορεία, κατακτώντας την προτίμηση ενός σταθερού και ολοένα αυξανόμενου ακροατηρίου."; + station = "Stoxos FM"; + stream = "http://s3.onweb.gr:8016/;"; + } + { + stream = "http://62.210.24.124:8379/;stream.mp3"; + station = "Gjirokastër Albania"; + logo = "https://cdn-radiotime-logos.tunein.com/s151734q.png"; + } + { + stream = "http://radio.hostonnet.com:8000/"; + station = "Malayalam Radio"; + } + { + stream = "http://gill.sukhpal.net:8000/;stream.mp3"; + station = "Dhol Radio"; + desc = "ਪੰਜਾਬੀ ਸੰਗੀਤ"; + } + { + stream = bhaktiworld "2bhanuman"; + station = bhaktiworld-name "Hanuman"; + } + { + stream = bhaktiworld "djbeat"; + station = bhaktiworld-name "Mantra Shakti"; + } + { + stream = bhaktiworld "gurbani"; + station = bhaktiworld-name "Sangam"; + } + { + stream = bhaktiworld "hot"; + station = bhaktiworld-name "Shiv"; + } + { + stream = bhaktiworld "ibadat"; + station = bhaktiworld-name "Devi Maa"; + } + { + stream = bhaktiworld "iskon2b"; + station = bhaktiworld-name "Om Sai"; + } + { + stream = bhaktiworld "millenniumhits"; + station = bhaktiworld-name "Krishna"; + } + { + stream = bhaktiworld "dard"; + station = bhaktiworld-name "Shri Ram"; + } + { + stream = bhaktiworld "bhaktiworldindia"; + station = bhaktiworld-name "Ganesh"; + } + { + station = "Rockabilly Radio"; + stream = "http://lin3.ash.fast-serv.com:6026/stream_96"; + logo = "https://static.wixstatic.com/media/c62c90_074ca7d75d204a7a9f9ee576e3e5c6fb~mv2.png/v1/fill/w_521,h_168,al_c,q_85,usm_0.66_1.00_0.01/rbrbannernewblue_edited.webp"; + desc = "The home of rockin' music."; + } + { + logo = "https://www.liveradio.ie/files/images/115732/resized/180x172c/rte_raidio_na_gaeltachta.jpg"; + station = rte-name "Raidió Na Gaeltachta"; + desc = "Stáisiún Náisiúnta na Gaeltachta agus na Gaeilge, ag craoladh as Gaeilge."; + stream = rte "rnag"; + } + { + logo = "https://www.liveradio.ie/files/images/115762/resized/180x172c/rte_gold.jpg"; + stream = rte "gold"; + station = rte-name "Gold"; + desc = "RTÉ Gold is a play list service offering a carefully chosen selection of classic hits as well as album tracks from top selling artists spanning the '50s, '60s, ‘70s and ‘80s."; + } + { + logo = "https://www.liveradio.ie/files/images/101096/resized/180x172c/rte_lyric_fm.png"; + stream = rte "lyric"; + station = rte-name "Lyric FM"; + desc = "“Without doubt RTÉ lyric fm is for listeners that are looking for a real alternative. With an increase in people tuning to the station ‘where life sounds better’ across weekends, there is something to satisfy everyone’s taste for specialist or more mainstream music.”"; + } + { + logo = "https://www.liveradio.ie/files/images/329303/resized/180x172c/rte_pulse.jpg"; + station = rte-name "Pulse"; + stream = rte "pulse"; + desc = "RTÉ Pulse is an electronic dance music station from Raidió Teilifís Éireann (RTÉ), Ireland's national broadcaster."; + } + { + logo = "https://www.liveradio.ie/files/images/338090/resized/180x172c/rte_radio_1.jpg"; + station = rte-name "Radio 1"; + stream = rte "radio1"; + desc = "RTÉ Radio 1 is the principal radio channel of Irish public-service broadcaster Raidió Teilifís Éireann. The station is a rare modern example of a mixed radio network, broadcasting a mixture of music and speech programming."; + } + { + logo = "https://www.liveradio.ie/files/images/115731/resized/180x172c/rte_radio_1_extra.jpg"; + station = rte-name "Radio 1 Extra"; + stream = rte "radio1extra"; + desc = "RTE Radio 1 Extra (aka RTE Radio 1xtra) – Quality speech radio from home and abroad."; + } + { + logo = "https://cdn-profiles.tunein.com/s96877/images/logoq.png"; + station = "DWG Radio"; + desc = "Bibeltreues Radio im Internet"; + stream = "http://server25531.streamplus.de/;stream.mp3"; + } + { + station = "Wake News"; + logo = "https://stream.wakenews.net/wakenews-radio-200px.jpg"; + stream = "https://stream.wakenews.net/radio-high.ogg"; + desc = "Ohne Blatt vor dem Mund! Für alle, die aufwachen wollen."; + } + { + logo = "http://www.beatlesradio.com/content/images/thumbs/0000587.gif"; + station = "Beatles Radio"; + stream = "http://www.beatlesradio.com:8000/stream"; + desc = ""; + } + { + stream = "http://www.c64.com:8000"; + station = "C64"; + logo = "http://www.c64.com/games/recommended.small.jpg.php?id=1969"; + desc = "ChipTune 24/7."; + } + { + logo = "https://knr.gl/sites/knr/themes/knr/gfx/sprite.png"; + station = "Kalaallit Nunaata Radioa"; + stream = "https://knr.gl/radiolivestream"; + } + { + logo = "http://sithafm.lk/sithafm.jpg"; + station = "Sitha.FM"; + stream = caster-fm "shaincast" 48148; + } + { + stream = royal "RoyalPopsa"; + station = royal-name "Popsa"; + desc = "из Санкт-Петербурга"; + } + { + stream = royal "RoyalTrance"; + station = royal-name "Trance"; + desc = "из Санкт-Петербурга"; + } + { + stream = royal "RoyalDrum"; + station = royal-name "Drum"; + desc = "из Санкт-Петербурга"; + } + { + stream = royal "RoyalTrap"; + station = royal-name "Trap"; + desc = "из Санкт-Петербурга"; + } + { + stream = royal "RoyalRock"; + station = royal-name "Rock"; + desc = "из Санкт-Петербурга"; + } + { + stream = royal "RoyalLounge"; + station = royal-name "Lounge"; + desc = "из Санкт-Петербурга"; + } + { + stream = royal "RoyaLove"; + station = royal-name "Love"; + desc = "из Санкт-Петербурга"; + } + { + station = "Radio Сигма"; + stream = "http://195.191.130.125:8000/sigma"; + desc = "Novy Urengoy 102.3 FM"; + } + { + station = "Rap Français | Mouv"; + stream = "http://icecast.radiofrance.fr/mouvrapfr-midfi.mp3"; + logo = "https://cdn.radiofrance.fr/s3/cruiser-production/2019/01/3c4dc967-ed2c-4ce5-a998-9437a64e05d5/300x300_rapfr.jpg"; + } + { + stream = "http://66.45.232.131:9994/;stream.mp3"; + station = "ERTU Al Quran Al Kareem"; + } + { + stream = "http://onair15.xdevel.com:7064/1/"; + station = "Radio Mozart Italia"; + logo = "https://www.lafenicepubblicita.it/rmi/wp-content/uploads/2020/12/360x180.jpg"; + desc = "Emittente ufficiale delle Associazioni Mozart Italia nel mondo"; + } + { + stream = "http://onair7.xdevel.com:7126/1/"; + station = "Opera Radio Budapest"; + logo = "https://www.opera.hu/static/default/asset/img/common/opera-logo.svg"; + } + { + stream = "http://peacefulpiano.stream.publicradio.org/peacefulpiano.mp3"; + station = "Peaceful Piano"; + } + { + logo = "https://cdn.promodj.com/afs/11a5f0be108d5f48084aac34ec54da9f11:e598f2"; + stream = "https://radio.promodj.com/fullmoon"; + station = "Trance | PromoDJ"; + } + { + stream = "http://worship.lobpreisradio.de:8000/anbetung-lobpreis-radio-37k-ogg-stereo"; + station = "Lobpreisradio"; + desc = "Aufladen mit Lobpreis und Anbetung über Lobpreisradio, täglich auch Evangelium und Predigten sowie die Worship-Hits. Wir wollen Herzen von Gott berühren vor allem mit deutschen aber auch englischem Lobpreis"; + } + { + stream = "http://91.121.134.23:8648/stream"; + station = "The UK 1950s Radio Station"; + logo = "http://www.1950sukradio.co.uk/images/page_componants/1950s_Station_Logo.png"; + } + { + stream = stereoscenic "mod-h"; + station = stereoscenic-name "Ambient Modern"; + } + { + stream = stereoscenic "asp-h"; + station = stereoscenic-name "Ambient Sleeping Pill"; + } + { + stream = stereoscenic "ama-h"; + station = stereoscenic-name "A. M. Ambient"; + } + { + stream = "http://1a-schlagergold.radionetz.de/1a-schlagergold.aac"; + station = "1A Schlagergold"; + } + { + stream = "http://streams.freetalklive.com:8000/"; + station = "Free Talk Live"; + logo = "https://upload.wikimedia.org/wikipedia/en/8/8d/FreeTalkLive_Logo.png"; + desc = "Talk Radio You Control"; + } + { + stream = "https://listen1.outpostradio.com/omagic"; + station = "Organ Magic"; + desc = "Pipe Organ music 24/7. An Outpost Radio station."; + logo = "https://outpostradio.com/organmagic/organ-magic-1-web.jpg"; + } + { + stream = "http://79.120.77.11:8002/poetryru"; + station = "Стихи"; + desc = "Russian poetry"; + } + { + stream = "http://listen.radiopartywelle.com:8000"; + station = "Radio Partywelle"; + logo = "https://www.radiopartywelle.com/wp-content/uploads/2020/11/RPW-HAUPTLOGO-einfach-gute-Laune-1.png"; + desc = "... einfach gute Laune!"; + } + { + stream = paloma "RP-Fresh"; + station = paloma-name "Fresh"; + logo = paloma-logo; + } + { + stream = paloma "RP-Kultschlager"; + station = paloma-name "Kultschlager"; + logo = paloma-logo; + } + { + stream = paloma "RP-Kuschelschlager"; + station = paloma-name "Kuschelschlager"; + logo = paloma-logo; + } + { + stream = paloma "RP-Partyschlager"; + station = paloma-name "Partyschlager"; + logo = paloma-logo; + } + { + stream = paloma "RP-Volksmusik"; + station = paloma-name "Volksmusik"; + logo = paloma-logo; + } + { + stream = paloma "RADIOPALOMA"; + station = paloma-name "Live"; + logo = paloma-logo; + } + { + stream = "http://91.121.59.45:8013/autodj"; + station = "Feeling Floyd | AutoDJ"; + } + { + stream = "http://91.121.59.45:8013/live"; + station = "Feeling Floyd | Live"; + } + ] /* - (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 + (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 + + CNN news in morse code + http://cw.dimebank.com:8080/CNNslow + http://cw.dimebank.com:8080/CNNfast + + Brazilian Jazz + http://stm01.virtualcast.com.br:8190/live + + LoFi / Chill + http://ice55.securenetsystems.net/DASH76 + + News background music + https://c13014-l-hls.u.core.cdn.streamfarm.net/1000153copo/hk2.m3u8 + + ? + http://94.23.221.158:9163/stream + + Greek radio + http://radio.hostchefs.net:8046/stream?1520818130148 + + : http://audiokrishna.com/stations/japa2.mp3 + http://185.105.4.53:2339//;stream.mp3 + http://cast5.servcast.net:1390/;stream.mp3 + + */ -CNN news in morse code -http://cw.dimebank.com:8080/CNNslow -http://cw.dimebank.com:8080/CNNfast - -Brazilian Jazz -http://stm01.virtualcast.com.br:8190/live - -LoFi / Chill -http://ice55.securenetsystems.net/DASH76 - -News background music -https://c13014-l-hls.u.core.cdn.streamfarm.net/1000153copo/hk2.m3u8 - -? -http://94.23.221.158:9163/stream - -Greek radio -http://radio.hostchefs.net:8046/stream?1520818130148 - -: http://audiokrishna.com/stations/japa2.mp3 -http://185.105.4.53:2339//;stream.mp3 -http://cast5.servcast.net:1390/;stream.mp3 - - -*/ diff --git a/modules/dropbox.nix b/modules/dropbox.nix index 7f7bf4f..37c55ca 100644 --- a/modules/dropbox.nix +++ b/modules/dropbox.nix @@ -1,20 +1,25 @@ -{ pkgs, lib, config, ... }: -with lib; -let cfg = config.niveum.dropbox; +{ + pkgs, + lib, + config, + ... +}: +with lib; let + cfg = config.niveum.dropbox; in { - options.niveum.dropbox = { enable = mkEnableOption "Dropbox"; }; + options.niveum.dropbox = {enable = mkEnableOption "Dropbox";}; config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.dropbox-cli ]; + environment.systemPackages = [pkgs.dropbox-cli]; networking.firewall = { - allowedTCPPorts = [ 17500 ]; - allowedUDPPorts = [ 17500 ]; + allowedTCPPorts = [17500]; + allowedUDPPorts = [17500]; }; systemd.user.services.dropbox = { description = "Dropbox synchronisation service"; - wantedBy = [ "graphical-session.target" ]; + wantedBy = ["graphical-session.target"]; serviceConfig = { ExecStart = "${pkgs.dropbox.out}/bin/dropbox"; ExecReload = "${pkgs.coreutils.out}/bin/kill -HUP $MAINPID"; diff --git a/modules/hledger.nix b/modules/hledger.nix index f50cf21..a905c7d 100644 --- a/modules/hledger.nix +++ b/modules/hledger.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.niveum.hledger; hledger-git = pkgs.writers.writeDashBin "hledger-git" '' LEDGER_DIR="$(dirname $LEDGER_FILE)" @@ -39,14 +43,14 @@ in { default = "127.0.0.1"; }; capabilities = mkOption { - type = types.listOf (types.enum [ "view" "add" "manage" ]); - default = [ "view" "add" ]; + type = types.listOf (types.enum ["view" "add" "manage"]); + default = ["view" "add"]; }; flags = mkOption { type = types.listOf types.str; - default = [ ]; + default = []; }; - user = mkOption { type = types.attrs; }; + user = mkOption {type = types.attrs;}; package = mkOption { type = types.package; default = pkgs.hledger-web; @@ -55,22 +59,22 @@ in { }; config = mkIf cfg.enable { - environment.systemPackages = [ cfg.package hledger-git hledger-edit ]; + environment.systemPackages = [cfg.package hledger-git hledger-edit]; environment.variables.LEDGER_FILE = mkIf (cfg.ledgerFile != null) cfg.ledgerFile; systemd.services.hledger-web = mkIf cfg.server.enable { description = "hledger server"; - wantedBy = [ "multi-user.target" ]; + wantedBy = ["multi-user.target"]; serviceConfig = { Restart = "always"; ExecStart = '' ${cfg.server.package}/bin/hledger-web \ - --port=${toString cfg.server.port} \ - --host=${cfg.server.host} \ - --capabilities=${concatStringsSep "," cfg.server.capabilities} \ - ${concatStringsSep " " cfg.server.flags} + --port=${toString cfg.server.port} \ + --host=${cfg.server.host} \ + --capabilities=${concatStringsSep "," cfg.server.capabilities} \ + ${concatStringsSep " " cfg.server.flags} ''; User = cfg.server.user.name; PrivateTemp = true; diff --git a/modules/minecraft.nix b/modules/minecraft.nix index 37c89e1..5bb5cca 100644 --- a/modules/minecraft.nix +++ b/modules/minecraft.nix @@ -1,8 +1,13 @@ -{ pkgs, lib, config, ... }: -with lib; -let cfg = config.niveum.minecraft; +{ + pkgs, + lib, + config, + ... +}: +with lib; let + cfg = config.niveum.minecraft; in { - options.niveum.minecraft = { enable = mkEnableOption "Minecraft"; }; + options.niveum.minecraft = {enable = mkEnableOption "Minecraft";}; - config = mkIf cfg.enable { environment.systemPackages = [ pkgs.minecraft ]; }; + config = mkIf cfg.enable {environment.systemPackages = [pkgs.minecraft];}; } diff --git a/modules/moodle-dl.nix b/modules/moodle-dl.nix index 9b7a4d1..2ce4522 100644 --- a/modules/moodle-dl.nix +++ b/modules/moodle-dl.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.services.moodle-dl; json = pkgs.formats.json {}; moodle-dl-json = json.generate "moodle-dl.json" cfg.settings; @@ -52,7 +56,6 @@ in { }; config = mkIf cfg.enable { - users.users.moodle-dl = { isSystemUser = true; home = cfg.directory; @@ -63,7 +66,7 @@ in { systemd.services.moodle-dl = { description = "A Moodle downloader that downloads course content"; - wants = [ "network-online.target" ]; + wants = ["network-online.target"]; serviceConfig = mkMerge [ { Type = "oneshot"; @@ -73,11 +76,11 @@ in { ExecStart = "${cfg.package}/bin/moodle-dl ${lib.optionalString cfg.notifyOnly "--without-downloading-files"}"; ExecStartPre = "${pkgs.coreutils}/bin/ln -sfn ${toString moodle-dl-json} ${cfg.directory}/config.json"; } - (mkIf (cfg.directory == stateDirectoryDefault) { StateDirectory = "moodle-dl"; }) + (mkIf (cfg.directory == stateDirectoryDefault) {StateDirectory = "moodle-dl";}) ]; inherit (cfg) startAt; }; }; - meta.maintainers = [ maintainers.kmein ]; + meta.maintainers = [maintainers.kmein]; } diff --git a/modules/networkmanager-declarative.nix b/modules/networkmanager-declarative.nix index 415954b..cae5689 100644 --- a/modules/networkmanager-declarative.nix +++ b/modules/networkmanager-declarative.nix @@ -1,50 +1,69 @@ # https://github.com/jmackie/nixos-networkmanager-profiles/ -{ lib, config, ... }: -with lib; -let +{ + lib, + config, + ... +}: +with lib; let nm = config.networking.networkmanager; mkProfile = profileAttrs: - if !(isAttrs profileAttrs) then - throw "error 1" + if !(isAttrs profileAttrs) + then throw "error 1" else { enable = true; mode = "0400"; # readonly (user) - text = (foldlAttrs (accum: - { name, value }: '' + text = + (foldlAttrs (accum: { + name, + value, + }: '' ${accum} [${name}] ${mkProfileEntry value}'') - "# Generated by nixos-networkmanager-profiles" profileAttrs) + "\n"; + "# Generated by nixos-networkmanager-profiles" + profileAttrs) + + "\n"; }; mkProfileEntry = entryAttrs: - if !(isAttrs entryAttrs) then - throw "error 2" + if !(isAttrs entryAttrs) + then throw "error 2" else - foldlAttrs (accum: - { name, value }: '' - ${accum} - ${name}=${toString value}'') "" entryAttrs; + foldlAttrs (accum: { + name, + value, + }: '' + ${accum} + ${name}=${toString value}'') "" + entryAttrs; foldlAttrs = op: nul: attrs: - foldl (accum: { fst, snd }: op accum (nameValuePair fst snd)) nul + foldl (accum: { + fst, + snd, + }: + op accum (nameValuePair fst snd)) + nul (lists.zipLists (attrNames attrs) (attrValues attrs)); attrLength = attrs: length (attrValues attrs); - in { options.networking.networkmanager.profiles = mkOption { type = types.attrs; - default = { }; + default = {}; }; config = mkIf (attrLength nm.profiles > 0) { - environment.etc = (foldlAttrs (accum: - { name, value }: - accum // { + environment.etc = foldlAttrs (accum: { + name, + value, + }: + accum + // { "NetworkManager/system-connections/${name}.nmconnection" = mkProfile value; - }) { } nm.profiles); + }) {} + nm.profiles; }; } diff --git a/modules/retiolum.nix b/modules/retiolum.nix index de5a1f4..6d541ab 100644 --- a/modules/retiolum.nix +++ b/modules/retiolum.nix @@ -1,6 +1,10 @@ -{ config, pkgs, lib, ... }: -with lib; -let +{ + config, + pkgs, + lib, + ... +}: +with lib; let netname = "retiolum"; cfg = config.networking.retiolum; in { @@ -27,12 +31,11 @@ in { }; config = { - services.tinc.networks.${netname} = { name = cfg.nodename; hosts = builtins.mapAttrs - (name: _: builtins.readFile "${}/${name}") - (builtins.readDir ); + (name: _: builtins.readFile "${}/${name}") + (builtins.readDir ); rsaPrivateKeyFile = toString ; ed25519PrivateKeyFile = toString ; extraConfig = '' @@ -43,11 +46,11 @@ in { networking.extraHosts = builtins.readFile (toString ); - environment.systemPackages = [ config.services.tinc.networks.${netname}.package ]; + environment.systemPackages = [config.services.tinc.networks.${netname}.package]; networking.firewall = { - allowedTCPPorts = [ 655 ]; - allowedUDPPorts = [ 655 ]; + allowedTCPPorts = [655]; + allowedUDPPorts = [655]; }; #services.netdata.portcheck.checks.tinc.port = 655; diff --git a/modules/spotifyd.nix b/modules/spotifyd.nix index cfffc8c..aa92365 100644 --- a/modules/spotifyd.nix +++ b/modules/spotifyd.nix @@ -1,13 +1,17 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.services.spotifyd; toml = pkgs.formats.toml {}; - spotifydConf = if cfg.settings != {} then toml.generate "spotify.conf" cfg.settings else pkgs.writeText "spotifyd.conf" cfg.config; -in -{ + spotifydConf = + if cfg.settings != {} + then toml.generate "spotify.conf" cfg.settings + else pkgs.writeText "spotifyd.conf" cfg.config; +in { options = { services.spotifyd = { enable = mkEnableOption "spotifyd, a Spotify playing daemon"; @@ -41,8 +45,8 @@ in ]; systemd.services.spotifyd = { - wantedBy = [ "multi-user.target" ]; - after = [ "network-online.target" "sound.target" ]; + wantedBy = ["multi-user.target"]; + after = ["network-online.target" "sound.target"]; description = "spotifyd, a Spotify playing daemon"; environment.SHELL = "/bin/sh"; serviceConfig = { @@ -56,5 +60,5 @@ in }; }; - meta.maintainers = [ maintainers.anderslundstedt ]; + meta.maintainers = [maintainers.anderslundstedt]; } diff --git a/modules/system-dependent.nix b/modules/system-dependent.nix index 929d889..632baba 100644 --- a/modules/system-dependent.nix +++ b/modules/system-dependent.nix @@ -1,10 +1,14 @@ -{ config, lib, pkgs, ... }: -with lib; { + config, + lib, + pkgs, + ... +}: +with lib; { options.niveum = { - wirelessInterface = mkOption { type = types.str; }; + wirelessInterface = mkOption {type = types.str;}; - batteryName = mkOption { type = types.str; }; + batteryName = mkOption {type = types.str;}; promptColours = let colours16 = types.enum [ diff --git a/modules/telegram-bot.nix b/modules/telegram-bot.nix index 4c4e41c..38d89a3 100644 --- a/modules/telegram-bot.nix +++ b/modules/telegram-bot.nix @@ -1,6 +1,10 @@ -{ lib, config, pkgs, ... }: -with lib; -let +{ + lib, + config, + pkgs, + ... +}: +with lib; let cfg = config.niveum.telegramBots; botService = name: bot: @@ -8,37 +12,38 @@ let enable = bot.enable; startAt = bot.time; serviceConfig.Type = "oneshot"; - wants = [ "network-online.target" ]; - script = strings.concatStringsSep "\n" ([ "QUOTE=$(${bot.command})" "if [ -n \"$QUOTE\" ]; then" ] - ++ map (chatId: '' - ${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \ - -d chat_id="${chatId}" \ - -d text="$QUOTE" ${ - lib.strings.optionalString (bot.parseMode != null) - "-d parse_mode=${bot.parseMode}" - } - '') bot.chatIds - ++ [ "fi" ]); + wants = ["network-online.target"]; + script = strings.concatStringsSep "\n" (["QUOTE=$(${bot.command})" "if [ -n \"$QUOTE\" ]; then"] + ++ map (chatId: '' + ${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \ + -d chat_id="${chatId}" \ + -d text="$QUOTE" ${ + lib.strings.optionalString (bot.parseMode != null) + "-d parse_mode=${bot.parseMode}" + } + '') + bot.chatIds + ++ ["fi"]); }; in { options.niveum.telegramBots = mkOption { type = types.attrsOf (types.submodule { options = { enable = mkEnableOption "Telegram bot"; - time = mkOption { type = types.str; }; - token = mkOption { type = types.strMatching "[0-9A-Za-z:-]+"; }; + time = mkOption {type = types.str;}; + token = mkOption {type = types.strMatching "[0-9A-Za-z:-]+";}; chatIds = mkOption { type = types.listOf (types.strMatching "-?[0-9]+|@[A-Za-z0-9]+"); }; - command = mkOption { type = types.str; }; + command = mkOption {type = types.str;}; parseMode = mkOption { - type = types.nullOr (types.enum [ "HTML" "Markdown" ]); + type = types.nullOr (types.enum ["HTML" "Markdown"]); default = null; }; }; }); - default = { }; + default = {}; }; - config = { systemd.services = attrsets.mapAttrs' botService cfg; }; + config = {systemd.services = attrsets.mapAttrs' botService cfg;}; } diff --git a/modules/traadfri.nix b/modules/traadfri.nix index d46dd33..715ed32 100644 --- a/modules/traadfri.nix +++ b/modules/traadfri.nix @@ -1,39 +1,49 @@ -{ pkgs, lib, config, ... }: -with lib; -let +{ + pkgs, + lib, + config, + ... +}: +with lib; let cfg = config.niveum.traadfri; traadfri = pkgs.callPackage { - libcoap = pkgs.callPackage { tls = true; }; + libcoap = pkgs.callPackage {tls = true;}; }; in { options.niveum.traadfri = { enable = mkEnableOption "Trådfri CLI"; - user = mkOption { type = types.str; }; - host = mkOption { type = types.str; }; - key = mkOption { type = types.str; }; + user = mkOption {type = types.str;}; + host = mkOption {type = types.str;}; + key = mkOption {type = types.str;}; rooms = mkOption { type = types.attrsOf types.int; - default = { }; + default = {}; }; bulbs = mkOption { type = types.attrsOf types.int; - default = { }; + default = {}; }; }; config = mkIf cfg.enable { - environment.systemPackages = [ - (pkgs.writers.writeDashBin "traadfri" '' - TRAADFRI_USER="${cfg.user}" \ - TRAADFRI_KEY="${cfg.key}" \ - TRAADFRI_HUB="${cfg.host}" \ - ${traadfri}/bin/traadfri $@ - '') - ] ++ lib.mapAttrsToList (name: value: pkgs.writers.writeDashBin "traadfri-${name}" '' - exec traadfri --target Room ${toString value} "$@" - '') cfg.rooms - ++ lib.mapAttrsToList (name: value: pkgs.writers.writeDashBin "traadfri-${name}" '' - exec traadfri --target Bulb ${toString value} "$@" - '') cfg.bulbs; + environment.systemPackages = + [ + (pkgs.writers.writeDashBin "traadfri" '' + TRAADFRI_USER="${cfg.user}" \ + TRAADFRI_KEY="${cfg.key}" \ + TRAADFRI_HUB="${cfg.host}" \ + ${traadfri}/bin/traadfri $@ + '') + ] + ++ lib.mapAttrsToList (name: value: + pkgs.writers.writeDashBin "traadfri-${name}" '' + exec traadfri --target Room ${toString value} "$@" + '') + cfg.rooms + ++ lib.mapAttrsToList (name: value: + pkgs.writers.writeDashBin "traadfri-${name}" '' + exec traadfri --target Bulb ${toString value} "$@" + '') + cfg.bulbs; }; } diff --git a/modules/tuna.nix b/modules/tuna.nix index b9fa3ec..2c05a46 100644 --- a/modules/tuna.nix +++ b/modules/tuna.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let tuna = pkgs.callPackage {}; cfg = config.services.tuna; in { @@ -77,8 +81,8 @@ in { users.groups.tuna = {}; # ref https://github.com/florianheinemann/MPD.FM/blob/9d037cf87597b26ae2f10ba9feea48946ad6cc68/service/MPD.FM.service systemd.services.tuna = { - wantedBy = [ "multi-user.target" ]; - after = [ "mpd.service" ]; + wantedBy = ["multi-user.target"]; + after = ["mpd.service"]; script = "${cfg.package}/bin/tuna"; environment = { NODE_ENV = "production"; diff --git a/overlays/overlays.nix b/overlays/overlays.nix index ac6acf2..728b0e0 100644 --- a/overlays/overlays.nix +++ b/overlays/overlays.nix @@ -1,6 +1,6 @@ self: super: -with super.lib; -let - eval = import ; - paths = (eval {modules = [(import )];}).config.nixpkgs.overlays; -in foldl' (flip extends) (_: super) paths self + with super.lib; let + eval = import ; + paths = (eval {modules = [(import )];}).config.nixpkgs.overlays; + in + foldl' (flip extends) (_: super) paths self diff --git a/packages/daybook.nix b/packages/daybook.nix index 2204d60..93038fd 100644 --- a/packages/daybook.nix +++ b/packages/daybook.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, makeWrapper, pandoc, fetchFromGitHub }: +{ + lib, + stdenv, + makeWrapper, + pandoc, + fetchFromGitHub, +}: stdenv.mkDerivation { name = "daybook"; src = fetchFromGitHub { @@ -7,8 +13,8 @@ stdenv.mkDerivation { rev = "db2c34830e09183c80f3381bf5e4c44d52f05d53"; sha256 = "0nbsv8f12qh5spq7zhimhdf3p7msk33xrb0ilqvlc6jmlkpislmv"; }; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ pandoc ]; + nativeBuildInputs = [makeWrapper]; + buildInputs = [pandoc]; buildPhase = '' mkdir -p $out/man/man1 pandoc --standalone --to man daybook.1.md -o $out/man/man1/daybook.1 diff --git a/packages/depp.nix b/packages/depp.nix index 00130e4..542a8bf 100644 --- a/packages/depp.nix +++ b/packages/depp.nix @@ -1,5 +1,7 @@ -{ lib, writeShellScriptBin }: -let +{ + lib, + writeShellScriptBin, +}: let aliasFlag = name: value: "-c alias.${name}=${lib.escapeShellArg value}"; aliases = { eroeffne = "init"; @@ -20,10 +22,11 @@ let tagebuch = "log"; zustand = "status"; }; -in writeShellScriptBin "depp" '' - if [ $# -gt 0 ]; then - git ${lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases)} "$@" - else - printf "${lib.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: n + " " + v) aliases)}\n" - fi -'' +in + writeShellScriptBin "depp" '' + if [ $# -gt 0 ]; then + git ${lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases)} "$@" + else + printf "${lib.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: n + " " + v) aliases)}\n" + fi + '' diff --git a/packages/devanagari/default.nix b/packages/devanagari/default.nix index a476d81..4beec45 100644 --- a/packages/devanagari/default.nix +++ b/packages/devanagari/default.nix @@ -1,4 +1,4 @@ -{ yarn2nix-moretea }: +{yarn2nix-moretea}: yarn2nix-moretea.mkYarnPackage { name = "devanagari"; src = ./.; diff --git a/packages/devanagari/yarn.nix b/packages/devanagari/yarn.nix index 5ce0596..5a4c868 100644 --- a/packages/devanagari/yarn.nix +++ b/packages/devanagari/yarn.nix @@ -1,11 +1,17 @@ -{ fetchurl, fetchgit, linkFarm, runCommandNoCC, gnutar }: rec { +{ + fetchurl, + fetchgit, + linkFarm, + runCommandNoCC, + gnutar, +}: rec { offline_cache = linkFarm "offline" packages; packages = [ { name = "_sanskrit_coders_sanscript___sanscript_1.1.5.tgz"; path = fetchurl { name = "_sanskrit_coders_sanscript___sanscript_1.1.5.tgz"; - url = "https://registry.yarnpkg.com/@sanskrit-coders/sanscript/-/sanscript-1.1.5.tgz"; + url = "https://registry.yarnpkg.com/@sanskrit-coders/sanscript/-/sanscript-1.1.5.tgz"; sha1 = "a22222cf7a5d55f7b19e210242c59f6f819fd643"; }; } diff --git a/packages/devour.nix b/packages/devour.nix index c894a1f..456fa53 100644 --- a/packages/devour.nix +++ b/packages/devour.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, xdo, makeWrapper, fetchFromGitHub }: +{ + lib, + stdenv, + xdo, + makeWrapper, + fetchFromGitHub, +}: stdenv.mkDerivation { name = "devour"; version = "master"; @@ -10,10 +16,10 @@ stdenv.mkDerivation { sha256 = "0f2jb8knx7lqy6wmf3rchgq2n2dj496lm8vgcs58rppzrmsk59d5"; }; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ xdo ]; + nativeBuildInputs = [makeWrapper]; + buildInputs = [xdo]; - DESTDIR="$(out)"; + DESTDIR = "$(out)"; fixupPhase = '' wrapProgram $out/bin/devour --prefix PATH ":" ${xdo}/bin ; diff --git a/packages/gfs-fonts.nix b/packages/gfs-fonts.nix index 440316a..91292d7 100644 --- a/packages/gfs-fonts.nix +++ b/packages/gfs-fonts.nix @@ -1,5 +1,8 @@ -{ fetchzip, symlinkJoin, lib }: -let +{ + fetchzip, + symlinkJoin, + lib, +}: let gfs-font = name: sha256: fetchzip { inherit name sha256; @@ -10,30 +13,31 @@ let unzip -j -o $downloadedFile "**/*.otf" -d $out/share/fonts/opentype ''; }; -in symlinkJoin { - name = "gfs-fonts"; - paths = lib.mapAttrsToList gfs-font { - GFS_Artemisia = "1q39086pr2jhv118fjfv6l1li6japv4pdjnhh1scqw06mqrmydf4"; - GFS_Baskerville = "07gx5b9b43zv74d2lay37sajd4ba2wqn3b7xzvyhn265ds9x7cxk"; - GFS_Bodoni = "0jhl0728ikzha1krm01sk52nz3jzibidwmyvgidg61d87l8nbf2p"; - GFS_Bodoni_Classic = "06jw2irskn75s50mgwkx08rzwqi82gpc6lgjsimsi8p81566gfrh"; - GFS_Complutum = "1q7dxs2z3yrgchd2pz9h72mjrk62kdc2mmqw8kg9q76k28f8n3p0"; # -> GFSPolyglot.otf - GFS_Decker = "016v1j5n9ph4i2cpmlk26pcxhp3q2fjwlaryppd5akl84dfkpncl"; - GFS_Didot = "0ysvrp527wm0wxfp6wmlgmxfx7ysr5mwpmjmqp1h605cy44jblfm"; - GFS_Didot_Classic = "0n5awqksvday3l3d85yhwmbmfj9bcpxivy4wpd4zrkgl7b85af2c"; - GFS_Didot_Display = "0n2di2zyc76w6f8mc6hfilc2ir6igks7ldjp9fkw1gjp06330fi7"; - GFS_Elpis = "02l7wd3nbn1kpv7ghxh19k4dbvd49ijyxd6gq83gcr9vlmxcq2s2"; - GFS_Gazis = "0x9iwj6pinaykrds0iw6552hf256d0dr41sipdb1jnnlr2d3bf9w"; - GFS_Goschen = "1jvbn33wzq2yj0aygwy9pd2msg3wkmdp0npjzazadrmfjpnpkcy9"; - GFS_NeoHellenic = "1ixm2frdc6i5lbn9h0h4gdsvsw2k4hny75q8ig4kgs28ac3dbzq3"; - GFS_Olga = "1qaxaw3ngnbr1gb1xyk5f2z647zklg6sl3bqwi28l47j9mp0f8aj"; - GFS_Orpheus = "18n6fag4pyr8jdwnsz0vixf47jz4ym8mjmppc1w3k7v27cg1z9dz"; - GFS_Orpheus_Classic = "1rqy1kf7slw56zfhbv264yzarjisnqbqydj4f7hghiknhnmdakps"; - GFS_Orpheus_Sans = "02rh7z8c3h3xyfi52rn47z4finizx636d05bg5g23v0l0mqs6nkg"; - GFS_Philostratos = "0zh3d0cn6b2fjbwnvmg379z20zh7w626w2bnj19xcazjvqkwhzx1"; - GFS_Porson = "0c2axagkm6wxv8na2q11k6c5dmgkwx5hn9sh9qy82gbips9blnda"; - GFS_Pyrsos = "0y0dv7y3n01bbhhnczflx1zcc7by56cffmr2xqixj2rd1nvchx0j"; - GFS_Solomos = "1mpx9mw566awvfjdfx5sbz3wz5gbnjjw56gz30mk1lw06vxf0dxz"; - GFS_Theokritos = "0haasx819x8c8yvna6pqywgi4060av2570jm34cddnz1fgnhv1b8"; - }; -} +in + symlinkJoin { + name = "gfs-fonts"; + paths = lib.mapAttrsToList gfs-font { + GFS_Artemisia = "1q39086pr2jhv118fjfv6l1li6japv4pdjnhh1scqw06mqrmydf4"; + GFS_Baskerville = "07gx5b9b43zv74d2lay37sajd4ba2wqn3b7xzvyhn265ds9x7cxk"; + GFS_Bodoni = "0jhl0728ikzha1krm01sk52nz3jzibidwmyvgidg61d87l8nbf2p"; + GFS_Bodoni_Classic = "06jw2irskn75s50mgwkx08rzwqi82gpc6lgjsimsi8p81566gfrh"; + GFS_Complutum = "1q7dxs2z3yrgchd2pz9h72mjrk62kdc2mmqw8kg9q76k28f8n3p0"; # -> GFSPolyglot.otf + GFS_Decker = "016v1j5n9ph4i2cpmlk26pcxhp3q2fjwlaryppd5akl84dfkpncl"; + GFS_Didot = "0ysvrp527wm0wxfp6wmlgmxfx7ysr5mwpmjmqp1h605cy44jblfm"; + GFS_Didot_Classic = "0n5awqksvday3l3d85yhwmbmfj9bcpxivy4wpd4zrkgl7b85af2c"; + GFS_Didot_Display = "0n2di2zyc76w6f8mc6hfilc2ir6igks7ldjp9fkw1gjp06330fi7"; + GFS_Elpis = "02l7wd3nbn1kpv7ghxh19k4dbvd49ijyxd6gq83gcr9vlmxcq2s2"; + GFS_Gazis = "0x9iwj6pinaykrds0iw6552hf256d0dr41sipdb1jnnlr2d3bf9w"; + GFS_Goschen = "1jvbn33wzq2yj0aygwy9pd2msg3wkmdp0npjzazadrmfjpnpkcy9"; + GFS_NeoHellenic = "1ixm2frdc6i5lbn9h0h4gdsvsw2k4hny75q8ig4kgs28ac3dbzq3"; + GFS_Olga = "1qaxaw3ngnbr1gb1xyk5f2z647zklg6sl3bqwi28l47j9mp0f8aj"; + GFS_Orpheus = "18n6fag4pyr8jdwnsz0vixf47jz4ym8mjmppc1w3k7v27cg1z9dz"; + GFS_Orpheus_Classic = "1rqy1kf7slw56zfhbv264yzarjisnqbqydj4f7hghiknhnmdakps"; + GFS_Orpheus_Sans = "02rh7z8c3h3xyfi52rn47z4finizx636d05bg5g23v0l0mqs6nkg"; + GFS_Philostratos = "0zh3d0cn6b2fjbwnvmg379z20zh7w626w2bnj19xcazjvqkwhzx1"; + GFS_Porson = "0c2axagkm6wxv8na2q11k6c5dmgkwx5hn9sh9qy82gbips9blnda"; + GFS_Pyrsos = "0y0dv7y3n01bbhhnczflx1zcc7by56cffmr2xqixj2rd1nvchx0j"; + GFS_Solomos = "1mpx9mw566awvfjdfx5sbz3wz5gbnjjw56gz30mk1lw06vxf0dxz"; + GFS_Theokritos = "0haasx819x8c8yvna6pqywgi4060av2570jm34cddnz1fgnhv1b8"; + }; + } diff --git a/packages/gourmet.nix b/packages/gourmet.nix index 00ef254..17d946a 100644 --- a/packages/gourmet.nix +++ b/packages/gourmet.nix @@ -1,15 +1,14 @@ # { stdenv, python }: -{ pkgs ? import { } }: +{pkgs ? import {}}: with pkgs; with pkgs.python2Packages; - -buildPythonApplication rec { - pname = "gourmet"; - version = "0.17.4"; - src = builtins.fetchTarball { - url = "https://github.com/thinkle/gourmet/archive/${version}.tar.gz"; - }; - buildInputs = [ distutils_extra intltool ]; - propagatedBuildInputs = [ sqlalchemy reportlab lxml ]; - meta = with stenv.lib; { maintainers = with maintainers; [ kmein ]; }; -} + buildPythonApplication rec { + pname = "gourmet"; + version = "0.17.4"; + src = builtins.fetchTarball { + url = "https://github.com/thinkle/gourmet/archive/${version}.tar.gz"; + }; + buildInputs = [distutils_extra intltool]; + propagatedBuildInputs = [sqlalchemy reportlab lxml]; + meta = with stenv.lib; {maintainers = with maintainers; [kmein];}; + } diff --git a/packages/iolanguage.nix b/packages/iolanguage.nix index e17f0fe..05dda36 100644 --- a/packages/iolanguage.nix +++ b/packages/iolanguage.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, cmake, python3, fetchFromGitHub }: +{ + lib, + stdenv, + cmake, + python3, + fetchFromGitHub, +}: stdenv.mkDerivation rec { version = "2017.09.06"; name = "iolanguage-${version}"; @@ -9,7 +15,7 @@ stdenv.mkDerivation rec { sha256 = "07rg1zrz6i6ghp11cm14w7bbaaa1s8sb0y5i7gr2sds0ijlpq223"; fetchSubmodules = true; }; - buildInputs = [ cmake python3 ]; + buildInputs = [cmake python3]; preBuild = "mkdir -p build && cd build"; buildPhase = '' cmake -DCMAKE_INSTALL_PREFIX=$out/ .. @@ -17,8 +23,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { homepage = "https://iolanguage.org/"; - description = - "Io programming language. Inspired by Self, Smalltalk and LISP."; + description = "Io programming language. Inspired by Self, Smalltalk and LISP."; license = licenses.bsd3; }; } diff --git a/packages/ix.nix b/packages/ix.nix index ca89559..04f4278 100644 --- a/packages/ix.nix +++ b/packages/ix.nix @@ -1,11 +1,14 @@ -{ stdenv, fetchurl }: +{ + stdenv, + fetchurl, +}: stdenv.mkDerivation { name = "ix"; src = fetchurl { url = "https://ix.io/client"; sha256 = "0xc2s4s1aq143zz8lgkq5k25dpf049dw253qxiav5k7d7qvzzy57"; }; - phases = [ "installPhase" ]; + phases = ["installPhase"]; installPhase = '' mkdir -p $out/bin install $src $out/bin/ix diff --git a/packages/libcoap.nix b/packages/libcoap.nix index d8823ca..5157628 100644 --- a/packages/libcoap.nix +++ b/packages/libcoap.nix @@ -1,6 +1,18 @@ -{ lib, pkg-config, fetchFromGitHub, automake, autoconf, which, libtool, stdenv, gnutls -, doxygen, asciidoc -, tls ? false, docs ? true }: +{ + lib, + pkg-config, + fetchFromGitHub, + automake, + autoconf, + which, + libtool, + stdenv, + gnutls, + doxygen, + asciidoc, + tls ? false, + docs ? true, +}: stdenv.mkDerivation { name = "libcoap"; version = "unstable-2021-05-28"; @@ -11,8 +23,9 @@ stdenv.mkDerivation { sha256 = "1igjv0hbwmakdccp5in4gw9w2p5swxdwsdx0glyna2s29sh1d37x"; fetchSubmodules = true; }; - buildInputs = [ which pkg-config automake autoconf libtool ] - ++ lib.optionals docs [ doxygen asciidoc ] + buildInputs = + [which pkg-config automake autoconf libtool] + ++ lib.optionals docs [doxygen asciidoc] ++ lib.optional tls gnutls; # preConfigure = "./autogen.sh"; # configureFlags = lib.optional (!docs) "--disable-documentation" ++ lib.optional tls "--enable-dtls"; @@ -27,6 +40,6 @@ stdenv.mkDerivation { description = "A CoAP (RFC 7252) implementation in C"; platforms = platforms.linux; license = licenses.bsd2; - maintainers = [ maintainers.kmein ]; + maintainers = [maintainers.kmein]; }; } diff --git a/packages/mahlzeit.nix b/packages/mahlzeit.nix index 2739fc5..27a42f1 100644 --- a/packages/mahlzeit.nix +++ b/packages/mahlzeit.nix @@ -1,6 +1,22 @@ -{ lib, fetchFromGitHub, mkDerivation, ansi-terminal, base, directory, doctest, filepath -, megaparsec, optparse-applicative, prettyprinter, process -, raw-strings-qq, stdenv, tasty, tasty-hunit, text, yaml +{ + lib, + fetchFromGitHub, + mkDerivation, + ansi-terminal, + base, + directory, + doctest, + filepath, + megaparsec, + optparse-applicative, + prettyprinter, + process, + raw-strings-qq, + stdenv, + tasty, + tasty-hunit, + text, + yaml, }: mkDerivation { pname = "mahlzeit"; @@ -14,15 +30,32 @@ mkDerivation { isLibrary = true; isExecutable = true; libraryHaskellDepends = [ - ansi-terminal base directory filepath megaparsec prettyprinter text + ansi-terminal + base + directory + filepath + megaparsec + prettyprinter + text yaml ]; executableHaskellDepends = [ - ansi-terminal base directory filepath optparse-applicative process - text yaml + ansi-terminal + base + directory + filepath + optparse-applicative + process + text + yaml ]; testHaskellDepends = [ - base doctest megaparsec raw-strings-qq tasty tasty-hunit + base + doctest + megaparsec + raw-strings-qq + tasty + tasty-hunit ]; homepage = "https://github.com/kmein/mahlzeit"; description = "Recipe toolkit"; diff --git a/packages/man/pandoc.nix b/packages/man/pandoc.nix index f820bce..3a4cecd 100644 --- a/packages/man/pandoc.nix +++ b/packages/man/pandoc.nix @@ -1,4 +1,9 @@ -{ stdenv, pandoc, lib, fetchgit }: +{ + stdenv, + pandoc, + lib, + fetchgit, +}: stdenv.mkDerivation { name = "pandoc-doc"; version = pandoc.version; diff --git a/packages/opustags.nix b/packages/opustags.nix index a1fdbe2..47d06d1 100644 --- a/packages/opustags.nix +++ b/packages/opustags.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, cmake, pkgconfig, libogg, fetchFromGitHub }: +{ + lib, + stdenv, + cmake, + pkgconfig, + libogg, + fetchFromGitHub, +}: stdenv.mkDerivation rec { name = "opustags"; version = "1.3.0"; @@ -14,9 +21,9 @@ stdenv.mkDerivation rec { "-DCMAKE_INSTALL_PREFIX=$out" ]; - buildInputs = [ libogg ]; + buildInputs = [libogg]; - nativeBuildInputs = [ cmake pkgconfig ]; + nativeBuildInputs = [cmake pkgconfig]; meta = with lib; { homepage = "https://github.com/fmang/opustags"; diff --git a/packages/python3Packages/betacode/default.nix b/packages/python3Packages/betacode/default.nix index c65ab56..9d6cb0c 100644 --- a/packages/python3Packages/betacode/default.nix +++ b/packages/python3Packages/betacode/default.nix @@ -1,4 +1,9 @@ -{ fetchPypi, buildPythonPackage, pygtrie, ... }: +{ + fetchPypi, + buildPythonPackage, + pygtrie, + ... +}: buildPythonPackage rec { pname = "betacode"; version = "0.2"; @@ -7,6 +12,6 @@ buildPythonPackage rec { sha256 = "08fnjzjvnm9m6p4ddyr8qgfb9bs2nipv4ls50784v0xazgxx7siv"; }; preBuild = ''echo > README.rst''; - propagatedBuildInputs = [ pygtrie ]; + propagatedBuildInputs = [pygtrie]; doCheck = false; } diff --git a/packages/python3Packages/indic-transliteration/default.nix b/packages/python3Packages/indic-transliteration/default.nix index 45593cf..88f9b92 100644 --- a/packages/python3Packages/indic-transliteration/default.nix +++ b/packages/python3Packages/indic-transliteration/default.nix @@ -1,4 +1,11 @@ -{ fetchFromGitHub, buildPythonPackage, backports_functools_lru_cache, selenium, regex, ... }: +{ + fetchFromGitHub, + buildPythonPackage, + backports_functools_lru_cache, + selenium, + regex, + ... +}: buildPythonPackage rec { pname = "indic_transliteration"; version = "unstable-2020-12-15"; @@ -8,7 +15,7 @@ buildPythonPackage rec { rev = "2ea25a03af15937916b6768835e056166986c567"; sha256 = "1pcf800hl0zkcffc47mkjq9mizsxdi0hwxlnij5bvbqdshd3w9ll"; }; - patches = [ ./regex-version.patch ]; - propagatedBuildInputs = [ backports_functools_lru_cache selenium regex ]; + patches = [./regex-version.patch]; + propagatedBuildInputs = [backports_functools_lru_cache selenium regex]; doCheck = false; } diff --git a/packages/python3Packages/instaloader/default.nix b/packages/python3Packages/instaloader/default.nix index 3390c9c..6608916 100644 --- a/packages/python3Packages/instaloader/default.nix +++ b/packages/python3Packages/instaloader/default.nix @@ -1,12 +1,16 @@ -{ buildPythonApplication, fetchPypi, requests }: -let -in buildPythonApplication rec { - pname = "instaloader"; - version = "4.2.4"; - src = fetchPypi { - inherit pname version; - sha256 = "02zqb02idk2pzks7dv42vigcmmpjpfhfdyjp911yr0ix7dy3q0b9"; - }; - propagatedBuildInputs = [ requests ]; - doCheck = false; -} +{ + buildPythonApplication, + fetchPypi, + requests, +}: let +in + buildPythonApplication rec { + pname = "instaloader"; + version = "4.2.4"; + src = fetchPypi { + inherit pname version; + sha256 = "02zqb02idk2pzks7dv42vigcmmpjpfhfdyjp911yr0ix7dy3q0b9"; + }; + propagatedBuildInputs = [requests]; + doCheck = false; + } diff --git a/packages/python3Packages/pygtrie/default.nix b/packages/python3Packages/pygtrie/default.nix index 0465337..07f54ab 100644 --- a/packages/python3Packages/pygtrie/default.nix +++ b/packages/python3Packages/pygtrie/default.nix @@ -1,4 +1,8 @@ -{ fetchPypi, buildPythonPackage, ... }: +{ + fetchPypi, + buildPythonPackage, + ... +}: buildPythonPackage rec { pname = "pygtrie"; version = "2.3"; diff --git a/packages/python3Packages/spotify-cli-linux/default.nix b/packages/python3Packages/spotify-cli-linux/default.nix index 593dd08..2d98612 100644 --- a/packages/python3Packages/spotify-cli-linux/default.nix +++ b/packages/python3Packages/spotify-cli-linux/default.nix @@ -1,5 +1,13 @@ -{ buildPythonPackage, buildPythonApplication, fetchPypi, pytestrunner, six, beautifulsoup4, requests, dbus-python }: -let +{ + buildPythonPackage, + buildPythonApplication, + fetchPypi, + pytestrunner, + six, + beautifulsoup4, + requests, + dbus-python, +}: let lyricwikia = buildPythonPackage rec { pname = "lyricwikia"; version = "0.1.9"; @@ -7,17 +15,18 @@ let inherit pname version; sha256 = "0sa5wkbgp5bpgkl8hgn7byyz9zj0786647ikf2l0k8m4fimq623y"; }; - buildInputs = [ pytestrunner ]; - propagatedBuildInputs = [ six beautifulsoup4 requests ]; + buildInputs = [pytestrunner]; + propagatedBuildInputs = [six beautifulsoup4 requests]; doCheck = false; }; -in buildPythonApplication rec { - pname = "spotify-cli-linux"; - version = "1.4.2"; - src = fetchPypi { - inherit pname version; - sha256 = "1gxich3v2i4lmh60abbw3mw15399afvvqflv8g6plvvbmvxmbgp0"; - }; - propagatedBuildInputs = [ lyricwikia dbus-python ]; - doCheck = false; -} +in + buildPythonApplication rec { + pname = "spotify-cli-linux"; + version = "1.4.2"; + src = fetchPypi { + inherit pname version; + sha256 = "1gxich3v2i4lmh60abbw3mw15399afvvqflv8g6plvvbmvxmbgp0"; + }; + propagatedBuildInputs = [lyricwikia dbus-python]; + doCheck = false; + } diff --git a/packages/scripts/auc.nix b/packages/scripts/auc.nix index 7595153..5bb3039 100644 --- a/packages/scripts/auc.nix +++ b/packages/scripts/auc.nix @@ -1,31 +1,35 @@ -{ stdenv, fetchFromGitHub, lib, pandoc }: -let +{ + stdenv, + fetchFromGitHub, + lib, + pandoc, +}: let owner = "kamalist"; in -stdenv.mkDerivation rec { - pname = "auc"; - version = "2019-04-02"; + stdenv.mkDerivation rec { + pname = "auc"; + version = "2019-04-02"; - src = fetchFromGitHub { - inherit owner; - repo = "AUC"; - rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3"; - sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la"; - }; + src = fetchFromGitHub { + inherit owner; + repo = "AUC"; + rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3"; + sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la"; + }; - installPhase = '' - mkdir -p $out/{bin,man/man1} - install auc $out/bin - ${pandoc}/bin/pandoc -V title=${lib.escapeShellArg pname} -V section=1 $src/README.md -s -t man -o $out/man/man1/auc.1 - ''; - - meta = with lib; { - description = "Command-line Roman calendar"; - longDescription = '' - AUC (Ab Urbe condita) is a command-line Roman calendar tool. Currently it shows the specified date in the format of the Ancient Romans. + installPhase = '' + mkdir -p $out/{bin,man/man1} + install auc $out/bin + ${pandoc}/bin/pandoc -V title=${lib.escapeShellArg pname} -V section=1 $src/README.md -s -t man -o $out/man/man1/auc.1 ''; - license = licenses.mit; - maintainers = [ maintainers.kmein ]; - platforms = platforms.all; - }; -} + + meta = with lib; { + description = "Command-line Roman calendar"; + longDescription = '' + AUC (Ab Urbe condita) is a command-line Roman calendar tool. Currently it shows the specified date in the format of the Ancient Romans. + ''; + license = licenses.mit; + maintainers = [maintainers.kmein]; + platforms = platforms.all; + }; + } diff --git a/packages/scripts/bvg.nix b/packages/scripts/bvg.nix index cacca31..1404a74 100644 --- a/packages/scripts/bvg.nix +++ b/packages/scripts/bvg.nix @@ -1,5 +1,9 @@ -{ ruby, stdenv, bundlerEnv, fetchFromGitHub }: -let +{ + ruby, + stdenv, + bundlerEnv, + fetchFromGitHub, +}: let src = fetchFromGitHub { owner = "kmein"; repo = "bvg"; @@ -13,12 +17,13 @@ let lockfile = "${src.out}/Gemfile.lock"; gemset = "${src.out}/gemset.nix"; }; -in stdenv.mkDerivation { - name = "bvg"; - buildInputs = [ env.wrappedRuby ]; - script = "${src.out}/bvg.rb"; - buildCommand = '' - install -D -m755 $script $out/bin/bvg - patchShebangs $out/bin/bvg - ''; -} +in + stdenv.mkDerivation { + name = "bvg"; + buildInputs = [env.wrappedRuby]; + script = "${src.out}/bvg.rb"; + buildCommand = '' + install -D -m755 $script $out/bin/bvg + patchShebangs $out/bin/bvg + ''; + } diff --git a/packages/scripts/daybook.nix b/packages/scripts/daybook.nix index d020001..0b58fa3 100644 --- a/packages/scripts/daybook.nix +++ b/packages/scripts/daybook.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, makeWrapper, pandoc, fetchFromGitHub }: +{ + lib, + stdenv, + makeWrapper, + pandoc, + fetchFromGitHub, +}: stdenv.mkDerivation { name = "daybook"; src = fetchFromGitHub { @@ -7,8 +13,8 @@ stdenv.mkDerivation { rev = "cad1aef158b0df36861434eb04c953d99a122e80"; sha256 = "07qippyry0yjf971pnqxm9i0xpvih8mvbhxwfwpwq980jik1hbl1"; }; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ pandoc ]; + nativeBuildInputs = [makeWrapper]; + buildInputs = [pandoc]; buildPhase = '' mkdir -p $out/man/man1 pandoc --standalone --to man daybook.1.md -o $out/man/man1/daybook.1 diff --git a/packages/scripts/default.nix b/packages/scripts/default.nix index 3f7f3fc..c4d2e6e 100644 --- a/packages/scripts/default.nix +++ b/packages/scripts/default.nix @@ -1,12 +1,19 @@ -{ pkgs, lib, ... }: -let - kpaste = pkgs.callPackage { }; - opustags = pkgs.callPackage { }; - betacode = pkgs.callPackage { }; - wrapScript = { packages ? [ ], name, script }: +{ + pkgs, + lib, + ... +}: let + kpaste = pkgs.callPackage {}; + opustags = pkgs.callPackage {}; + betacode = pkgs.callPackage {}; + wrapScript = { + packages ? [], + name, + script, + }: pkgs.writers.writeDashBin name '' PATH=$PATH:${ - lib.makeBinPath (packages ++ [ pkgs.coreutils pkgs.findutils ]) + lib.makeBinPath (packages ++ [pkgs.coreutils pkgs.findutils]) } ${script} "$@" ''; @@ -16,424 +23,437 @@ let rev = "0582b495937117d899ce8ef715a89c6cc25a36cf"; sha256 = "0c4hkny4zkknlimc9yi9ljss2cws4zn8lzd8ip9b8mfsm094dlfl"; }; -in rec { - auc = pkgs.callPackage ./auc.nix {}; +in + rec { + auc = pkgs.callPackage ./auc.nix {}; - instaget = wrapScript { - packages = [ pkgs.jq pkgs.curl pkgs.gnugrep ]; - script = ./instaget.sh; - name = "instaget"; - }; + instaget = wrapScript { + packages = [pkgs.jq pkgs.curl pkgs.gnugrep]; + script = ./instaget.sh; + name = "instaget"; + }; - infschmv = pkgs.writers.writeDashBin "InfSchMV" '' - ${pkgs.curl}/bin/curl -sSL https://www.berlin.de/corona/massnahmen/verordnung/ \ - | ${pkgs.pup}/bin/pup .textile \ - | ${pkgs.pandoc}/bin/pandoc -f html -t man -s \ - | ${pkgs.man}/bin/man -l - - ''; + infschmv = pkgs.writers.writeDashBin "InfSchMV" '' + ${pkgs.curl}/bin/curl -sSL https://www.berlin.de/corona/massnahmen/verordnung/ \ + | ${pkgs.pup}/bin/pup .textile \ + | ${pkgs.pandoc}/bin/pandoc -f html -t man -s \ + | ${pkgs.man}/bin/man -l - + ''; - trans = - let + trans = let script = pkgs.fetchurl { url = "https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/trans.awk"; sha256 = "178r8d27bry1mzd1g8x2svp4w469hwv7nnxnmnsinx974skjx0jb"; }; - in pkgs.writers.writeDashBin "trans" '' - ${pkgs.gawk}/bin/gawk -f ${script} -- "$@" + in + pkgs.writers.writeDashBin "trans" '' + ${pkgs.gawk}/bin/gawk -f ${script} -- "$@" + ''; + + dns-sledgehammer = pkgs.writers.writeDashBin "dns-sledgehammer" '' + ${pkgs.coreutils}/bin/printf '%s\n' 'nameserver 1.1.1.1' 'options edns0' > /etc/resolv.conf ''; - dns-sledgehammer = pkgs.writers.writeDashBin "dns-sledgehammer" '' - ${pkgs.coreutils}/bin/printf '%s\n' 'nameserver 1.1.1.1' 'options edns0' > /etc/resolv.conf - ''; + much-scripts = let + much-current-query = wrapScript { + packages = [pkgs.curl]; + name = "much-current-query"; + script = ./much-current-query.sh; + }; + mail-send = wrapScript { + packages = [pkgs.notmuch pkgs.msmtp pkgs.jq]; + name = "mail-send"; + script = ./mail-send.sh; + }; + mail-reply = wrapScript { + packages = [much-current-query pkgs.notmuch pkgs.gnused pkgs.jq]; + name = "mail-reply"; + script = ./mail-reply.sh; + }; + mail-kill = wrapScript { + name = "mail-kill"; + script = ./mail-kill.sh; + packages = [pkgs.notmuch]; + }; + in + pkgs.symlinkJoin { + name = "much-scripts"; + paths = [mail-send much-current-query mail-reply mail-kill]; + }; - much-scripts = let - much-current-query = wrapScript { - packages = [ pkgs.curl ]; - name = "much-current-query"; - script = ./much-current-query.sh; + showkeys-toggle = pkgs.writers.writeDashBin "showkeys-toggle" '' + if ${pkgs.procps}/bin/pgrep screenkey; then + exec ${pkgs.procps}/bin/pkill screenkey + else + exec ${pkgs.screenkey}/bin/screenkey + fi + ''; + + qrpaste = pkgs.writers.writeDashBin "qrpaste" '' + file="$(${pkgs.mktemp}/bin/mktemp --tmpdir)" + trap clean EXIT + clean() { + rm "$file" + } + ${pkgs.qrencode}/bin/qrencode "$(${pkgs.xclip}/bin/xclip -selection clipboard -out)" -o "$file" + ${pkgs.sxiv}/bin/sxiv "$file" + ''; + + ttspaste = pkgs.writers.writeDashBin "ttspaste" '' + ${pkgs.xclip}/bin/xclip -selection clipboard -out | ${pkgs.curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${pkgs.mpv}/bin/mpv - + ''; + + interdimensional-cable = let + nimaid-github-io = pkgs.fetchFromGitHub { + owner = "nimaid"; + repo = "nimaid.github.io"; + rev = "9cb4ede215be6bb01bd2df1ef3e9689cc8c4eb9e"; + sha256 = "1g47cj5an7xgmhpc09m7qim5j9rspqxvnzfy90cnlvz4pg8hil96"; + }; + in + pkgs.writeShellScriptBin "interdimensional-cable" '' + export PATH=${lib.makeBinPath [pkgs.mpv pkgs.jq pkgs.gnused]} + mpv --shuffle --playlist=<(jq -r '.videos[]' ${nimaid-github-io}/tv/interdimensional_database.json | sed 's#^#https://youtu.be/#') + ''; + + tag = wrapScript { + packages = [pkgs.vorbisTools pkgs.python3Packages.eyeD3 opustags]; + script = "${voidrice}/.local/bin/tag"; + name = "tag"; }; - mail-send = wrapScript { - packages = [ pkgs.notmuch pkgs.msmtp pkgs.jq ]; - name = "mail-send"; - script = ./mail-send.sh; + + meteo = wrapScript { + packages = [pkgs.jq pkgs.curl pkgs.xdotool pkgs.sxiv pkgs.gnused]; + script = ./meteo.sh; + name = "meteo"; }; - mail-reply = wrapScript { - packages = [ much-current-query pkgs.notmuch pkgs.gnused pkgs.jq ]; - name = "mail-reply"; - script = ./mail-reply.sh; + + kirciuoklis = wrapScript { + packages = [pkgs.curl pkgs.jq]; + script = ./kirciuoklis.sh; + name = "kirciuoklis"; }; - mail-kill = wrapScript { - name = "mail-kill"; - script = ./mail-kill.sh; - packages = [ pkgs.notmuch ]; + + booksplit = wrapScript { + packages = [pkgs.ffmpeg tag pkgs.glibc.bin]; + script = "${voidrice}/.local/bin/booksplit"; + name = "booksplit"; }; - in pkgs.symlinkJoin { - name = "much-scripts"; - paths = [ mail-send much-current-query mail-reply mail-kill ]; - }; - showkeys-toggle = pkgs.writers.writeDashBin "showkeys-toggle" '' - if ${pkgs.procps}/bin/pgrep screenkey; then - exec ${pkgs.procps}/bin/pkill screenkey - else - exec ${pkgs.screenkey}/bin/screenkey - fi - ''; - - qrpaste = pkgs.writers.writeDashBin "qrpaste" '' - file="$(${pkgs.mktemp}/bin/mktemp --tmpdir)" - trap clean EXIT - clean() { - rm "$file" - } - ${pkgs.qrencode}/bin/qrencode "$(${pkgs.xclip}/bin/xclip -selection clipboard -out)" -o "$file" - ${pkgs.sxiv}/bin/sxiv "$file" - ''; - - ttspaste = pkgs.writers.writeDashBin "ttspaste" '' - ${pkgs.xclip}/bin/xclip -selection clipboard -out | ${pkgs.curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${pkgs.mpv}/bin/mpv - - ''; - - interdimensional-cable = - let nimaid-github-io = pkgs.fetchFromGitHub { - owner = "nimaid"; - repo = "nimaid.github.io"; - rev = "9cb4ede215be6bb01bd2df1ef3e9689cc8c4eb9e"; - sha256 = "1g47cj5an7xgmhpc09m7qim5j9rspqxvnzfy90cnlvz4pg8hil96"; - }; - in pkgs.writeShellScriptBin "interdimensional-cable" '' - export PATH=${lib.makeBinPath [ pkgs.mpv pkgs.jq pkgs.gnused ]} - mpv --shuffle --playlist=<(jq -r '.videos[]' ${nimaid-github-io}/tv/interdimensional_database.json | sed 's#^#https://youtu.be/#') - ''; - - tag = wrapScript { - packages = [ pkgs.vorbisTools pkgs.python3Packages.eyeD3 opustags ]; - script = "${voidrice}/.local/bin/tag"; - name = "tag"; - }; - - meteo = wrapScript { - packages = [ pkgs.jq pkgs.curl pkgs.xdotool pkgs.sxiv pkgs.gnused ]; - script = ./meteo.sh; - name = "meteo"; - }; - - kirciuoklis = wrapScript { - packages = [ pkgs.curl pkgs.jq ]; - script = ./kirciuoklis.sh; - name = "kirciuoklis"; - }; - - booksplit = wrapScript { - packages = [ pkgs.ffmpeg tag pkgs.glibc.bin ]; - script = "${voidrice}/.local/bin/booksplit"; - name = "booksplit"; - }; - - n = wrapScript { - script = ./n.sh; - name = "n"; - }; - - dirmir = wrapScript { - name = "dirmir"; - script = ./dirmir.sh; - }; - - liddel-scott-jones = wrapScript { - name = "lsj"; - script = ./liddel-scott-jones.sh; - packages = [ pkgs.curl pkgs.pup betacode pkgs.gnused pkgs.pandoc pkgs.man ]; - }; - - sanskrit-dictionary = pkgs.writers.writeDashBin "sa" '' - set -efu - - usage() { - echo "usage: [OUTPUT=deva|roman] $0 mw|mwe|boet|bopp|apte|boro TERM" - exit 1 - } - - [ $# -eq 2 ] || usage - - case $1 in - mw) id=MWScan;; - mwe) id=MWEScan;; - bopp) id=BOPScan;; - boet) id=PWGScan;; - apte) id=AEScan;; - boro) id=BORScan;; - *) usage;; - esac - - shift - - input="$*" - - ${pkgs.curl}/bin/curl -sSL "https://www.sanskrit-lexicon.uni-koeln.de/scans/$id/2020/web/webtc/getword.php?key=$input&filter=''${OUTPUT-roman}&accent=yes&transLit=hk" \ - | ${pkgs.pandoc}/bin/pandoc --standalone --variable=title:"$input" --from=html --to=man \ - | ${pkgs.gnused}/bin/sed 's/\s\+\([:.,;]\)/\1/g;s/\s\+/ /g' \ - | ${pkgs.man}/bin/man --local-file --pager="${pkgs.bat}/bin/bat -p" - - ''; - - playlist = import ./pls.nix { inherit pkgs; }; - - mpv-tv = import ./mpv-tv.nix { inherit pkgs lib; }; - - favicon = wrapScript { - packages = [ pkgs.imagemagick ]; - name = "favicon"; - script = ./favicon.sh; - }; - - closest = pkgs.writers.writeDashBin "closest" '' - ${pkgs.writers.writeHaskellBin "closest" { - libraries = with pkgs.haskellPackages; [ parallel optparse-applicative edit-distance ]; - ghcArgs = ["-O3" "-threaded" ]; - } (builtins.readFile ./distance.hs)}/bin/closest +RTS -N4 -RTS --dictionary ${pkgs.fetchurl { - url = "https://gist.github.com/MarvinJWendt/2f4f4154b8ae218600eb091a5706b5f4/raw/36b70dd6be330aa61cd4d4cdfda6234dcb0b8784/wordlist-german.txt"; - sha256 = "0vr4lmlckgvj4s8sk502sknq9pf3297rvasj5sqqm05zzbdgpppj"; - }} "$@" - ''; - - horoscope = pkgs.callPackage ./horoscope {}; - - genius = wrapScript { - packages = [ pkgs.curl pkgs.gnused pkgs.pandoc ]; - name = "genius"; - script = ./genius.sh; - }; - - literature-quote = wrapScript { - packages = [ pkgs.xsv pkgs.curl pkgs.gnused ]; - name = "literature-quote"; - script = ./literature-quote.sh; - }; - - man-pdf = wrapScript { - packages = [ pkgs.man pkgs.ghostscript ]; - name = "man-pdf"; - script = ./man-pdf.sh; - }; - - odyssey = wrapScript { - packages = [ pkgs.curl pkgs.xmlstarlet ]; - name = "odyssey"; - script = ./odyssey.sh; - }; - - tolino-screensaver = wrapScript { - packages = [ pkgs.imagemagick ]; - name = "tolino-screensaver"; - script = ./tolino-screensaver.sh; - }; - - wttr = wrapScript { - packages = [ pkgs.curl ]; - name = "wttr"; - script = ./wttr.sh; - }; - - vg = wrapScript { - packages = [ pkgs.ripgrep pkgs.fzf pkgs.gawk ]; - name = "vg"; - script = ./vg.sh; - }; - - dmenurandr = wrapScript { - packages = [ pkgs.dmenu pkgs.gnugrep pkgs.gnused pkgs.xorg.xrandr pkgs.gawk pkgs.libnotify pkgs.arandr ]; - name = "dmenurandr"; - script = ./dmenurandr.sh; - }; - - dmenubluetooth = wrapScript { - packages = [ pkgs.bluez5 pkgs.dmenu pkgs.libnotify ]; - name = "dmenubluetooth"; - script = ./dmenubluetooth.sh; - }; - - fkill = wrapScript { - packages = [ pkgs.procps pkgs.gawk pkgs.gnused pkgs.fzf pkgs.bash ]; - script = ./fkill.sh; - name = "fkill"; - }; - - nix-git = wrapScript { - packages = [ pkgs.nix-prefetch-git pkgs.jq ]; - script = ./nix-git.sh; - name = "nix-git"; - }; - - linkhandler = wrapScript { - packages = - [ pkgs.utillinux pkgs.mpv pkgs.curl pkgs.gnused pkgs.sxiv pkgs.ts ]; - script = "${voidrice}/.local/bin/linkhandler"; - name = "linkhandler"; - }; - - mansplain = wrapScript { - packages = [ pkgs.man pkgs.zathura pkgs.dmenu pkgs.gnused ]; - script = ./mansplain.sh; - name = "mansplain"; - }; - - notetags = wrapScript { - script = ./notetags.sh; - name = "notetags"; - }; - - fzfmenu = wrapScript { - script = ./fzfmenu.sh; - name = "fzfmenu"; - packages = [ pkgs.st pkgs.fzf pkgs.dash pkgs.bash ]; - }; - - swallow = wrapScript { - script = ./swallow.sh; - name = "swallow"; - packages = [ pkgs.xdo ]; - }; - - ipa = pkgs.writers.writeHaskellBin "ipa" { - libraries = with pkgs; [ haskellPackages.text haskellPackages.ipa ]; - } '' - import Data.Maybe (fromJust) - import Language.IPA - import qualified Data.Text as T - import qualified Data.Text.IO as T - main = T.interact (T.unwords . map (unIPA . fromJust . (xSampaToIpa =<<) . mkXSampa) . T.words) - ''; - - default-gateway = pkgs.writers.writeDashBin "default-gateway" '' - ${pkgs.iproute}/bin/ip -json route | ${pkgs.jq}/bin/jq --raw-output '.[0].gateway' - ''; - - betacode = pkgs.writers.writeHaskellBin "betacode" { - libraries = with pkgs; [ - (haskell.lib.unmarkBroken (haskell.lib.doJailbreak haskellPackages.betacode)) - haskellPackages.text - ]; - } '' - import qualified Data.Text.IO as T - import qualified Data.Text as T - import Text.BetaCode - main = T.interact (either (error . T.unpack) id . fromBeta) - ''; - - devanagari = pkgs.callPackage ../devanagari {}; - - timer = pkgs.writers.writeDashBin "timer" '' - [ $# -eq 2 ] || { - echo "Usage: $0 TIME MESSAGE" 1>&2 - exit 1 - } - time=$(echo "$1" | ${pkgs.bc}/bin/bc) - echo "sleeping $time seconds, then saying: $2" - ${pkgs.coreutils}/bin/sleep "$time" && { - echo "$2" | ${pkgs.espeak}/bin/espeak -v german-mbrola-6 - } - ''; - - manual-sort = pkgs.writers.writeHaskellBin "manual-sort" {} '' - {-# LANGUAGE LambdaCase #-} - import Data.Char (toLower) - import System.Environment (getArgs) - import System.IO (BufferMode(NoBuffering), hSetBuffering, stdout) - - insertionSortM :: Monad f => (a -> a -> f Ordering) -> [a] -> f [a] - insertionSortM cmp = foldr ((=<<) . insertByM cmp) (pure []) - where - insertByM cmp x = \case - [] -> pure [x] - yys@(y : ys) -> cmp x y >>= \case - GT -> (y :) <$> insertByM cmp x ys - _ -> pure (x : yys) - - ask :: Show a => a -> a -> IO Ordering - ask a b = do - putStr (show a ++ " > " ++ show b ++ "? (y/n) ") - map toLower <$> getLine >>= \case - 'y' : _ -> return GT - _ -> return LT - - main :: IO () - main = do - hSetBuffering stdout NoBuffering - argv <- getArgs - sorted <- insertionSortM ask argv - mapM_ (\(place, thing) -> putStrLn (show place ++ ". " ++ show thing)) $ zip [1 ..] (reverse sorted) - ''; - - scrot-dmenu = wrapScript { - script = ./scrot-dmenu.sh; - name = "dmenu-scrot"; - packages = [ pkgs.xclip pkgs.scrot kpaste pkgs.libnotify pkgs.dmenu ]; - }; - - unicodmenu = pkgs.callPackage ./unicodmenu.nix { }; - - mpv-radio = - let - streams = import { - di-fm-key = lib.strings.fileContents ; + n = wrapScript { + script = ./n.sh; + name = "n"; }; - streams-tsv = pkgs.writeText "streams.tsv" (lib.concatMapStringsSep "\n" ({ desc ? "", stream, station, ... }: "${station}\t${desc}\t${stream}") streams); - in pkgs.writers.writeDashBin "mpv-radio" '' - exec ${pkgs.mpv}/bin/mpv --force-window=yes "$(${pkgs.dmenu}/bin/dmenu -i -l 5 < ${streams-tsv} | ${pkgs.coreutils}/bin/cut -f3)" - ''; - rfc = wrapScript { - script = ./rfc.sh; - name = "rfc"; - packages = [ pkgs.curl pkgs.pup pkgs.gnused pkgs.gawk pkgs.gnugrep pkgs.fzf ]; - }; + dirmir = wrapScript { + name = "dirmir"; + script = ./dirmir.sh; + }; - new-mac = wrapScript { - script = ./new-mac.sh; - name = "new-mac"; - packages = [ pkgs.gnused pkgs.openssl pkgs.jq pkgs.iproute2 ]; - }; + liddel-scott-jones = wrapScript { + name = "lsj"; + script = ./liddel-scott-jones.sh; + packages = [pkgs.curl pkgs.pup betacode pkgs.gnused pkgs.pandoc pkgs.man]; + }; - bvg = pkgs.callPackage ./bvg.nix { }; - nav = pkgs.callPackage ./nav.nix { }; - k-lock = pkgs.callPackage ./k-lock.nix { }; + sanskrit-dictionary = pkgs.writers.writeDashBin "sa" '' + set -efu - menu-calc = pkgs.writers.writeDashBin "=" '' - # https://github.com/onespaceman/menu-calc + usage() { + echo "usage: [OUTPUT=deva|roman] $0 mw|mwe|boet|bopp|apte|boro TERM" + exit 1 + } - answer=$(echo "$@" | ${pkgs.pari}/bin/gp -q | ${pkgs.gnused}/bin/sed '/\./ s/\.\{0,1\}0\{1,\}$//') + [ $# -eq 2 ] || usage - action=$(printf "copy\nclear" | ${pkgs.dmenu}/bin/dmenu -p "= $answer") + case $1 in + mw) id=MWScan;; + mwe) id=MWEScan;; + bopp) id=BOPScan;; + boet) id=PWGScan;; + apte) id=AEScan;; + boro) id=BORScan;; + *) usage;; + esac - case $action in - "clear") $0 ;; - "copy") printf %s "$answer" | ${pkgs.xclip}/bin/xclip -selection clipboard;; - "") ;; - *) $0 "$answer $action" ;; - esac - ''; + shift - # ref https://tex.stackexchange.com/a/502542 - scanned = pkgs.writers.writeDashBin "scanned" '' - [ $# -eq 1 -a -f "$1" -a -r "$1" ] || exit 1 + input="$*" - ${pkgs.imagemagick}/bin/convert -density 150 "$1" -colorspace gray -linear-stretch 3.5%x10% -blur 0x0.5 -attenuate 0.25 +noise Gaussian "scanned-$1" - ''; + ${pkgs.curl}/bin/curl -sSL "https://www.sanskrit-lexicon.uni-koeln.de/scans/$id/2020/web/webtc/getword.php?key=$input&filter=''${OUTPUT-roman}&accent=yes&transLit=hk" \ + | ${pkgs.pandoc}/bin/pandoc --standalone --variable=title:"$input" --from=html --to=man \ + | ${pkgs.gnused}/bin/sed 's/\s\+\([:.,;]\)/\1/g;s/\s\+/ /g' \ + | ${pkgs.man}/bin/man --local-file --pager="${pkgs.bat}/bin/bat -p" - + ''; - nix-index-update = pkgs.writers.writeDashBin "nix-index-update" '' - filename="index-x86_64-$(uname | tr A-Z a-z)" - mkdir -p ~/.cache/nix-index - cd ~/.cache/nix-index - # -N will only download a new version if there is an update. - ${pkgs.wget}/bin/wget -q -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename - ln -f $filename files - ''; -} // { - devour = pkgs.callPackage { }; - depp = pkgs.callPackage { }; - text2pdf = pkgs.callPackage { }; - vimv = pkgs.callPackage { }; - when = pkgs.callPackage { }; - mahlzeit = pkgs.haskellPackages.callPackage { }; - inherit opustags; -} + playlist = import ./pls.nix {inherit pkgs;}; + + mpv-tv = import ./mpv-tv.nix {inherit pkgs lib;}; + + favicon = wrapScript { + packages = [pkgs.imagemagick]; + name = "favicon"; + script = ./favicon.sh; + }; + + closest = pkgs.writers.writeDashBin "closest" '' + ${ + pkgs.writers.writeHaskellBin "closest" { + libraries = with pkgs.haskellPackages; [parallel optparse-applicative edit-distance]; + ghcArgs = ["-O3" "-threaded"]; + } (builtins.readFile ./distance.hs) + }/bin/closest +RTS -N4 -RTS --dictionary ${ + pkgs.fetchurl { + url = "https://gist.github.com/MarvinJWendt/2f4f4154b8ae218600eb091a5706b5f4/raw/36b70dd6be330aa61cd4d4cdfda6234dcb0b8784/wordlist-german.txt"; + sha256 = "0vr4lmlckgvj4s8sk502sknq9pf3297rvasj5sqqm05zzbdgpppj"; + } + } "$@" + ''; + + horoscope = pkgs.callPackage ./horoscope {}; + + genius = wrapScript { + packages = [pkgs.curl pkgs.gnused pkgs.pandoc]; + name = "genius"; + script = ./genius.sh; + }; + + literature-quote = wrapScript { + packages = [pkgs.xsv pkgs.curl pkgs.gnused]; + name = "literature-quote"; + script = ./literature-quote.sh; + }; + + man-pdf = wrapScript { + packages = [pkgs.man pkgs.ghostscript]; + name = "man-pdf"; + script = ./man-pdf.sh; + }; + + odyssey = wrapScript { + packages = [pkgs.curl pkgs.xmlstarlet]; + name = "odyssey"; + script = ./odyssey.sh; + }; + + tolino-screensaver = wrapScript { + packages = [pkgs.imagemagick]; + name = "tolino-screensaver"; + script = ./tolino-screensaver.sh; + }; + + wttr = wrapScript { + packages = [pkgs.curl]; + name = "wttr"; + script = ./wttr.sh; + }; + + vg = wrapScript { + packages = [pkgs.ripgrep pkgs.fzf pkgs.gawk]; + name = "vg"; + script = ./vg.sh; + }; + + dmenurandr = wrapScript { + packages = [pkgs.dmenu pkgs.gnugrep pkgs.gnused pkgs.xorg.xrandr pkgs.gawk pkgs.libnotify pkgs.arandr]; + name = "dmenurandr"; + script = ./dmenurandr.sh; + }; + + dmenubluetooth = wrapScript { + packages = [pkgs.bluez5 pkgs.dmenu pkgs.libnotify]; + name = "dmenubluetooth"; + script = ./dmenubluetooth.sh; + }; + + fkill = wrapScript { + packages = [pkgs.procps pkgs.gawk pkgs.gnused pkgs.fzf pkgs.bash]; + script = ./fkill.sh; + name = "fkill"; + }; + + nix-git = wrapScript { + packages = [pkgs.nix-prefetch-git pkgs.jq]; + script = ./nix-git.sh; + name = "nix-git"; + }; + + linkhandler = wrapScript { + packages = [pkgs.utillinux pkgs.mpv pkgs.curl pkgs.gnused pkgs.sxiv pkgs.ts]; + script = "${voidrice}/.local/bin/linkhandler"; + name = "linkhandler"; + }; + + mansplain = wrapScript { + packages = [pkgs.man pkgs.zathura pkgs.dmenu pkgs.gnused]; + script = ./mansplain.sh; + name = "mansplain"; + }; + + notetags = wrapScript { + script = ./notetags.sh; + name = "notetags"; + }; + + fzfmenu = wrapScript { + script = ./fzfmenu.sh; + name = "fzfmenu"; + packages = [pkgs.st pkgs.fzf pkgs.dash pkgs.bash]; + }; + + swallow = wrapScript { + script = ./swallow.sh; + name = "swallow"; + packages = [pkgs.xdo]; + }; + + ipa = pkgs.writers.writeHaskellBin "ipa" { + libraries = with pkgs; [haskellPackages.text haskellPackages.ipa]; + } '' + import Data.Maybe (fromJust) + import Language.IPA + import qualified Data.Text as T + import qualified Data.Text.IO as T + main = T.interact (T.unwords . map (unIPA . fromJust . (xSampaToIpa =<<) . mkXSampa) . T.words) + ''; + + default-gateway = pkgs.writers.writeDashBin "default-gateway" '' + ${pkgs.iproute}/bin/ip -json route | ${pkgs.jq}/bin/jq --raw-output '.[0].gateway' + ''; + + betacode = pkgs.writers.writeHaskellBin "betacode" { + libraries = with pkgs; [ + (haskell.lib.unmarkBroken (haskell.lib.doJailbreak haskellPackages.betacode)) + haskellPackages.text + ]; + } '' + import qualified Data.Text.IO as T + import qualified Data.Text as T + import Text.BetaCode + main = T.interact (either (error . T.unpack) id . fromBeta) + ''; + + devanagari = pkgs.callPackage ../devanagari {}; + + timer = pkgs.writers.writeDashBin "timer" '' + [ $# -eq 2 ] || { + echo "Usage: $0 TIME MESSAGE" 1>&2 + exit 1 + } + time=$(echo "$1" | ${pkgs.bc}/bin/bc) + echo "sleeping $time seconds, then saying: $2" + ${pkgs.coreutils}/bin/sleep "$time" && { + echo "$2" | ${pkgs.espeak}/bin/espeak -v german-mbrola-6 + } + ''; + + manual-sort = pkgs.writers.writeHaskellBin "manual-sort" {} '' + {-# LANGUAGE LambdaCase #-} + import Data.Char (toLower) + import System.Environment (getArgs) + import System.IO (BufferMode(NoBuffering), hSetBuffering, stdout) + + insertionSortM :: Monad f => (a -> a -> f Ordering) -> [a] -> f [a] + insertionSortM cmp = foldr ((=<<) . insertByM cmp) (pure []) + where + insertByM cmp x = \case + [] -> pure [x] + yys@(y : ys) -> cmp x y >>= \case + GT -> (y :) <$> insertByM cmp x ys + _ -> pure (x : yys) + + ask :: Show a => a -> a -> IO Ordering + ask a b = do + putStr (show a ++ " > " ++ show b ++ "? (y/n) ") + map toLower <$> getLine >>= \case + 'y' : _ -> return GT + _ -> return LT + + main :: IO () + main = do + hSetBuffering stdout NoBuffering + argv <- getArgs + sorted <- insertionSortM ask argv + mapM_ (\(place, thing) -> putStrLn (show place ++ ". " ++ show thing)) $ zip [1 ..] (reverse sorted) + ''; + + scrot-dmenu = wrapScript { + script = ./scrot-dmenu.sh; + name = "dmenu-scrot"; + packages = [pkgs.xclip pkgs.scrot kpaste pkgs.libnotify pkgs.dmenu]; + }; + + unicodmenu = pkgs.callPackage ./unicodmenu.nix {}; + + mpv-radio = let + streams = import { + di-fm-key = lib.strings.fileContents ; + }; + streams-tsv = pkgs.writeText "streams.tsv" (lib.concatMapStringsSep "\n" ({ + desc ? "", + stream, + station, + ... + }: "${station}\t${desc}\t${stream}") + streams); + in + pkgs.writers.writeDashBin "mpv-radio" '' + exec ${pkgs.mpv}/bin/mpv --force-window=yes "$(${pkgs.dmenu}/bin/dmenu -i -l 5 < ${streams-tsv} | ${pkgs.coreutils}/bin/cut -f3)" + ''; + + rfc = wrapScript { + script = ./rfc.sh; + name = "rfc"; + packages = [pkgs.curl pkgs.pup pkgs.gnused pkgs.gawk pkgs.gnugrep pkgs.fzf]; + }; + + new-mac = wrapScript { + script = ./new-mac.sh; + name = "new-mac"; + packages = [pkgs.gnused pkgs.openssl pkgs.jq pkgs.iproute2]; + }; + + bvg = pkgs.callPackage ./bvg.nix {}; + nav = pkgs.callPackage ./nav.nix {}; + k-lock = pkgs.callPackage ./k-lock.nix {}; + + menu-calc = pkgs.writers.writeDashBin "=" '' + # https://github.com/onespaceman/menu-calc + + answer=$(echo "$@" | ${pkgs.pari}/bin/gp -q | ${pkgs.gnused}/bin/sed '/\./ s/\.\{0,1\}0\{1,\}$//') + + action=$(printf "copy\nclear" | ${pkgs.dmenu}/bin/dmenu -p "= $answer") + + case $action in + "clear") $0 ;; + "copy") printf %s "$answer" | ${pkgs.xclip}/bin/xclip -selection clipboard;; + "") ;; + *) $0 "$answer $action" ;; + esac + ''; + + # ref https://tex.stackexchange.com/a/502542 + scanned = pkgs.writers.writeDashBin "scanned" '' + [ $# -eq 1 -a -f "$1" -a -r "$1" ] || exit 1 + + ${pkgs.imagemagick}/bin/convert -density 150 "$1" -colorspace gray -linear-stretch 3.5%x10% -blur 0x0.5 -attenuate 0.25 +noise Gaussian "scanned-$1" + ''; + + nix-index-update = pkgs.writers.writeDashBin "nix-index-update" '' + filename="index-x86_64-$(uname | tr A-Z a-z)" + mkdir -p ~/.cache/nix-index + cd ~/.cache/nix-index + # -N will only download a new version if there is an update. + ${pkgs.wget}/bin/wget -q -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename + ln -f $filename files + ''; + } + // { + devour = pkgs.callPackage {}; + depp = pkgs.callPackage {}; + text2pdf = pkgs.callPackage {}; + vimv = pkgs.callPackage {}; + when = pkgs.callPackage {}; + mahlzeit = pkgs.haskellPackages.callPackage {}; + inherit opustags; + } diff --git a/packages/scripts/depp.nix b/packages/scripts/depp.nix index ec5feaa..8c830c4 100644 --- a/packages/scripts/depp.nix +++ b/packages/scripts/depp.nix @@ -1,5 +1,7 @@ -{ lib, writeShellScriptBin }: -let +{ + lib, + writeShellScriptBin, +}: let aliasFlag = name: value: "-c alias.${name}=${lib.escapeShellArg value}"; aliases = { eroeffne = "init"; @@ -20,15 +22,16 @@ let tagebuch = "log"; zustand = "status"; }; -in writeShellScriptBin "depp" '' - if [ $# -gt 0 ]; then - git ${ +in + writeShellScriptBin "depp" '' + if [ $# -gt 0 ]; then + git ${ lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases) } "$@" - else - printf "${ + else + printf "${ lib.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: n + " " + v) aliases) }\n" - fi -'' + fi + '' diff --git a/packages/scripts/horoscope/default.nix b/packages/scripts/horoscope/default.nix index 7347396..8e8efc5 100644 --- a/packages/scripts/horoscope/default.nix +++ b/packages/scripts/horoscope/default.nix @@ -1,4 +1,4 @@ -{ poetry2nix }: +{poetry2nix}: poetry2nix.mkPoetryApplication { - projectDir = ./.; + projectDir = ./.; } diff --git a/packages/scripts/instaget.nix b/packages/scripts/instaget.nix index 5209728..16a40f9 100644 --- a/packages/scripts/instaget.nix +++ b/packages/scripts/instaget.nix @@ -1,4 +1,9 @@ -{ writeShellScriptBin, wget, curl, jq }: +{ + writeShellScriptBin, + wget, + curl, + jq, +}: writeShellScriptBin "instaget" '' for url in "$@"; do json="$(${curl}/bin/curl -s "$url" \ diff --git a/packages/scripts/k-lock.nix b/packages/scripts/k-lock.nix index 7149142..d8790d4 100644 --- a/packages/scripts/k-lock.nix +++ b/packages/scripts/k-lock.nix @@ -1,5 +1,8 @@ -{ writers, lib, xlockmore }: -let +{ + writers, + lib, + xlockmore, +}: let xlockModes = lib.concatStringsSep "\\n" [ # "braid" "galaxy" @@ -8,18 +11,19 @@ let "pyro2" "space" ]; -in writers.writeDashBin "k-lock" '' - MODE=$(printf "${xlockModes}" | shuf -n 1) +in + writers.writeDashBin "k-lock" '' + MODE=$(printf "${xlockModes}" | shuf -n 1) - ${xlockmore}/bin/xlock \ - -saturation 0.4 \ - -erasemode no_fade \ - +description \ - -showdate \ - -username " " \ - -password " " \ - -info " " \ - -validate "..." \ - -invalid "Computer says no." \ - -mode "$MODE" -'' + ${xlockmore}/bin/xlock \ + -saturation 0.4 \ + -erasemode no_fade \ + +description \ + -showdate \ + -username " " \ + -password " " \ + -info " " \ + -validate "..." \ + -invalid "Computer says no." \ + -mode "$MODE" + '' diff --git a/packages/scripts/klem.nix b/packages/scripts/klem.nix index f0bc615..af7ce5a 100644 --- a/packages/scripts/klem.nix +++ b/packages/scripts/klem.nix @@ -1,46 +1,52 @@ # klem < klemm < klemmbrett ~ clipboard -{ pkgs, lib, ... }@args: -let +{ + pkgs, + lib, + ... +} @ args: let cfg = eval.config; eval = lib.evalModules { - modules = [{ - _file = toString ./klem.nix; - imports = [ (args.config or { }) ]; - options = { - selection = lib.mkOption { - default = "clipboard"; - type = lib.types.enum [ "primary" "secondary" "clipboard" ]; - }; - dmenu = lib.mkOption { - default = "${pkgs.dmenu}/bin/dmenu -i -p klem"; - type = lib.types.path; - }; - scripts = lib.mkOption { - default = { - pastebin = "${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io"; - shorten = '' - ${pkgs.curl}/bin/curl -fSs -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://0x0.st - ''; - "replace p.r" = "${pkgs.gnused}/bin/sed 's/\\/krebsco.de/'"; + modules = [ + { + _file = toString ./klem.nix; + imports = [(args.config or {})]; + options = { + selection = lib.mkOption { + default = "clipboard"; + type = lib.types.enum ["primary" "secondary" "clipboard"]; + }; + dmenu = lib.mkOption { + default = "${pkgs.dmenu}/bin/dmenu -i -p klem"; + type = lib.types.path; + }; + scripts = lib.mkOption { + default = { + pastebin = "${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io"; + shorten = '' + ${pkgs.curl}/bin/curl -fSs -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://0x0.st + ''; + "replace p.r" = "${pkgs.gnused}/bin/sed 's/\\/krebsco.de/'"; + }; + type = lib.types.attrs; }; - type = lib.types.attrs; }; - }; - }]; + } + ]; }; scriptCase = option: script: '' '${option}') ${toString script} ;; ''; -in pkgs.writers.writeDashBin "klem" '' - ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \ - | case $(echo "${ +in + pkgs.writers.writeDashBin "klem" '' + ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \ + | case $(echo "${ lib.concatStringsSep "\n" (lib.attrNames cfg.scripts) }" | ${cfg.dmenu}) in - ${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)} - *) ${pkgs.coreutils}/bin/cat ;; - esac \ - | tr -d '\r\n' \ - | ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -in -'' + ${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)} + *) ${pkgs.coreutils}/bin/cat ;; + esac \ + | tr -d '\r\n' \ + | ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -in + '' diff --git a/packages/scripts/mpv-tv.nix b/packages/scripts/mpv-tv.nix index 786b8a9..9afd903 100644 --- a/packages/scripts/mpv-tv.nix +++ b/packages/scripts/mpv-tv.nix @@ -1,5 +1,7 @@ -{ pkgs, lib }: -let +{ + pkgs, + lib, +}: let streams-tsv = pkgs.fetchurl { url = "https://raw.githubusercontent.com/jnk22/kodinerds-iptv/master/iptv/kodi/kodi_tv.m3u"; sha256 = "1cw1gmb16vwh6qfw0z3wjjfgn0zg2qplnddqzva5b0xx2g2appla"; @@ -8,6 +10,7 @@ let mv $out.tmp $out ''; }; -in pkgs.writers.writeDashBin "mpv-tv" '' - exec ${pkgs.mpv}/bin/mpv --force-window=yes "$(${pkgs.dmenu}/bin/dmenu -i -l 5 < ${streams-tsv} | ${pkgs.coreutils}/bin/cut -f2)" -'' +in + pkgs.writers.writeDashBin "mpv-tv" '' + exec ${pkgs.mpv}/bin/mpv --force-window=yes "$(${pkgs.dmenu}/bin/dmenu -i -l 5 < ${streams-tsv} | ${pkgs.coreutils}/bin/cut -f2)" + '' diff --git a/packages/scripts/nav.nix b/packages/scripts/nav.nix index 4fd35e9..b8529a3 100644 --- a/packages/scripts/nav.nix +++ b/packages/scripts/nav.nix @@ -1,4 +1,9 @@ -{ lib, fetchFromGitHub, stdenv, fzf }: +{ + lib, + fetchFromGitHub, + stdenv, + fzf, +}: stdenv.mkDerivation rec { name = "nav"; version = "8da22b1"; @@ -12,9 +17,9 @@ stdenv.mkDerivation rec { mkdir -p $out/bin/ install nav $out/bin/ ''; - propagatedBuildInputs = [ fzf ]; + propagatedBuildInputs = [fzf]; meta = { - maintainer = [ lib.maintainers.kmein ]; + maintainer = [lib.maintainers.kmein]; description = "JSON data structure navigator"; homepage = "https://github.com/huntrar/nav"; }; diff --git a/packages/scripts/pls.nix b/packages/scripts/pls.nix index 1e7a613..afdfd8a 100755 --- a/packages/scripts/pls.nix +++ b/packages/scripts/pls.nix @@ -1,5 +1,4 @@ -{ pkgs }: -let +{pkgs}: let inherit (pkgs) lib; playlistAPI = "https://radio.lassul.us"; @@ -41,28 +40,28 @@ let "noooo" ]; in -pkgs.writers.writeDashBin "pls" '' - case "$1" in - good|like|cool|nice|noice|top|yup|yass|yes|+) - ${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/good" - echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.good)} | shuf -n1 | ${sendIRC} - ;; - skip|next|bad|sucks|no|nope|flop|-) - ${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/skip" - echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1 | ${sendIRC} - ;; - say|msg) - shift - echo "$@" | ${sendIRC} - ;; - recent) - ${pkgs.curl}/bin/curl -sS -XGET "${playlistAPI}/recent" | tac | head - ;; - *) - ${pkgs.curl}/bin/curl -sS -XGET "${playlistAPI}/current" \ - | ${pkgs.miller}/bin/mlr --ijson --oxtab cat \ - | ${pkgs.gnused}/bin/sed -n '/artist\|title\|youtube/p' - ;; - esac - wait -'' + pkgs.writers.writeDashBin "pls" '' + case "$1" in + good|like|cool|nice|noice|top|yup|yass|yes|+) + ${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/good" + echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.good)} | shuf -n1 | ${sendIRC} + ;; + skip|next|bad|sucks|no|nope|flop|-) + ${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/skip" + echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1 | ${sendIRC} + ;; + say|msg) + shift + echo "$@" | ${sendIRC} + ;; + recent) + ${pkgs.curl}/bin/curl -sS -XGET "${playlistAPI}/recent" | tac | head + ;; + *) + ${pkgs.curl}/bin/curl -sS -XGET "${playlistAPI}/current" \ + | ${pkgs.miller}/bin/mlr --ijson --oxtab cat \ + | ${pkgs.gnused}/bin/sed -n '/artist\|title\|youtube/p' + ;; + esac + wait + '' diff --git a/packages/scripts/unicodmenu.nix b/packages/scripts/unicodmenu.nix index 7cdfbbb..2334d53 100644 --- a/packages/scripts/unicodmenu.nix +++ b/packages/scripts/unicodmenu.nix @@ -1,24 +1,40 @@ -{ lib, runCommand, fetchurl, writeText, writers, coreutils, dmenu, gnused, libnotify, xclip, xdotool, gawk }: -let +{ + lib, + runCommand, + fetchurl, + writeText, + writers, + coreutils, + dmenu, + gnused, + libnotify, + xclip, + xdotool, + gawk, +}: let unicode-file = runCommand "unicode.txt" {} '' - ${writers.writePython3 "generate.py" { flakeIgnore = [ "E501" "E722" ]; } '' - import csv + ${ + writers.writePython3 "generate.py" {flakeIgnore = ["E501" "E722"];} '' + import csv - with open("${fetchurl { - url = "https://unicode.org/Public/UCD/latest/ucd/UnicodeData.txt"; - sha256 = "sha256-NgGOaGV/3LNIX2NmMP/oyFMuAcl3cD0oA/W4nWxf6vs="; - }}", "r") as unicode_data: - reader = csv.reader(unicode_data, delimiter=";") - next(reader) # skip first row containing \0 - for row in reader: - codepoint = row[0] - name = row[1] - alternate_name = row[10] - try: - print(chr(int(codepoint, 16)), codepoint, name, alternate_name, sep=" ") - except: - continue - ''} > $out + with open("${ + fetchurl { + url = "https://unicode.org/Public/UCD/latest/ucd/UnicodeData.txt"; + sha256 = "sha256-NgGOaGV/3LNIX2NmMP/oyFMuAcl3cD0oA/W4nWxf6vs="; + } + }", "r") as unicode_data: + reader = csv.reader(unicode_data, delimiter=";") + next(reader) # skip first row containing \0 + for row in reader: + codepoint = row[0] + name = row[1] + alternate_name = row[10] + try: + print(chr(int(codepoint, 16)), codepoint, name, alternate_name, sep=" ") + except: + continue + '' + } > $out ''; kaomoji-file = writeText "kaomoji.txt" '' ¯\(°_o)/¯ dunno lol shrug dlol @@ -56,18 +72,19 @@ let 𓂺 penis 𓂸 penis ''; -in # ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode -writers.writeDashBin "unicodmenu" '' - PATH=${lib.makeBinPath [ coreutils dmenu gnused libnotify xclip xdotool ]} - chosen=$(cat ${kaomoji-file} ${unicode-file} | dmenu -p unicode -i -l 10 | sed "s/ .*//") +in + # ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode + writers.writeDashBin "unicodmenu" '' + PATH=${lib.makeBinPath [coreutils dmenu gnused libnotify xclip xdotool]} + chosen=$(cat ${kaomoji-file} ${unicode-file} | dmenu -p unicode -i -l 10 | sed "s/ .*//") - [ "$chosen" != "" ] || exit + [ "$chosen" != "" ] || exit - echo "$chosen" | tr -d '\n' | xclip -selection clipboard + echo "$chosen" | tr -d '\n' | xclip -selection clipboard - if [ -n "$1" ]; then - xdotool key Shift+Insert - else - notify-send --app-name="$(basename "$0")" "'$chosen' copied to clipboard." & - fi -'' + if [ -n "$1" ]; then + xdotool key Shift+Insert + else + notify-send --app-name="$(basename "$0")" "'$chosen' copied to clipboard." & + fi + '' diff --git a/packages/sncli.nix b/packages/sncli.nix index fd129eb..2b08299 100644 --- a/packages/sncli.nix +++ b/packages/sncli.nix @@ -1,5 +1,10 @@ -{ buildPythonPackage, buildPythonApplication, fetchPypi, requests, urwid }: -let +{ + buildPythonPackage, + buildPythonApplication, + fetchPypi, + requests, + urwid, +}: let Simperium3 = buildPythonPackage rec { pname = "Simperium3"; version = "0.1.3"; @@ -7,16 +12,17 @@ let inherit pname version; sha256 = "1j1w4dji39v44l96qq9kbrxpcjkjmika8065gwy8bf847f9fa76p"; }; - propagatedBuildInputs = [ requests ]; + propagatedBuildInputs = [requests]; }; -in buildPythonApplication rec { - pname = "sncli"; - version = "0.3.0"; +in + buildPythonApplication rec { + pname = "sncli"; + version = "0.3.0"; - src = fetchPypi { - inherit pname version; - sha256 = "18s5a6s2z7k14cbiyfdf98kw92r2hf1xwaavx67dxhadxm18xr4v"; - }; + src = fetchPypi { + inherit pname version; + sha256 = "18s5a6s2z7k14cbiyfdf98kw92r2hf1xwaavx67dxhadxm18xr4v"; + }; - propagatedBuildInputs = [ requests urwid Simperium3 ]; -} + propagatedBuildInputs = [requests urwid Simperium3]; + } diff --git a/packages/text2pdf.nix b/packages/text2pdf.nix index b8c7049..a4e9fd0 100644 --- a/packages/text2pdf.nix +++ b/packages/text2pdf.nix @@ -1,4 +1,7 @@ -{ stdenv, fetchurl }: +{ + stdenv, + fetchurl, +}: stdenv.mkDerivation rec { name = "${pname}-${version}"; pname = "text2pdf"; @@ -7,7 +10,7 @@ stdenv.mkDerivation rec { url = "http://www.eprg.org/pdfcorner/text2pdf/text2pdf.c"; sha256 = "002nyky12vf1paj7az6j6ra7lljwkhqzz238v7fyp7sfgxw0f7d1"; }; - phases = [ "buildPhase" ]; + phases = ["buildPhase"]; buildPhase = '' mkdir -p $out/bin gcc -o $out/bin/text2pdf $src diff --git a/packages/tocharian-font.nix b/packages/tocharian-font.nix index ccf1ad9..44d975f 100644 --- a/packages/tocharian-font.nix +++ b/packages/tocharian-font.nix @@ -1,4 +1,9 @@ -{ stdenv, lib, fetchurl, mupdf }: +{ + stdenv, + lib, + fetchurl, + mupdf, +}: stdenv.mkDerivation { pname = "tocharian-font"; version = "unstable-2022-01-11"; @@ -7,7 +12,7 @@ stdenv.mkDerivation { sha256 = "08bzkva9a6b2cfl38p9m22b1cf6yv27xsw6nrvq5ly5nffjm32hv"; }; dontUnpack = true; - buildInputs = [ mupdf ]; + buildInputs = [mupdf]; buildPhase = '' mutool extract $src ''; @@ -19,6 +24,6 @@ stdenv.mkDerivation { description = "Tocharian font by Lee Wilson"; license = licenses.unfree; platforms = platforms.all; - maintainers = with maintainers; [ kmein ]; + maintainers = with maintainers; [kmein]; }; } diff --git a/packages/vimPlugins/cheat-sh.nix b/packages/vimPlugins/cheat-sh.nix index 0e62db1..190f16f 100644 --- a/packages/vimPlugins/cheat-sh.nix +++ b/packages/vimPlugins/cheat-sh.nix @@ -1,5 +1,7 @@ -{ vimUtils, fetchFromGitHub }: -(vimUtils.buildVimPluginFrom2Nix { +{ + vimUtils, + fetchFromGitHub, +}: (vimUtils.buildVimPluginFrom2Nix { name = "cheat.sh-vim"; src = fetchFromGitHub { owner = "dbeniamine"; diff --git a/packages/vimPlugins/icalendar-vim.nix b/packages/vimPlugins/icalendar-vim.nix index a69da87..9ef5c88 100644 --- a/packages/vimPlugins/icalendar-vim.nix +++ b/packages/vimPlugins/icalendar-vim.nix @@ -1,5 +1,7 @@ -{ vimUtils, fetchFromGitHub }: -(vimUtils.buildVimPluginFrom2Nix { +{ + vimUtils, + fetchFromGitHub, +}: (vimUtils.buildVimPluginFrom2Nix { name = "icalendar.vim"; src = fetchFromGitHub { owner = "vim-scripts"; diff --git a/packages/vimPlugins/jq-vim.nix b/packages/vimPlugins/jq-vim.nix index fd65f55..fef4389 100644 --- a/packages/vimPlugins/jq-vim.nix +++ b/packages/vimPlugins/jq-vim.nix @@ -1,4 +1,7 @@ -{ vimUtils, fetchFromGitHub }: +{ + vimUtils, + fetchFromGitHub, +}: vimUtils.buildVimPluginFrom2Nix { name = "jq.vim"; src = fetchFromGitHub { diff --git a/packages/vimPlugins/vim-256noir.nix b/packages/vimPlugins/vim-256noir.nix index 99e5b37..1a9cfcd 100644 --- a/packages/vimPlugins/vim-256noir.nix +++ b/packages/vimPlugins/vim-256noir.nix @@ -1,4 +1,7 @@ -{ vimUtils, fetchFromGitHub }: +{ + vimUtils, + fetchFromGitHub, +}: vimUtils.buildVimPluginFrom2Nix { name = "vim-256noir"; src = fetchFromGitHub { diff --git a/packages/vimPlugins/vim-colors-paramount.nix b/packages/vimPlugins/vim-colors-paramount.nix index 8ca53a2..2af9868 100644 --- a/packages/vimPlugins/vim-colors-paramount.nix +++ b/packages/vimPlugins/vim-colors-paramount.nix @@ -1,4 +1,7 @@ -{ vimUtils, fetchFromGitHub }: +{ + vimUtils, + fetchFromGitHub, +}: vimUtils.buildVimPluginFrom2Nix rec { name = "vim-colors-paramount"; src = fetchFromGitHub { diff --git a/packages/vimPlugins/vim-fetch.nix b/packages/vimPlugins/vim-fetch.nix index 2827cce..9da94f3 100644 --- a/packages/vimPlugins/vim-fetch.nix +++ b/packages/vimPlugins/vim-fetch.nix @@ -1,5 +1,7 @@ -{ vimUtils, fetchFromGitHub }: -(vimUtils.buildVimPluginFrom2Nix rec { +{ + vimUtils, + fetchFromGitHub, +}: (vimUtils.buildVimPluginFrom2Nix rec { name = "vim-fetch"; src = fetchFromGitHub { owner = "wsdjeg"; diff --git a/packages/vimPlugins/vim-fsharp.nix b/packages/vimPlugins/vim-fsharp.nix index 6482d52..c12fdb0 100644 --- a/packages/vimPlugins/vim-fsharp.nix +++ b/packages/vimPlugins/vim-fsharp.nix @@ -1,4 +1,7 @@ -{ vimUtils, fetchFromGitHub }: +{ + vimUtils, + fetchFromGitHub, +}: vimUtils.buildVimPluginFrom2Nix { name = "vim-fsharp"; src = fetchFromGitHub { diff --git a/packages/vimPlugins/vim-mail.nix b/packages/vimPlugins/vim-mail.nix index 206737e..481d177 100644 --- a/packages/vimPlugins/vim-mail.nix +++ b/packages/vimPlugins/vim-mail.nix @@ -1,4 +1,7 @@ -{ vimUtils, fetchFromGitHub }: +{ + vimUtils, + fetchFromGitHub, +}: vimUtils.buildVimPluginFrom2Nix { name = "vim-mail"; src = fetchFromGitHub { diff --git a/packages/vimPlugins/vim-reason-plus.nix b/packages/vimPlugins/vim-reason-plus.nix index 0723b81..a7d3f27 100644 --- a/packages/vimPlugins/vim-reason-plus.nix +++ b/packages/vimPlugins/vim-reason-plus.nix @@ -1,5 +1,7 @@ -{ vimUtils, fetchFromGitHub }: -(vimUtils.buildVimPluginFrom2Nix { +{ + vimUtils, + fetchFromGitHub, +}: (vimUtils.buildVimPluginFrom2Nix { name = "vim-reason-plus"; src = fetchFromGitHub { owner = "reasonml-editor"; diff --git a/packages/vimv.nix b/packages/vimv.nix index 4321aae..8fa1d36 100644 --- a/packages/vimv.nix +++ b/packages/vimv.nix @@ -1,4 +1,9 @@ -{ lib, stdenv, bash, fetchFromGitHub }: +{ + lib, + stdenv, + bash, + fetchFromGitHub, +}: stdenv.mkDerivation { name = "vimv"; src = fetchFromGitHub { @@ -7,7 +12,7 @@ stdenv.mkDerivation { rev = "4152496c1946f68a13c648fb7e583ef23dac4eb8"; sha256 = "1fsrfx2gs6bqx7wk7pgcji2i2x4alqpsi66aif4kqvnpqfhcfzjd"; }; - phases = [ "installPhase" ]; + phases = ["installPhase"]; installPhase = '' mkdir -p $out/bin sed 's:#!/bin/bash:#!${bash}/bin/bash:' $src/vimv > $out/bin/vimv diff --git a/packages/when.nix b/packages/when.nix index e4cca9f..1b217e5 100644 --- a/packages/when.nix +++ b/packages/when.nix @@ -1,4 +1,9 @@ -{ lib, stdenv, perl, which }: +{ + lib, + stdenv, + perl, + which, +}: stdenv.mkDerivation { name = "when"; version = "1.1.40"; @@ -8,10 +13,10 @@ stdenv.mkDerivation { sha256 = "12d0zmvg66lwzr7q8zky0kz1x3w6q8dvyzm4x7lf1vy2z4pm4cvx"; }; - nativeBuildInputs = [ which ]; - buildInputs = [ perl ]; + nativeBuildInputs = [which]; + buildInputs = [perl]; - installFlags = [ "prefix=$(out)" ]; + installFlags = ["prefix=$(out)"]; meta = with lib; { homepage = "http://www.lightandmatter.com/when/when.html"; diff --git a/packages/worldradio.nix b/packages/worldradio.nix index 212908e..adacdbe 100644 --- a/packages/worldradio.nix +++ b/packages/worldradio.nix @@ -1,17 +1,21 @@ -{ jq, runCommand, fetchFromGitHub }: -let +{ + jq, + runCommand, + fetchFromGitHub, +}: let online-radio = fetchFromGitHub { owner = "kmein"; repo = "online-radio"; rev = "04d16421355196194a05e5504ba8f66a9c07ee7b"; sha256 = "1q0iagx7df0sd6vl5anvpzyiw4jdwa6c67z45rx622a6cr6m4zzl"; }; -in runCommand "worldradio.m3u" {} '' - ${jq}/bin/jq --raw-output --slurp 'flatten | map(.url_resolved) | .[]' ${online-radio}/src/data/countries/*.json \ - | sort \ - | uniq \ - > $out -'' - +in + runCommand "worldradio.m3u" {} '' + ${jq}/bin/jq --raw-output --slurp 'flatten | map(.url_resolved) | .[]' ${online-radio}/src/data/countries/*.json \ + | sort \ + | uniq \ + > $out + '' # anthoer method for running a world radio using Icecast Directory # curl http://dir.xiph.org/ | pup 'a[href^=http]:contains("Play") attr{href}' + diff --git a/systems/kabsa/configuration.nix b/systems/kabsa/configuration.nix index b44fb46..5083295 100644 --- a/systems/kabsa/configuration.nix +++ b/systems/kabsa/configuration.nix @@ -1,8 +1,11 @@ -{ config, pkgs, lib, ... }: -let - inherit (import ) retiolumAddresses; -in { + config, + pkgs, + lib, + ... +}: let + inherit (import ) retiolumAddresses; +in { imports = [ ./hardware-configuration.nix @@ -21,11 +24,11 @@ in maxJobs = 2; }; - environment.systemPackages = [ pkgs.minecraft ]; + environment.systemPackages = [pkgs.minecraft]; networking = { hostName = "kabsa"; - wireless.interfaces = [ "wlp3s0" ]; + wireless.interfaces = ["wlp3s0"]; retiolum = retiolumAddresses.kabsa; }; diff --git a/systems/kabsa/hardware-configuration.nix b/systems/kabsa/hardware-configuration.nix index 26d9b65..485f382 100644 --- a/systems/kabsa/hardware-configuration.nix +++ b/systems/kabsa/hardware-configuration.nix @@ -1,14 +1,19 @@ -{ config, lib, pkgs, ... }: { - imports = [ ]; +{ + config, + lib, + pkgs, + ... +}: { + imports = []; boot = { initrd = { - availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; + availableKernelModules = ["ehci_pci" "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci"]; luks.devices."luksmap".device = "/dev/disk/by-uuid/03b6abd0-e9ce-49c8-9659-a1d94f645d0f"; - kernelModules = [ ]; + kernelModules = []; }; - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; + kernelModules = ["kvm-intel"]; + extraModulePackages = []; loader = { efi.canTouchEfiVariables = true; systemd-boot = { diff --git a/systems/makanek/configuration.nix b/systems/makanek/configuration.nix index 9939232..b404838 100644 --- a/systems/makanek/configuration.nix +++ b/systems/makanek/configuration.nix @@ -1,8 +1,11 @@ -{ lib, config, pkgs, ... }: -let - inherit (import ) kieran retiolumAddresses restic; -in { + lib, + config, + pkgs, + ... +}: let + inherit (import ) kieran retiolumAddresses restic; +in { imports = [ ./gitea.nix ./hardware-configuration.nix @@ -33,7 +36,10 @@ in services.restic.backups.niveum = { initialize = true; inherit (restic) repository; - timerConfig = { OnCalendar = "daily"; RandomizedDelaySec = "1h"; }; + timerConfig = { + OnCalendar = "daily"; + RandomizedDelaySec = "1h"; + }; passwordFile = toString ; paths = [ "/var/lib/codimd" @@ -46,10 +52,10 @@ in ]; }; - nix.nixPath = [ "/var/src" ]; + nix.nixPath = ["/var/src"]; networking = { - firewall.allowedTCPPorts = [ 80 443 ]; + firewall.allowedTCPPorts = [80 443]; hostName = "makanek"; interfaces.ens3.useDHCP = true; retiolum = retiolumAddresses.makanek; @@ -72,5 +78,5 @@ in email = kieran.email; }; - environment.systemPackages = [ pkgs.vim pkgs.git pkgs.tmux pkgs.python3 ]; + environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3]; } diff --git a/systems/makanek/hardware-configuration.nix b/systems/makanek/hardware-configuration.nix index 39696fd..a6f66e8 100644 --- a/systems/makanek/hardware-configuration.nix +++ b/systems/makanek/hardware-configuration.nix @@ -1,18 +1,22 @@ -{ config, lib, pkgs, ... }: { - imports = [ ]; + config, + lib, + pkgs, + ... +}: { + imports = []; boot = { initrd = { - availableKernelModules = [ "ata_piix" "virtio_pci" "xhci_pci" "sd_mod" "sr_mod" ]; - kernelModules = [ ]; + availableKernelModules = ["ata_piix" "virtio_pci" "xhci_pci" "sd_mod" "sr_mod"]; + kernelModules = []; }; - kernelModules = [ ]; - extraModulePackages = [ ]; + kernelModules = []; + extraModulePackages = []; loader.grub = { enable = true; version = 2; - devices = [ "/dev/sda" ]; + devices = ["/dev/sda"]; }; }; @@ -21,7 +25,7 @@ fsType = "ext4"; }; - swapDevices = [ ]; + swapDevices = []; zramSwap.enable = true; nix.maxJobs = lib.mkDefault 2; diff --git a/systems/makanek/hedgedoc.nix b/systems/makanek/hedgedoc.nix index d412268..4789119 100644 --- a/systems/makanek/hedgedoc.nix +++ b/systems/makanek/hedgedoc.nix @@ -1,12 +1,14 @@ -{ config, pkgs, ... }: -let +{ + config, + pkgs, + ... +}: let backupLocation = "/var/lib/codimd-backup"; stateLocation = "/var/lib/codimd/state.sqlite"; nixpkgs-unstable = import {}; domain = "pad.kmein.de"; -in -{ - imports = [ ]; +in { + imports = []; services.nginx.virtualHosts.${domain} = { enableACME = true; @@ -18,7 +20,7 @@ in }; security.acme.certs.${domain}.group = "hedgecert"; - users.groups.hedgecert.members = [ "codimd" "nginx" ]; + users.groups.hedgecert.members = ["codimd" "nginx"]; security.dhparams = { enable = true; @@ -28,7 +30,7 @@ in services.hedgedoc = { enable = true; configuration = { - allowOrigin = [ domain ]; + allowOrigin = [domain]; allowAnonymous = true; allowGravatar = false; allowFreeURL = true; @@ -40,35 +42,41 @@ in domain = domain; useSSL = true; protocolUseSSL = true; - sslCAPath = [ "/etc/ssl/certs/ca-certificates.crt" ]; + sslCAPath = ["/etc/ssl/certs/ca-certificates.crt"]; sslCertPath = "/var/lib/acme/${domain}/cert.pem"; sslKeyPath = "/var/lib/acme/${domain}/key.pem"; dhParamPath = config.security.dhparams.params.hedgedoc.path; }; }; - krebs.permown.${backupLocation} = { owner = "codimd"; group = "codimd"; umask = "0002"; }; + krebs.permown.${backupLocation} = { + owner = "codimd"; + group = "codimd"; + umask = "0002"; + }; systemd.services.hedgedoc-backup = { description = "Hedgedoc backup service"; script = '' ${nixpkgs-unstable.sqlite}/bin/sqlite3 -json ${stateLocation} "select shortid, alias, ownerId, content from Notes" \ - | ${pkgs.writers.writePython3 "hedgedoc-json-to-fs.py" {} '' - import json - import pathlib - import sys + | ${ + pkgs.writers.writePython3 "hedgedoc-json-to-fs.py" {} '' + import json + import pathlib + import sys - for note in json.load(sys.stdin): - user_directory = pathlib.Path() - if note["ownerId"]: - user_directory = pathlib.Path(note["ownerId"]) - user_directory.mkdir(exist_ok=True) - file_path = user_directory / ( - (note["alias"] if note["alias"] else note["shortid"]) + ".md" - ) - file_path.write_text(note["content"]) - print(f"✔ {file_path}", file=sys.stderr) - ''} + for note in json.load(sys.stdin): + user_directory = pathlib.Path() + if note["ownerId"]: + user_directory = pathlib.Path(note["ownerId"]) + user_directory.mkdir(exist_ok=True) + file_path = user_directory / ( + (note["alias"] if note["alias"] else note["shortid"]) + ".md" + ) + file_path.write_text(note["content"]) + print(f"✔ {file_path}", file=sys.stderr) + '' + } ''; startAt = "hourly"; serviceConfig = { diff --git a/systems/makanek/horoscopy.nix b/systems/makanek/horoscopy.nix index ab8d4f3..c889a55 100644 --- a/systems/makanek/horoscopy.nix +++ b/systems/makanek/horoscopy.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let port = 5040; punkt = pkgs.fetchzip { url = "https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/tokenizers/punkt.zip"; @@ -11,17 +14,19 @@ let hash = "sha256-KBAbCvayTEr4+cOHnMXHCBA+8RWDMiQF65xzP4fOdaE="; }; horoscopy = import horoscopy-src; -in -{ +in { systemd.services.horoscopy = { - wants = [ "network-online.target" ]; - wantedBy = [ "multi-user.target" ]; + wants = ["network-online.target"]; + wantedBy = ["multi-user.target"]; description = "AI astrologer"; serviceConfig = { DynamicUser = true; }; environment.NLTK_DATA = pkgs.linkFarm "punkt-tokenizers" [ - { name = "tokenizers/punkt"; path = punkt; } + { + name = "tokenizers/punkt"; + path = punkt; + } ]; script = '' cd ${horoscopy-src} diff --git a/systems/makanek/matterbridge.nix b/systems/makanek/matterbridge.nix index a3deace..e345d8c 100644 --- a/systems/makanek/matterbridge.nix +++ b/systems/makanek/matterbridge.nix @@ -1,45 +1,53 @@ -{ pkgs, lib, ... }: { + pkgs, + lib, + ... +}: { services.matterbridge = { enable = true; - configPath = - let bridgeBotToken = lib.strings.fileContents ; - in toString ((pkgs.formats.toml {}).generate "config.toml" { - general = { - RemoteNickFormat = "[{NICK}] "; - Charset = "utf-8"; - }; - telegram.kmein.Token = bridgeBotToken; - irc = - let Nick = "ponte"; - in { - hackint = { Server = "irc.hackint.org:6697"; UseTLS = true; inherit Nick; }; - }; - mumble.lassulus = { - Server = "lassul.us:64738"; - Nick = "krebs_bridge"; - SkipTLSVerify = true; - }; - gateway = [ - { - name = "krebs-bridge"; - enable = true; - inout = [ - { - account = "irc.hackint"; - channel = "#krebs"; - } - { - account = "telegram.kmein"; - channel = "-330372458"; - } - { - account = "mumble.lassulus"; - channel = 6; # "nixos" - } - ]; - } - ]; - }); + configPath = let + bridgeBotToken = lib.strings.fileContents ; + in + toString ((pkgs.formats.toml {}).generate "config.toml" { + general = { + RemoteNickFormat = "[{NICK}] "; + Charset = "utf-8"; + }; + telegram.kmein.Token = bridgeBotToken; + irc = let + Nick = "ponte"; + in { + hackint = { + Server = "irc.hackint.org:6697"; + UseTLS = true; + inherit Nick; + }; + }; + mumble.lassulus = { + Server = "lassul.us:64738"; + Nick = "krebs_bridge"; + SkipTLSVerify = true; + }; + gateway = [ + { + name = "krebs-bridge"; + enable = true; + inout = [ + { + account = "irc.hackint"; + channel = "#krebs"; + } + { + account = "telegram.kmein"; + channel = "-330372458"; + } + { + account = "mumble.lassulus"; + channel = 6; # "nixos" + } + ]; + } + ]; + }); }; } diff --git a/systems/makanek/menstruation.nix b/systems/makanek/menstruation.nix index ee7a98f..363182a 100644 --- a/systems/makanek/menstruation.nix +++ b/systems/makanek/menstruation.nix @@ -1,13 +1,15 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let backend = pkgs.callPackage {}; telegram = pkgs.callPackage {}; backendPort = 8000; -in -{ +in { services.redis.enable = true; - environment.systemPackages = [ pkgs.redis ]; + environment.systemPackages = [pkgs.redis]; systemd.services.menstruation-telegram = { wants = [ @@ -15,7 +17,7 @@ in "menstruation-backend.service" "redis.service" ]; - wantedBy = [ "multi-user.target" ]; + wantedBy = ["multi-user.target"]; environment = { MENSTRUATION_TOKEN = lib.strings.fileContents ; MENSTRUATION_ENDPOINT = "http://localhost:${toString backendPort}"; @@ -29,7 +31,7 @@ in }; systemd.services.menstruation-backend = { - wants = [ "network-online.target" ]; + wants = ["network-online.target"]; environment.ROCKET_PORT = toString backendPort; serviceConfig = { Restart = "always"; diff --git a/systems/makanek/moinbot.nix b/systems/makanek/moinbot.nix index 11318a1..263ebdb 100644 --- a/systems/makanek/moinbot.nix +++ b/systems/makanek/moinbot.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { systemd.services.moinbot = { startAt = "7:00"; script = '' diff --git a/systems/makanek/monitoring/blackbox.nix b/systems/makanek/monitoring/blackbox.nix index bffa42d..2ad59f0 100644 --- a/systems/makanek/monitoring/blackbox.nix +++ b/systems/makanek/monitoring/blackbox.nix @@ -8,7 +8,7 @@ method = "GET"; no_follow_redirects = false; preferred_ip_protocol = "ip4"; - valid_http_versions = [ "HTTP/1.1" "HTTP/2.0" ]; + valid_http_versions = ["HTTP/1.1" "HTTP/2.0"]; tls_config.insecure_skip_verify = true; }; prober = "http"; diff --git a/systems/makanek/monitoring/default.nix b/systems/makanek/monitoring/default.nix index 5fcc246..6f42afa 100644 --- a/systems/makanek/monitoring/default.nix +++ b/systems/makanek/monitoring/default.nix @@ -1,10 +1,13 @@ -{ lib, config, pkgs, ... }: -let +{ + lib, + config, + pkgs, + ... +}: let lokiConfig = import ./loki.nix; blackboxConfig = import ./blackbox.nix; inherit (import ) restic; -in -{ +in { services.grafana = { enable = true; domain = "grafana.kmein.r"; @@ -19,103 +22,110 @@ in }; }; - services.prometheus.rules = let diskFreeThreshold = 10; in [(builtins.toJSON { - groups = [{ - name = "niveum"; - rules = [ + services.prometheus.rules = let + diskFreeThreshold = 10; + in [ + (builtins.toJSON { + groups = [ { - alert = "ServiceDown"; - expr = ''node_systemd_unit_state{state="failed"} == 1''; - annotations = { - summary = "{{$labels.name}} failed on {{$labels.job}}"; - }; - } - { - alert = "RootPartitionFull"; - for = "10m"; - expr = ''(node_filesystem_free_bytes{mountpoint="/"} * 100) / node_filesystem_size_bytes{mountpoint="/"} < ${toString diskFreeThreshold}''; - annotations = { - summary = ''{{ $labels.job }} running out of space: {{ $value | printf "%.2f" }}% < ${toString diskFreeThreshold}%''; - }; - } - { - alert = "RootPartitionFullWeek"; - for = "1h"; - expr = ''node_filesystem_free_bytes{mountpoint="/"} '' - + ''and predict_linear(node_filesystem_free_bytes{mountpoint="/"}[2d], 7*24*3600) <= 0''; - annotations = { - summary = "{{$labels.job}} running out of space in 7 days"; - }; - } - { - alert = "HighLoad"; - expr = ''node_load15 / on(job) count(node_cpu_seconds_total{mode="system"}) by (job) >= 1.0''; - for = "10m"; - annotations = { - summary = "{{$labels.job}} running on high load: {{$value}}"; - }; - } - { - alert = "HighRAM"; - expr = "node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes < node_memory_MemTotal_bytes * 0.1"; - for = "1h"; - annotations.summary = "{{$labels.job}} using lots of RAM"; - } - { - alert = "UptimeMonster"; - expr = "time() - node_boot_time_seconds > 2592000"; - annotations.summary = "uptime monster {{$labels.job}} up for more than 30 days"; - } - { - alert = "HostDown"; - expr = ''up == 0''; - for = "5m"; - annotations = { - summary = "{{ $labels.job }} seeming down since 5 minutes"; - }; - } - { - alert = "Reboot"; - expr = "time() - node_boot_time_seconds < 300"; - annotations.summary = "{{$labels.job}} rebooted"; - } - { - alert = "ProbeFailed"; - expr = "probe_success == 0"; - for = "5m"; - annotations.summary = "HTTP probe failed for {{$labels.instance}}"; - } - { - alert = "SlowProbe"; - expr = "avg_over_time(probe_http_duration_seconds[1m]) > 1"; - for = "5m"; - annotations.summary = "HTTP probe slow for {{$labels.instance}}"; - } - { - alert = "HttpStatusCode"; - expr = "probe_http_status_code != 0 AND (probe_http_status_code <= 199 OR probe_http_status_code >= 400)"; - for = "5m"; - annotations.summary = "status code {{$value}} for {{$labels.instance}}"; - } - { - alert = "SslExpirySoon"; - expr = "probe_ssl_earliest_cert_expiry - time() < 86400 * 30"; - for = "5m"; - annotations.summary = "SSL certificate for {{$labels.instance}} expires in 30 days"; - } - { - alert = "SslExpiry"; - expr = "probe_ssl_earliest_cert_expiry - time() <= 0"; - for = "5m"; - annotations.summary = "SSL certificate for {{$labels.instance}} has expired"; + name = "niveum"; + rules = [ + { + alert = "ServiceDown"; + expr = ''node_systemd_unit_state{state="failed"} == 1''; + annotations = { + summary = "{{$labels.name}} failed on {{$labels.job}}"; + }; + } + { + alert = "RootPartitionFull"; + for = "10m"; + expr = ''(node_filesystem_free_bytes{mountpoint="/"} * 100) / node_filesystem_size_bytes{mountpoint="/"} < ${toString diskFreeThreshold}''; + annotations = { + summary = ''{{ $labels.job }} running out of space: {{ $value | printf "%.2f" }}% < ${toString diskFreeThreshold}%''; + }; + } + { + alert = "RootPartitionFullWeek"; + for = "1h"; + expr = + ''node_filesystem_free_bytes{mountpoint="/"} '' + + ''and predict_linear(node_filesystem_free_bytes{mountpoint="/"}[2d], 7*24*3600) <= 0''; + annotations = { + summary = "{{$labels.job}} running out of space in 7 days"; + }; + } + { + alert = "HighLoad"; + expr = ''node_load15 / on(job) count(node_cpu_seconds_total{mode="system"}) by (job) >= 1.0''; + for = "10m"; + annotations = { + summary = "{{$labels.job}} running on high load: {{$value}}"; + }; + } + { + alert = "HighRAM"; + expr = "node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes < node_memory_MemTotal_bytes * 0.1"; + for = "1h"; + annotations.summary = "{{$labels.job}} using lots of RAM"; + } + { + alert = "UptimeMonster"; + expr = "time() - node_boot_time_seconds > 2592000"; + annotations.summary = "uptime monster {{$labels.job}} up for more than 30 days"; + } + { + alert = "HostDown"; + expr = ''up == 0''; + for = "5m"; + annotations = { + summary = "{{ $labels.job }} seeming down since 5 minutes"; + }; + } + { + alert = "Reboot"; + expr = "time() - node_boot_time_seconds < 300"; + annotations.summary = "{{$labels.job}} rebooted"; + } + { + alert = "ProbeFailed"; + expr = "probe_success == 0"; + for = "5m"; + annotations.summary = "HTTP probe failed for {{$labels.instance}}"; + } + { + alert = "SlowProbe"; + expr = "avg_over_time(probe_http_duration_seconds[1m]) > 1"; + for = "5m"; + annotations.summary = "HTTP probe slow for {{$labels.instance}}"; + } + { + alert = "HttpStatusCode"; + expr = "probe_http_status_code != 0 AND (probe_http_status_code <= 199 OR probe_http_status_code >= 400)"; + for = "5m"; + annotations.summary = "status code {{$value}} for {{$labels.instance}}"; + } + { + alert = "SslExpirySoon"; + expr = "probe_ssl_earliest_cert_expiry - time() < 86400 * 30"; + for = "5m"; + annotations.summary = "SSL certificate for {{$labels.instance}} expires in 30 days"; + } + { + alert = "SslExpiry"; + expr = "probe_ssl_earliest_cert_expiry - time() <= 0"; + for = "5m"; + annotations.summary = "SSL certificate for {{$labels.instance}} has expired"; + } + ]; } ]; - }]; - })]; + }) + ]; systemd.services.alertmanager-bot-telegram = { - wantedBy = [ "multi-user.target" ]; - after = [ "ip-up.target" ]; + wantedBy = ["multi-user.target"]; + after = ["ip-up.target"]; environment.TELEGRAM_ADMIN = "18980945"; environment.TELEGRAM_TOKEN = lib.strings.fileContents ; serviceConfig = { @@ -123,17 +133,19 @@ in RestartSec = "15s"; DynamicUser = true; StateDirectory = "alertbot"; - ExecStart = ''${pkgs.alertmanager-bot-telegram}/bin/alertmanager-bot \ - --alertmanager.url=http://localhost:9093 --log.level=info \ - --store=bolt --bolt.path=/var/lib/alertbot/bot.db \ - --listen.addr="0.0.0.0:16320" \ - --template.paths=${pkgs.writeText "template.tmpl" '' - {{ define "telegram.default" }} - {{range .Alerts -}} - {{.Status}}: {{ index .Annotations "summary"}} - {{end -}} - {{end}} - ''}''; + ExecStart = '' ${pkgs.alertmanager-bot-telegram}/bin/alertmanager-bot \ + --alertmanager.url=http://localhost:9093 --log.level=info \ + --store=bolt --bolt.path=/var/lib/alertbot/bot.db \ + --listen.addr="0.0.0.0:16320" \ + --template.paths=${ + pkgs.writeText "template.tmpl" '' + {{ define "telegram.default" }} + {{range .Alerts -}} + {{.Status}}: {{ index .Annotations "summary"}} + {{end -}} + {{end}} + '' + }''; }; }; @@ -146,64 +158,88 @@ in repeat_interval = "4h"; receiver = "me"; }; - receivers = [{ - name = "me"; - webhook_configs = [{ - url = "http://localhost:16320"; - send_resolved = true; - }]; - }]; + receivers = [ + { + name = "me"; + webhook_configs = [ + { + url = "http://localhost:16320"; + send_resolved = true; + } + ]; + } + ]; }; }; - services.prometheus.alertmanagers = [{ - scheme = "http"; - path_prefix = "/"; - static_configs = [ { targets = [ "localhost:9093" ]; } ]; - }]; + services.prometheus.alertmanagers = [ + { + scheme = "http"; + path_prefix = "/"; + static_configs = [{targets = ["localhost:9093"];}]; + } + ]; services.prometheus.scrapeConfigs = [ { job_name = "makanek"; - static_configs = [ { targets = [ - "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" - ]; } ]; + static_configs = [ + { + targets = [ + "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" + ]; + } + ]; } { scrape_interval = "5m"; job_name = "blackbox"; metrics_path = "/probe"; - params.module = [ "http_2xx" ]; + params.module = ["http_2xx"]; relabel_configs = [ - { source_labels = ["__address__"]; target_label = "__param_target"; } - { source_labels = ["__param_target"]; target_label = "instance"; } - { replacement = "127.0.0.1:${toString config.services.prometheus.exporters.blackbox.port}"; target_label = "__address__"; } + { + source_labels = ["__address__"]; + target_label = "__param_target"; + } + { + source_labels = ["__param_target"]; + target_label = "instance"; + } + { + replacement = "127.0.0.1:${toString config.services.prometheus.exporters.blackbox.port}"; + target_label = "__address__"; + } + ]; + static_configs = [ + { + targets = [ + "alew.hu-berlin.de" + "pad.kmein.de" + "code.kmein.de" + "radio.kmein.de" + "tarot.kmein.de" + "cloud.xn--kiern-0qa.de" + "grafana.kmein.r" + "names.kmein.r" + "rrm.r" + "graph.r" + ]; + } ]; - static_configs = [{ - targets = [ - "alew.hu-berlin.de" - "pad.kmein.de" - "code.kmein.de" - "radio.kmein.de" - "tarot.kmein.de" - "cloud.xn--kiern-0qa.de" - "grafana.kmein.r" - "names.kmein.r" - "rrm.r" - "graph.r" - ]; - }]; } { job_name = "zaatar"; - static_configs = [ { targets = [ - "zaatar.r:${toString config.services.prometheus.exporters.node.port}" - "zaatar.r:${toString restic.port}" - ]; } ]; + static_configs = [ + { + targets = [ + "zaatar.r:${toString config.services.prometheus.exporters.node.port}" + "zaatar.r:${toString restic.port}" + ]; + } + ]; } ]; - services.prometheus.exporters.blackbox = { enable = true; configFile = (pkgs.formats.yaml {}).generate "blackbox.yaml" blackboxConfig; diff --git a/systems/makanek/monitoring/loki.nix b/systems/makanek/monitoring/loki.nix index 4158bed..4162830 100644 --- a/systems/makanek/monitoring/loki.nix +++ b/systems/makanek/monitoring/loki.nix @@ -17,11 +17,11 @@ }; final_sleep = "0s"; }; - chunk_idle_period = "1h"; # Any chunk not receiving new logs in this time will be flushed - max_chunk_age = "1h"; # All chunks will be flushed when they hit this age, default is 1h - chunk_target_size = 1048576; # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_age is reached first - chunk_retain_period = "30s"; # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is 5m) - max_transfer_retries = 0; # Chunk transfers disabled + chunk_idle_period = "1h"; # Any chunk not receiving new logs in this time will be flushed + max_chunk_age = "1h"; # All chunks will be flushed when they hit this age, default is 1h + chunk_target_size = 1048576; # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_age is reached first + chunk_retain_period = "30s"; # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is 5m) + max_transfer_retries = 0; # Chunk transfers disabled }; schema_config.configs = [ { @@ -39,7 +39,7 @@ boltdb_shipper = { active_index_directory = "/tmp/loki/boltdb-shipper-active"; cache_location = "/tmp/loki/boltdb-shipper-cache"; - cache_ttl = "24h"; # Can be increased for faster performance over longer query periods, uses more disk space + cache_ttl = "24h"; # Can be increased for faster performance over longer query periods, uses more disk space shared_store = "filesystem"; }; filesystem.directory = "/tmp/loki/chunks"; diff --git a/systems/makanek/moodle-dl-borsfaye.nix b/systems/makanek/moodle-dl-borsfaye.nix index f48cb0e..7bec62a 100644 --- a/systems/makanek/moodle-dl-borsfaye.nix +++ b/systems/makanek/moodle-dl-borsfaye.nix @@ -1,11 +1,16 @@ -{ config, pkgs, lib, ... }: -let - moodle-dl-package = pkgs.moodle-dl.overrideAttrs (old: old // { - patches = [ ]; - }); -in { - imports = [ ]; + config, + pkgs, + lib, + ... +}: let + moodle-dl-package = pkgs.moodle-dl.overrideAttrs (old: + old + // { + patches = []; + }); +in { + imports = []; services.moodle-dl = { enable = true; diff --git a/systems/makanek/names.nix b/systems/makanek/names.nix index 9306cb2..fc49aed 100644 --- a/systems/makanek/names.nix +++ b/systems/makanek/names.nix @@ -1,13 +1,15 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let port = 5703; geogen-src = "${}/onomastics"; geogen = pkgs.callPackage geogen-src {}; -in -{ +in { systemd.services.names = { - wants = [ "network-online.target" ]; - wantedBy = [ "multi-user.target" ]; + wants = ["network-online.target"]; + wantedBy = ["multi-user.target"]; description = "Better clone of geogen.stoepel.net"; serviceConfig = { DynamicUser = true; diff --git a/systems/makanek/nextcloud.nix b/systems/makanek/nextcloud.nix index f75feb6..ef6a3d6 100644 --- a/systems/makanek/nextcloud.nix +++ b/systems/makanek/nextcloud.nix @@ -1,9 +1,11 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let passwordFile = path: toString (pkgs.writeText "password" (lib.strings.fileContents path)); inherit (import ) localAddresses; -in -{ +in { services.nextcloud = { enable = true; package = pkgs.nextcloud22; @@ -33,7 +35,7 @@ in services.postgresql = { enable = true; - ensureDatabases = [ "nextcloud" ]; + ensureDatabases = ["nextcloud"]; ensureUsers = [ { name = "nextcloud"; @@ -42,7 +44,6 @@ in ]; }; - services.nginx.virtualHosts."cloud.xn--kiern-0qa.de" = { enableACME = true; forceSSL = true; diff --git a/systems/makanek/radio-news.nix b/systems/makanek/radio-news.nix index d042c4e..93b6054 100644 --- a/systems/makanek/radio-news.nix +++ b/systems/makanek/radio-news.nix @@ -1,9 +1,11 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let inherit (import ) serveHtml; remote = "https://cgit.lassul.us/stockholm"; -in -{ +in { services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml pkgs; systemd.services.stockholm-history = { diff --git a/systems/makanek/radio.nix b/systems/makanek/radio.nix index 3e36969..bed8a99 100644 --- a/systems/makanek/radio.nix +++ b/systems/makanek/radio.nix @@ -1,5 +1,9 @@ -{ lib, pkgs, config, ... }: -let +{ + lib, + pkgs, + config, + ... +}: let inherit (import ) tmpfilesConfig; liquidsoapDirectory = "/var/cache/liquidsoap"; icecastPassword = "hackme"; @@ -105,7 +109,6 @@ in { }) ]; - services.icecast = { enable = true; hostname = "radio.kmein.de"; @@ -118,7 +121,6 @@ in { ''; }; - services.nginx.virtualHosts."radio.kmein.de" = { enableACME = true; forceSSL = true; diff --git a/systems/makanek/retiolum-map.nix b/systems/makanek/retiolum-map.nix index 9d87132..6128d34 100644 --- a/systems/makanek/retiolum-map.nix +++ b/systems/makanek/retiolum-map.nix @@ -1,5 +1,9 @@ -{ config, pkgs, lib, ... }: -let +{ + config, + pkgs, + lib, + ... +}: let network = "retiolum"; stateDirectory = "retiolum-map"; @@ -8,11 +12,10 @@ let geo-ip-database-path = "${config.services.geoipupdate.settings.DatabaseDirectory}/${geo-ip-database}"; tinc-graph = pkgs.callPackage {}; -in -{ +in { systemd.services.retiolum-index = { description = "Retiolum indexing service"; - wants = [ "tinc.${network}.service" ]; + wants = ["tinc.${network}.service"]; script = '' ${tinc-graph}/bin/tinc-graph --geoip-file ${geo-ip-database-path} --network ${network} \ | ${pkgs.coreutils}/bin/tee network.json \ @@ -23,7 +26,7 @@ in cp ${tinc-graph}/static/graph.html graph.html ''; startAt = "hourly"; - path = [ pkgs.coreutils pkgs.jq pkgs.tinc_pre ]; + path = [pkgs.coreutils pkgs.jq pkgs.tinc_pre]; serviceConfig = { Type = "oneshot"; User = "root"; @@ -37,7 +40,7 @@ in settings = { AccountID = 608777; LicenseKey = toString ; - EditionIDs = [ "GeoLite2-City" ]; + EditionIDs = ["GeoLite2-City"]; }; }; @@ -53,7 +56,7 @@ in }; systemd.services.geoip-share = { - after = [ "geoipupdate.service" ]; + after = ["geoipupdate.service"]; script = let cyberlocker-tools = pkgs.callPackage {}; in "${cyberlocker-tools}/bin/cput ${geo-ip-database} < ${geo-ip-database-path}"; diff --git a/systems/makanek/tarot.nix b/systems/makanek/tarot.nix index 6007487..4b77e16 100644 --- a/systems/makanek/tarot.nix +++ b/systems/makanek/tarot.nix @@ -1,5 +1,9 @@ -{ config, pkgs, lib, ... }: -let +{ + config, + pkgs, + lib, + ... +}: let tarotPort = 7407; tarotFiles = pkgs.fetchzip { url = "https://c.krebsco.de/tarot.zip"; @@ -10,37 +14,38 @@ let url = "http://c.krebsco.de/tarot.pdf"; sha256 = "1n2m53kjg2vj9dbr70b9jrsbqwdfrcb48l4wswn21549fi24g6dx"; }; -in -{ - imports = [ ]; +in { + imports = []; krebs.htgen.tarot = { port = tarotPort; user.name = "radio"; - script = ''. ${pkgs.writers.writeDash "tarot" '' - case "$Method $Request_URI" in - "GET /") - if item=$(${pkgs.findutils}/bin/find ${toString tarotFiles} -type f | ${pkgs.coreutils}/bin/shuf -n1); then - card=$(mktemp --tmpdir tarot.XXX) - trap 'rm $card' EXIT - reverse=$(${pkgs.coreutils}/bin/shuf -i0-1 -n1) - if [ "$reverse" -eq 1 ]; then - ${pkgs.imagemagick}/bin/convert -rotate 180 "$item" "$card" - else - ${pkgs.coreutils}/bin/cp "$item" "$card" - fi - printf 'HTTP/1.1 200 OK\r\n' - printf 'Content-Type: %s\r\n' "$(${pkgs.file}/bin/file -ib "$card")" - printf 'Server: %s\r\n' "$Server" - printf 'Connection: close\r\n' - printf 'Content-Length: %d\r\n' $(${pkgs.coreutils}/bin/wc -c < "$card") - printf '\r\n' - cat "$card" - exit - fi - ;; - esac - ''}''; + script = ''. ${ + pkgs.writers.writeDash "tarot" '' + case "$Method $Request_URI" in + "GET /") + if item=$(${pkgs.findutils}/bin/find ${toString tarotFiles} -type f | ${pkgs.coreutils}/bin/shuf -n1); then + card=$(mktemp --tmpdir tarot.XXX) + trap 'rm $card' EXIT + reverse=$(${pkgs.coreutils}/bin/shuf -i0-1 -n1) + if [ "$reverse" -eq 1 ]; then + ${pkgs.imagemagick}/bin/convert -rotate 180 "$item" "$card" + else + ${pkgs.coreutils}/bin/cp "$item" "$card" + fi + printf 'HTTP/1.1 200 OK\r\n' + printf 'Content-Type: %s\r\n' "$(${pkgs.file}/bin/file -ib "$card")" + printf 'Server: %s\r\n' "$Server" + printf 'Connection: close\r\n' + printf 'Content-Length: %d\r\n' $(${pkgs.coreutils}/bin/wc -c < "$card") + printf '\r\n' + cat "$card" + exit + fi + ;; + esac + '' + }''; }; services.nginx.virtualHosts."tarot.kmein.de" = { @@ -50,8 +55,14 @@ in "/".proxyPass = "http://127.0.0.1:${toString tarotPort}"; "/files/" = { root = pkgs.linkFarm "tarot" [ - { name = "files/key.pdf"; path = tarotKey; } - { name = "files/cards"; path = tarotFiles; } + { + name = "files/key.pdf"; + path = tarotKey; + } + { + name = "files/cards"; + path = tarotFiles; + } ]; extraConfig = '' autoindex on; diff --git a/systems/makanek/urlwatch.nix b/systems/makanek/urlwatch.nix index b1a0ea8..2300201 100644 --- a/systems/makanek/urlwatch.nix +++ b/systems/makanek/urlwatch.nix @@ -1,5 +1,9 @@ -{ pkgs, config, lib, ... }: -let +{ + pkgs, + config, + lib, + ... +}: let inherit (import ) kieran; urlwatchDir = "/var/lib/urlwatch"; @@ -10,17 +14,17 @@ let { name = "Corona-Verordnung"; url = "https://www.berlin.de/corona/massnahmen/verordnung/"; - filter = [ { css = "[role=main]"; } "html2text" "strip" ]; + filter = [{css = "[role=main]";} "html2text" "strip"]; } { name = "HU Semester"; url = "https://agnes.hu-berlin.de/lupo/rds?state=change&type=6&moduleParameter=semesterSelect&nextdir=change&next=SearchSelect.vm&subdir=applications&targettype=7&targetstate=change&getglobal=semester"; - filter = [ { css = "fieldset"; } "html2text" "strip" ]; + filter = [{css = "fieldset";} "html2text" "strip"]; } { name = "Lammla 2021"; url = "http://lammla.info/index.php?reihe=30"; - filter = [ "html2text" "strip" ]; + filter = ["html2text" "strip"]; } { name = "Tatort"; @@ -38,77 +42,77 @@ let { name = "Kratylos"; url = "https://kratylos.reichert-online.org/current_issue/KRATYLOS"; - filter = [ { element-by-id = "content"; } "html2text" "strip" ]; + filter = [{element-by-id = "content";} "html2text" "strip"]; } { name = "Zeno Free E-Books"; url = "http://www.zeno.org/Lesesaal/M/E-Books"; - filter = [ { element-by-class = "zenoCOMain"; } "html2text" "strip" ]; + filter = [{element-by-class = "zenoCOMain";} "html2text" "strip"]; } { name = "Arnshaugk Neuerscheinungen"; url = "http://www.arnshaugk.de/index.php"; - filter = [ "html2text" "strip" ]; + filter = ["html2text" "strip"]; } { name = "Carolina Welslau"; url = "https://carolinawelslau.de/"; - filter = [ { element-by-id = "main"; } "html2text" "strip" ]; + filter = [{element-by-id = "main";} "html2text" "strip"]; } { name = "Lisa Littmann"; url = "https://lisalittmann.de/"; - filter = [ { element-by-id = "main"; } "html2text" "strip" ]; + filter = [{element-by-id = "main";} "html2text" "strip"]; } { name = "Lisa Littmann: Projects"; url = "https://lisalittmann.de/projects/"; - filter = [ { element-by-id = "main"; } "html2text" "strip" ]; + filter = [{element-by-id = "main";} "html2text" "strip"]; } { name = "Lisa Littmann: Archive"; url = "https://lisalittmann.de/archive/"; - filter = [ { element-by-id = "main"; } "html2text" "strip" ]; + filter = [{element-by-id = "main";} "html2text" "strip"]; } { name = "WarpGrid: Idiomarium"; url = "https://warpgrid.de/idiomarium/"; - filter = [ { element-by-id = "site-content"; } "html2text" "strip" ]; + filter = [{element-by-id = "site-content";} "html2text" "strip"]; } { name = "WarpGrid: Futurism"; url = "https://warpgrid.de/futurism/"; - filter = [ { element-by-id = "site-content"; } "html2text" "strip" ]; + filter = [{element-by-id = "site-content";} "html2text" "strip"]; } { name = "WarpGrid: Imagiary"; url = "https://warpgrid.de/imagiary/"; - filter = [ { element-by-id = "site-content"; } "html2text" "strip" ]; + filter = [{element-by-id = "site-content";} "html2text" "strip"]; } { name = "WarpGrid: Cook"; url = "https://warpgrid.de/alchemy/"; - filter = [ { element-by-id = "site-content"; } "html2text" "strip" ]; + filter = [{element-by-id = "site-content";} "html2text" "strip"]; } { name = "Indogermanische Forschungen"; url = "https://www.degruyter.com/journal/key/INDO/html"; - filter = [ { element-by-id = "latestIssue"; } "html2text" "strip" ]; + filter = [{element-by-id = "latestIssue";} "html2text" "strip"]; } { name = "IG Neuigkeiten"; url = "https://www.indogermanistik.org/aktuelles/neuigkeiten.html"; - filter = [ { css = "[itemprop=articleBody]"; } "html2text" "strip" ]; + filter = [{css = "[itemprop=articleBody]";} "html2text" "strip"]; } { name = "IG Tagungen"; url = "https://www.indogermanistik.org/tagungen/tagungen-der-ig.html"; - filter = [ { css = "[itemprop=articleBody]"; } "html2text" "strip" ]; + filter = [{css = "[itemprop=articleBody]";} "html2text" "strip"]; } { name = "Christian-Metz-Blamage"; url = "https://www.deutschlandfunk.de/meine-nacht-schlaeft-nicht-pflanze-mich-nicht-in-dein-herz.700.de.html?dram:article_id=486475"; - filter = [ { element-by-class = "dlf-articledetail"; } "html2text" "strip" ]; + filter = [{element-by-class = "dlf-articledetail";} "html2text" "strip"]; } { name = "fxght.or.flxght"; @@ -170,10 +174,9 @@ let }; }; urlwatch = pkgs.urlwatch.overrideAttrs (attrs: { - patches = [ ]; + patches = []; }); -in -{ +in { users.extraUsers.urlwatch = { home = urlwatchDir; createHome = true; diff --git a/systems/makanek/weechat.nix b/systems/makanek/weechat.nix index 17b0864..f210620 100644 --- a/systems/makanek/weechat.nix +++ b/systems/makanek/weechat.nix @@ -1,25 +1,29 @@ -{ lib, pkgs, ... }: -let +{ + lib, + pkgs, + ... +}: let inherit (import ) kieran; relayPassword = lib.fileContents ; in { - systemd.services.weechat = - let + systemd.services.weechat = let tmux = pkgs.writers.writeDash "tmux" '' - exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" '' - set-option -g prefix ` - unbind-key C-b - bind ` send-prefix + exec ${pkgs.tmux}/bin/tmux -f ${ + pkgs.writeText "tmux.conf" '' + set-option -g prefix ` + unbind-key C-b + bind ` send-prefix - set-option -g status off - set-option -g default-terminal screen-256color + set-option -g status off + set-option -g default-terminal screen-256color - #use session instead of windows - bind-key c new-session - bind-key p switch-client -p - bind-key n switch-client -n - bind-key C-s switch-client -l - ''} "$@" + #use session instead of windows + bind-key c new-session + bind-key p switch-client -p + bind-key n switch-client -n + bind-key C-s switch-client -l + '' + } "$@" ''; weechat = pkgs.weechat-declarative.override { config = { @@ -28,7 +32,9 @@ in { pkgs.weechatScripts.colorize_nicks pkgs.weechatScripts.weechat-matrix ]; - settings = let nick = "kmein"; in { + settings = let + nick = "kmein"; + in { weechat = { look.mouse = true; look.prefix_align_max = 15; @@ -52,7 +58,7 @@ in { address = "irc.hackint.org/6697"; ipv6 = true; ssl = true; - autojoin = [ "#krebs" "#hsmr" "#nixos" "#the_playlist" "#flipdot-berlin" "#hackint" ]; + autojoin = ["#krebs" "#hsmr" "#nixos" "#the_playlist" "#flipdot-berlin" "#hackint"]; sasl_mechanism = "plain"; sasl_username = nick; sasl_password = lib.strings.fileContents ; @@ -61,7 +67,7 @@ in { autoconnect = true; address = "irc.libera.chat/6697"; ssl = true; - autojoin = [ "#flipdot" "#haskell" "#nixos" "#fysi" "#binaergewitter" "#neovim" "#lojban" "#vim" ]; + autojoin = ["#flipdot" "#haskell" "#nixos" "#fysi" "#binaergewitter" "#neovim" "#lojban" "#vim"]; sasl_mechanism = "plain"; sasl_username = nick; sasl_password = lib.strings.fileContents ; @@ -75,12 +81,12 @@ in { "/msg nickserv identify ${lib.strings.fileContents }" "/msg nickserv set cloak on" ]; - autojoin = [ "#home-manager" ]; + autojoin = ["#home-manager"]; }; retiolum = { autoconnect = true; address = "irc.r"; - autojoin = [ "#xxx" "#brockman" "#flix" "#autowifi" ]; + autojoin = ["#xxx" "#brockman" "#flix" "#autowifi"]; command = lib.concatStringsSep "\\;" [ "/oper admin aidsballs" "/msg nickserv always-on true" @@ -94,7 +100,7 @@ in { news = { autoconnect = true; address = "news.r"; - autojoin = [ "#cook" "#drachengame" "#oepnv" "#kmeinung" "#memes" ]; + autojoin = ["#cook" "#drachengame" "#oepnv" "#kmeinung" "#memes"]; command = "/oper aids balls"; }; }; @@ -134,7 +140,7 @@ in { }; bots = { buffer = "irc.retiolum.*"; - tags = [ "nick_gitlab" ]; + tags = ["nick_gitlab"]; regex = "*"; }; }; @@ -144,10 +150,10 @@ in { }; in { description = "Weechat bouncer"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; + after = ["network.target"]; + wantedBy = ["multi-user.target"]; restartIfChanged = true; - path = [ pkgs.alacritty.terminfo ]; + path = [pkgs.alacritty.terminfo]; environment.WEECHAT_HOME = "/var/lib/weechat"; preStart = "${pkgs.coreutils}/bin/rm $WEECHAT_HOME/*.conf"; script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat"; @@ -163,13 +169,15 @@ in { users.groups.weechat = {}; users.extraUsers.weechat = { useDefaultShell = true; - openssh.authorizedKeys.keys = kieran.sshKeys pkgs ++ [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@heym" - ]; + openssh.authorizedKeys.keys = + kieran.sshKeys pkgs + ++ [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@heym" + ]; createHome = true; group = "weechat"; home = "/var/lib/weechat"; isSystemUser = true; - packages = [ pkgs.tmux ]; + packages = [pkgs.tmux]; }; } diff --git a/systems/manakish/configuration.nix b/systems/manakish/configuration.nix index 16777d9..92adbff 100644 --- a/systems/manakish/configuration.nix +++ b/systems/manakish/configuration.nix @@ -1,9 +1,12 @@ -{ config, pkgs, ... }: -let - inherit (import ) retiolumAddresses; -in { - imports = [ # Include the results of the hardware scan. + config, + pkgs, + ... +}: let + inherit (import ) retiolumAddresses; +in { + imports = [ + # Include the results of the hardware scan. ./hardware-configuration.nix ./hdmi.nix @@ -24,7 +27,7 @@ in wlp3s0.useDHCP = true; wwp0s20u4i6.useDHCP = true; }; - wireless.interfaces = [ "wlp3s0" ]; + wireless.interfaces = ["wlp3s0"]; retiolum = retiolumAddresses.manakish; hostName = "manakish"; }; diff --git a/systems/manakish/hardware-configuration.nix b/systems/manakish/hardware-configuration.nix index 90e014d..a9431af 100644 --- a/systems/manakish/hardware-configuration.nix +++ b/systems/manakish/hardware-configuration.nix @@ -1,15 +1,20 @@ -{ config, lib, pkgs, modulesPath, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; boot = { initrd = { - availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; + availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci"]; kernelModules = []; luks.devices."crypted".device = "/dev/disk/by-uuid/493cb228-c292-4f71-9f38-dcb3e96dec47"; }; - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; + kernelModules = ["kvm-intel"]; + extraModulePackages = []; loader.grub = { enable = true; version = 2; @@ -30,7 +35,7 @@ }; }; - swapDevices = [ ]; + swapDevices = []; zramSwap.enable = true; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/systems/manakish/hdmi.nix b/systems/manakish/hdmi.nix index b1e532b..f410d44 100644 --- a/systems/manakish/hdmi.nix +++ b/systems/manakish/hdmi.nix @@ -1,13 +1,12 @@ -{ pkgs, ... }: -{ - services.xserver.displayManager.sessionCommands = - let +{pkgs, ...}: { + services.xserver.displayManager.sessionCommands = let intern = "LVDS-1"; extern = "HDMI-1"; pulseaudioCard = "alsa_card.pci-0000_00_1b.0"; pulseaudioProfile = "output:hdmi-stereo+input:analog-stereo"; - in toString (pkgs.writers.writeDash "hdmi-on" '' - ${pkgs.xorg.xrandr}/bin/xrandr --output ${intern} --primary --auto --output ${extern} --above ${intern} --auto - ${pkgs.pulseaudio}/bin/pactl set-card-profile ${pulseaudioCard} ${pulseaudioProfile} - ''); + in + toString (pkgs.writers.writeDash "hdmi-on" '' + ${pkgs.xorg.xrandr}/bin/xrandr --output ${intern} --primary --auto --output ${extern} --above ${intern} --auto + ${pkgs.pulseaudio}/bin/pactl set-card-profile ${pulseaudioCard} ${pulseaudioProfile} + ''); } diff --git a/systems/zaatar/backup.nix b/systems/zaatar/backup.nix index 6b7a9ee..77ce809 100644 --- a/systems/zaatar/backup.nix +++ b/systems/zaatar/backup.nix @@ -1,17 +1,19 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let niveumLib = import ; inherit (niveumLib) retiolumAddresses restic; firewall = niveumLib.firewall lib; dataDir = "/backup/restic"; -in -{ +in { services.restic.server = { enable = true; appendOnly = true; inherit dataDir; prometheus = true; - extraFlags = [ "--no-auth" ]; # auth is done via firewall + extraFlags = ["--no-auth"]; # auth is done via firewall listenAddress = ":${toString restic.port}"; }; @@ -26,14 +28,22 @@ in fsType = "ext4"; }; - networking.firewall = - let + networking.firewall = let dport = restic.port; protocol = "tcp"; rules = [ - (firewall.accept { inherit dport protocol; source = retiolumAddresses.kabsa.ipv4; }) - (firewall.accept { inherit dport protocol; source = retiolumAddresses.manakish.ipv4; }) - (firewall.accept { inherit dport protocol; source = retiolumAddresses.makanek.ipv4; }) + (firewall.accept { + inherit dport protocol; + source = retiolumAddresses.kabsa.ipv4; + }) + (firewall.accept { + inherit dport protocol; + source = retiolumAddresses.manakish.ipv4; + }) + (firewall.accept { + inherit dport protocol; + source = retiolumAddresses.makanek.ipv4; + }) ]; in { extraCommands = firewall.addRules rules; diff --git a/systems/zaatar/configuration.nix b/systems/zaatar/configuration.nix index 928bf2b..16a4b9e 100644 --- a/systems/zaatar/configuration.nix +++ b/systems/zaatar/configuration.nix @@ -1,8 +1,11 @@ -{ config, pkgs, lib, ... }: -let - inherit (import ) retiolumAddresses restic; -in { + config, + pkgs, + lib, + ... +}: let + inherit (import ) retiolumAddresses restic; +in { imports = [ ./backup.nix ./gaslight.nix @@ -29,14 +32,17 @@ in services.restic.backups.moodle-dl = { initialize = true; inherit (restic) repository; - timerConfig = { OnCalendar = "daily"; RandomizedDelaySec = "1h"; }; + timerConfig = { + OnCalendar = "daily"; + RandomizedDelaySec = "1h"; + }; passwordFile = toString ; paths = [ "/var/lib/moodle-dl" ]; }; - nix.nixPath = [ "/var/src" ]; + nix.nixPath = ["/var/src"]; services.logind = { lidSwitch = "ignore"; @@ -46,8 +52,7 @@ in services.illum.enable = true; - environment.systemPackages = - let + environment.systemPackages = let worldradio = pkgs.callPackage {}; in [ (pkgs.writers.writeDashBin "mpv" ''${pkgs.mpv}/bin/mpv --no-video "$@"'') @@ -62,7 +67,7 @@ in networking = { hostName = "zaatar"; - wireless.interfaces = [ "wlp2s0" ]; + wireless.interfaces = ["wlp2s0"]; retiolum = retiolumAddresses.zaatar; }; diff --git a/systems/zaatar/gaslight.nix b/systems/zaatar/gaslight.nix index 0f7bed5..2da6d8a 100644 --- a/systems/zaatar/gaslight.nix +++ b/systems/zaatar/gaslight.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { environment.systemPackages = [ (pkgs.writers.writeDashBin "gaslight-stream" '' ${pkgs.ffmpeg}/bin/ffmpeg -r 14 -s 640x480 -f video4linux2 -i /dev/video0 -f alsa -i default -c:v libx264 -preset ultrafast -c:a aac -f avi - @@ -16,10 +15,9 @@ '') ]; } - /* + + ssh machine gaslight-stream | mpv - + ssh machine gaslight-say "blablabla" + */ -ssh machine gaslight-stream | mpv - -ssh machine gaslight-say "blablabla" - -*/ diff --git a/systems/zaatar/hardware-configuration.nix b/systems/zaatar/hardware-configuration.nix index a267769..ba8a214 100644 --- a/systems/zaatar/hardware-configuration.nix +++ b/systems/zaatar/hardware-configuration.nix @@ -1,11 +1,15 @@ -{ config, lib, pkgs, ... }: { - imports = [ ]; + config, + lib, + pkgs, + ... +}: { + imports = []; boot = { - initrd.availableKernelModules = [ "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_acpi" "rtsx_usb_sdmmc" ]; - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; + initrd.availableKernelModules = ["ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_acpi" "rtsx_usb_sdmmc"]; + kernelModules = ["kvm-intel"]; + extraModulePackages = []; loader = { systemd-boot = { enable = true; @@ -26,7 +30,7 @@ }; }; - swapDevices = [{ device = "/dev/disk/by-label/swap"; }]; + swapDevices = [{device = "/dev/disk/by-label/swap";}]; nix.maxJobs = lib.mkDefault 4; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/systems/zaatar/kiosk.nix b/systems/zaatar/kiosk.nix index 9ae64d2..8668249 100644 --- a/systems/zaatar/kiosk.nix +++ b/systems/zaatar/kiosk.nix @@ -1,25 +1,30 @@ -{ config, pkgs, lib, ... }: { + config, + pkgs, + lib, + ... +}: { users.extraUsers.kiosk = { isNormalUser = true; password = ""; - extraGroups = [ "audio" ]; + extraGroups = ["audio"]; }; services.cage = { enable = true; user = config.users.extraUsers.kiosk.name; - extraArguments = [ "-s" ]; # allow vt switching - program = - let startUrls = [ "https://youtube.com" "http://radio.kmein.r" ]; - in pkgs.writers.writeDash "kiosk-browser" '' - while true; do - ${pkgs.brave}/bin/brave \ - --no-first-run --no-message-box --noerrdialogs \ - --default-browser --no-default-browser-check \ - --start-maximized ${lib.escapeShellArgs startUrls} - sleep 0.5 - done - ''; + extraArguments = ["-s"]; # allow vt switching + program = let + startUrls = ["https://youtube.com" "http://radio.kmein.r"]; + in + pkgs.writers.writeDash "kiosk-browser" '' + while true; do + ${pkgs.brave}/bin/brave \ + --no-first-run --no-message-box --noerrdialogs \ + --default-browser --no-default-browser-check \ + --start-maximized ${lib.escapeShellArgs startUrls} + sleep 0.5 + done + ''; }; systemd.services.cage-tty1.environment.XKB_DEFAULT_LAYOUT = "de"; programs.chromium = { diff --git a/systems/zaatar/moodle-dl-meinhark.nix b/systems/zaatar/moodle-dl-meinhark.nix index 4b65cb6..4811bd0 100644 --- a/systems/zaatar/moodle-dl-meinhark.nix +++ b/systems/zaatar/moodle-dl-meinhark.nix @@ -1,11 +1,16 @@ -{ config, pkgs, lib, ... }: -let - moodle-dl-package = pkgs.moodle-dl.overrideAttrs (old: old // { - patches = [ ]; - }); -in { - imports = [ ]; + config, + pkgs, + lib, + ... +}: let + moodle-dl-package = pkgs.moodle-dl.overrideAttrs (old: + old + // { + patches = []; + }); +in { + imports = []; services.moodle-dl = { enable = true; @@ -77,15 +82,14 @@ in fileSystems."/export/moodle" = { device = config.services.moodle-dl.directory; - options = [ "bind" ]; + options = ["bind"]; }; - networking.firewall.allowedTCPPorts = [ 2049 ]; + networking.firewall.allowedTCPPorts = [2049]; services.nginx.enable = true; - services.nginx.virtualHosts."moodle.kmein.r" = - let + services.nginx.virtualHosts."moodle.kmein.r" = let identity = lib.strings.fileContents ; password = lib.strings.fileContents ; in { @@ -101,7 +105,9 @@ in services.nfs.server = { enable = true; - exports = let machines = with (import ).retiolumAddresses; [kabsa manakish]; in '' + exports = let + machines = with (import ).retiolumAddresses; [kabsa manakish]; + in '' /export ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(fsid=0)") machines} /export/moodle ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(insecure,rw)") machines} ''; diff --git a/systems/zaatar/pulseaudio.nix b/systems/zaatar/pulseaudio.nix index 8f3420e..f6fa316 100644 --- a/systems/zaatar/pulseaudio.nix +++ b/systems/zaatar/pulseaudio.nix @@ -6,9 +6,9 @@ systemWide = true; tcp = { enable = true; - anonymousClients.allowedIpRanges = [ "127.0.0.1" "10.243.2.0/24" "192.168.0.0/16" ]; + anonymousClients.allowedIpRanges = ["127.0.0.1" "10.243.2.0/24" "192.168.0.0/16"]; }; zeroconf.publish.enable = true; }; - networking.firewall.allowedTCPPorts = [ 4713 ]; + networking.firewall.allowedTCPPorts = [4713]; } diff --git a/systems/zaatar/spotifyd.nix b/systems/zaatar/spotifyd.nix index b17da3c..ce359e4 100644 --- a/systems/zaatar/spotifyd.nix +++ b/systems/zaatar/spotifyd.nix @@ -1,5 +1,9 @@ -{ config, pkgs, lib, ... }: { + config, + pkgs, + lib, + ... +}: { services.spotifyd = { enable = true; settings = { diff --git a/systems/zaatar/tuna.nix b/systems/zaatar/tuna.nix index 81cd9c9..a9bea6a 100644 --- a/systems/zaatar/tuna.nix +++ b/systems/zaatar/tuna.nix @@ -1,5 +1,9 @@ -{ config, pkgs, lib, ... }: -let +{ + config, + pkgs, + lib, + ... +}: let firewall = (import ).firewall lib; streams = import { @@ -7,13 +11,14 @@ let }; multi-room-audio-port = 8000; password = lib.strings.fileContents ; -in -{ +in { imports = [ ]; - services.syncthing = let mpd-directory = config.services.mpd.dataDir; in { + services.syncthing = let + mpd-directory = config.services.mpd.dataDir; + in { enable = true; user = config.services.mpd.user; # config.users.extraUsers.moodle.name; openDefaultPorts = true; @@ -25,7 +30,7 @@ in inherit ((import ).syncthing.devices) kabsa manakish heym; }; folders.${config.services.mpd.musicDirectory} = { - devices = [ "heym" "kabsa" "manakish" ]; + devices = ["heym" "kabsa" "manakish"]; id = "music"; type = "receiveonly"; }; @@ -45,24 +50,29 @@ in ''; }; - environment.systemPackages = [ pkgs.mpc_cli ]; + environment.systemPackages = [pkgs.mpc_cli]; - networking.firewall = - let + networking.firewall = let dport = config.services.mpd.network.port; protocol = "tcp"; rules = [ - (firewall.accept { inherit dport protocol; source = "192.168.0.0/16"; }) - (firewall.accept { inherit dport protocol; source = "127.0.0.0/8"; }) + (firewall.accept { + inherit dport protocol; + source = "192.168.0.0/16"; + }) + (firewall.accept { + inherit dport protocol; + source = "127.0.0.0/8"; + }) ]; in { - allowedTCPPorts = [ 80 ]; + allowedTCPPorts = [80]; extraCommands = firewall.addRules rules; extraStopCommands = firewall.removeRules rules; }; - system.activationScripts.mpd-playlists = - let playlistFile = pkgs.writeText "radio.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams); + system.activationScripts.mpd-playlists = let + playlistFile = pkgs.writeText "radio.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams); in '' rm -rf /var/lib/mpd/playlists install -d /var/lib/mpd/playlists @@ -72,17 +82,28 @@ in services.tuna = { enable = true; # stationsFile = "/etc/tuna/stations.json"; - 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; + 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; webPort = 8080; }; - systemd.services.tuna-stations = - 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; + systemd.services.tuna-stations = 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.formats.json {}).generate "stations.json" stations; in { enable = false; - wantedBy = [ "tuna.service" ]; + wantedBy = ["tuna.service"]; startAt = "hourly"; script = '' mkdir -p /etc/tuna @@ -95,7 +116,6 @@ in ''; }; - services.nginx = { enable = true; recommendedGzipSettings = true;