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

5 Commits

Author SHA1 Message Date
704f745f5e try out whether new krops fixes the nixpkgs rebuilding issue 2022-02-16 09:11:10 +01:00
93dd8bd702 fix: less unstable, nixpkgs via krops git, NIX_PATH on makanek
systems wanted to build glibc all the time when updated
2022-02-15 22:16:50 +01:00
6e995764d4 chore: update horoscopy 2022-02-14 21:21:36 +01:00
87b9fc49ea feat(radio): opus streams 2022-02-14 08:14:15 +01:00
b4e42e6b22 feat: add horoscopy website 2022-02-14 08:02:08 +01:00
9 changed files with 116 additions and 55 deletions

View File

@@ -1,6 +1,5 @@
{ pkgs, lib, ... }: let
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
in {
environment.shellAliases.smpv = swallow "mpv";
@@ -22,7 +21,7 @@ in {
"Alt+j" = "add video-pan-y -0.05";
};
scripts = [
nixpkgs-unstable.mpvScripts.youtube-quality
pkgs.mpvScripts.youtube-quality
];
};
};

View File

@@ -197,7 +197,7 @@ in {
(pkgs.writers.writeDashBin "ncmpcpp-zaatar" ''MPD_HOST=${(import <niveum/lib/local-network.nix>).zaatar} exec ${pkgs.ncmpcpp}/bin/ncmpcpp "$@"'')
(pkgs.writers.writeDashBin "mpc-zaatar" ''MPD_HOST=${(import <niveum/lib/local-network.nix>).zaatar} exec ${pkgs.mpc_cli}/bin/mpc "$@"'')
nixpkgs-unstable.spotify
spotify
ncspot
playerctl

46
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
@@ -22,11 +22,11 @@
]
},
"locked": {
"lastModified": 1639871969,
"narHash": "sha256-6feWUnMygRzA9tzkrfAzpA5/NBYg75bkFxnqb1DtD7E=",
"lastModified": 1643933536,
"narHash": "sha256-yRmsWAG4DnLxLIUtlaZsl0kH7rN5xSoyNRlf0YZrcH4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "697cc8c68ed6a606296efbbe9614c32537078756",
"rev": "2860d7e3bb350f18f7477858f3513f9798896831",
"type": "github"
},
"original": {
@@ -46,11 +46,11 @@
]
},
"locked": {
"lastModified": 1632420452,
"narHash": "sha256-ncK6vABW/Ku9XI0kqj1otarUfblryoQzSaOCnaZ0oSs=",
"lastModified": 1644957911,
"narHash": "sha256-ggie/j7pdBqzDs4W7OiPmhqH9IGbXAbJxGqBdVxA8jA=",
"owner": "Mic92",
"repo": "krops",
"rev": "0388970c568905fedcbf429e5745aacd4f7a6633",
"rev": "86fb3d2ee94fd8306231853b323ed8804edf26ec",
"type": "github"
},
"original": {
@@ -109,27 +109,27 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1641829252,
"narHash": "sha256-CI0qi7k1Y4nFna+kdQtVCbN4ZEVwZcD/oIGgfTcUNrA=",
"lastModified": 1644837400,
"narHash": "sha256-treFS89w/xKzeTjJSJdYp/Ceddv6oqq7bL9mZMQDPi0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5d3420c1285073d5061a5d88a533b347d1222750",
"rev": "a03ae0e6d078cfdbb8404c3bff3622bd4e2f1c57",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-21.11",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1641935776,
"narHash": "sha256-8q/V9EgzyW0KvGnBjbTfQ19qoTCFqsEd1mF9DheCukw=",
"lastModified": 1644951967,
"narHash": "sha256-j+l8bt++dsYTJSGABuqeBEom5aNpD4n0BsOTdewFYuU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bd20b7f07fd337b2e85420edd642382a2cc0196d",
"rev": "05e1f8a2c7797b0d9f9e07ab2aaeccecdcf9b7da",
"type": "github"
},
"original": {
@@ -158,11 +158,11 @@
"retiolum": {
"flake": false,
"locked": {
"lastModified": 1644242494,
"narHash": "sha256-/iZdXU5BuE6vwHhZ4CmOTQTlqTWhI2x7E6HS7AdxFF0=",
"lastModified": 1644849126,
"narHash": "sha256-iaRNvfQrUD+ZownDWWNdDwhVPgSsU5ojvVdswVq1IpY=",
"owner": "krebs",
"repo": "retiolum",
"rev": "7b086d3599cb4dca4c22b8128897a4c6dd39d1c3",
"rev": "6de359ef848dc1f38fb76731c35e712ee885fd88",
"type": "github"
},
"original": {
@@ -210,11 +210,11 @@
"stockholm": {
"flake": false,
"locked": {
"lastModified": 1641747862,
"narHash": "sha256-gAGM3sxCP//k83CUow3ZpeHQCeuW62YJ6kWvWd8D1vk=",
"lastModified": 1644865613,
"narHash": "sha256-z7hPtMYxoQuWyLujUs5vbdZOGbjFosh+/IX3GpCDlkc=",
"ref": "master",
"rev": "f67bd5783d6ed2be836c7714ea38cbb3f7ac7257",
"revCount": 10285,
"rev": "e3785b22b2c6cb173a58fd066c4eda80a67fb872",
"revCount": 10404,
"type": "git",
"url": "https://cgit.lassul.us/stockholm"
},

View File

@@ -2,7 +2,7 @@
description = "niveum: packages, modules, systems";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-21.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {

View File

@@ -0,0 +1,28 @@
regex: https://www.radioeins.de/musik/cd_der_woche/
selectors:
httpsettings:
cookie: {}
header: {}
useragent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/90.0.4430.72 Safari/537.36
insecure: false
feed:
title: .boxhead h2
description: .manualteaserShortText
authorname: ""
authoremail: ""
item:
container: .doctyperezension
title: h2 a.rezension
link: a.rezension
linkattr: href
created: .manualteaserDateTime
createdformat: 02.01.2006
description: .manualteaserShortText
content: ""
image: picture > img
imageattr: src
nextpage: ""
nextpageattr: href
nextpagecount: 0
sort: ""

View File

@@ -1,6 +1,5 @@
{ config, pkgs, lib, ... }:
let
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
inherit (import <niveum/lib>) retiolumAddresses;
in
{
@@ -22,7 +21,7 @@ in
maxJobs = 2;
};
environment.systemPackages = [ nixpkgs-unstable.minecraft ];
environment.systemPackages = [ pkgs.minecraft ];
networking = {
hostName = "kabsa";

View File

@@ -10,6 +10,7 @@ in
./matterbridge.nix
./menstruation.nix
./moinbot.nix
./horoscopy.nix
./monitoring
./moodle-dl-borsfaye.nix
./names.nix
@@ -44,6 +45,8 @@ in
];
};
nix.nixPath = [ "/var/src" ];
networking = {
firewall.allowedTCPPorts = [ 80 443 ];
hostName = "makanek";

View File

@@ -0,0 +1,45 @@
{ pkgs, lib, ... }:
let
port = 5040;
punkt = pkgs.fetchzip {
url = "https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/tokenizers/punkt.zip";
sha256 = "113cv87dj5ml7g8pjm7psk4q1hrf0zqpmc945lmpdz91vp2wn1nc";
};
horoscopy-src = pkgs.fetchzip {
url = "http://c.krebsco.de/horoscopy.tar.gz";
stripRoot = false;
hash = "sha256-KBAbCvayTEr4+cOHnMXHCBA+8RWDMiQF65xzP4fOdaE=";
};
horoscopy = import horoscopy-src;
in
{
systemd.services.horoscopy = {
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; }
];
script = ''
cd ${horoscopy-src}
${horoscopy.dependencyEnv}/bin/gunicorn wsgi:app -b :${toString port}
'';
};
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
services.nginx.virtualHosts."horoscopy.kmein.de" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
};
}

View File

@@ -76,33 +76,20 @@ in {
)))
end
output.icecast(
mount = '/lyrikline.ogg',
port = ${toString config.services.icecast.listen.port},
password = "${icecastPassword}",
description = "lyrikline. listen to the poet (unofficial)",
%vorbis,
random_url("${lyrikline-poem}")
)
def make_streams(name, audio, ~description, ~genre) =
output.icecast(%vorbis, audio, mount = name ^ ".ogg", genre = genre, description = description,
port = ${toString config.services.icecast.listen.port},
password = "${icecastPassword}",
)
output.icecast(%opus, audio, mount = name ^ ".opus", genre = genre, description = description,
port = ${toString config.services.icecast.listen.port},
password = "${icecastPassword}",
)
end
output.icecast(
mount = '/lyrik.ogg',
port = ${toString config.services.icecast.listen.port},
password = "${icecastPassword}",
description = "Lyrik für alle Neue Lust auf Lyrik | www.deutschelyrik.de",
%vorbis,
random_url("${stavenhagen-poem}")
)
output.icecast(
mount = '/wikipedia.ogg',
port = ${toString config.services.icecast.listen.port},
password = "${icecastPassword}",
description = "Zufällige Artikel von Wikipedia",
genre = "useless knowledge",
%vorbis,
random_url("${wikipedia-article}")
)
make_streams("lyrikline", random_url("${lyrikline-poem}"), description="lyrikline. listen to the poet (unofficial)", genre="poetry")
make_streams("lyrik", random_url("${stavenhagen-poem}"), description="Fritz Stavenhagen Lyrik für alle | www.deutschelyrik.de", genre="poetry")
make_streams("wikipedia", random_url("${wikipedia-article}"), description="Zufällige Artikel von Wikipedia", genre="useless knowledge")
'';
systemd.services.radio.environment.TMPDIR = liquidsoapDirectory;