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

5 Commits

10 changed files with 151 additions and 5 deletions

1
ci.nix
View File

@@ -64,6 +64,7 @@
kabsa = ensureFiles basic;
manakish = ensureFiles basic;
tahina = ensureFiles basic;
tabula = ensureFiles basic;
ful = ensureFiles (["root.password"] ++ basic);
makanek = ensureFiles ([
"irc/retiolum"

View File

@@ -49,6 +49,11 @@ in {
user = "root";
port = sshPort;
};
tabula = {
hostname = "tabula.r";
user = "root";
port = sshPort;
};
manakish = {
hostname = "manakish.r";
user = "kfm";

View File

@@ -0,0 +1,35 @@
{
pkgs,
lib,
...
}: let
celan = pkgs.fetchzip {
url = "http://c.krebsco.de/celan.tar.gz";
sha256 = "sha256-nA+EwAH2vkeolsy9AoPLEMt1uGKDZe/aPrS95CZvuus=";
};
in {
niveum.telegramBots.celan = {
enable = true;
time = "08:00";
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
chatIds = ["@PaulCelan"];
command = toString (pkgs.writers.writeDash "random-celan" ''
cd ${celan}
poem="$(${pkgs.findutils}/bin/find . -type f | ${pkgs.coreutils}/bin/shuf -n1)"
source="$(${pkgs.coreutils}/bin/dirname "$poem" | ${pkgs.gnused}/bin/sed 's#^\./##;s/[-_]/ /g;s!/! !g;s/0\([0-9]\+\)/\1/g')"
cat "$poem"
echo
printf "Aus: %s\n" "$source"
'');
};
systemd.timers.telegram-bot-hesychius.timerConfig.RandomizedDelaySec = "10h";
niveum.passport.services = [
{
title = "Paul Celan Bot";
description = "sends a random poem by Paul Celan to Telegram.";
link = "https://t.me/PaulCelan";
}
];
}

View File

@@ -22,6 +22,7 @@ in {
./smyth.nix
./nachtischsatan.nix
./tlg-wotd.nix
./celan.nix
<niveum/modules/telegram-bot.nix>
];

6
flake.lock generated
View File

@@ -159,11 +159,11 @@
"retiolum": {
"flake": false,
"locked": {
"lastModified": 1667116880,
"narHash": "sha256-d4kiPSZ2rRTwNJAAqYFH+zxfYyUl5QeMh4X5eOH94s8=",
"lastModified": 1669363981,
"narHash": "sha256-MkcI5WZ1VGmXR9LsX9oTJJLSF36L871lX25jT0Ruklw=",
"owner": "krebs",
"repo": "retiolum",
"rev": "090210e31fa6f28dbee523fbaa0369743780f43b",
"rev": "a805971ef7e25d2cc1ce8a062e5f72617880402a",
"type": "github"
},
"original": {

View File

@@ -175,6 +175,7 @@
zaatar = ["traadfri"];
ful = [];
tahina = [];
tabula = [];
kabsa = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
manakish = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
makanek = ["nixos-unstable" "menstruation-telegram" "menstruation-backend" "scripts" "telebots" "tinc-graph"];

View File

@@ -23,7 +23,10 @@
ipv4 = "10.243.2.85";
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
};
tabula = {
ipv4 = "10.243.2.78";
ipv6 = "";
};
tahina = {
ipv4 = "10.243.2.74";
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";

View File

@@ -157,7 +157,7 @@ in
}
{
stream = "http://rb-stream.de:8000/rrb_128.mp3";
station = "Radio Russkij Berlin";
station = "Radio Golos Berlina";
logo = "http://radio-rb.de/img/site/logo.png";
desc = "Голос нашего города ...";
tags = [tags.berlin tags.russian];

View File

@@ -0,0 +1,64 @@
{
config,
pkgs,
...
}: let
inherit (import <niveum/lib>) retiolumAddresses;
in {
imports = [
./hardware-configuration.nix
<niveum/configs/spacetime.nix>
<niveum/modules/retiolum.nix>
<niveum/configs/sshd.nix>
];
nix.nixPath = ["/var/src"];
services.xserver = {
libinput.enable = true;
};
users.users.xenos = {
name = "xenos";
password = "xenos";
isNormalUser = true;
extraGroups = ["networkmanager"];
};
services.xserver = {
enable = true;
desktopManager.lxqt.enable = true;
displayManager = {
autoLogin = {
enable = true;
user = "xenos";
};
};
};
environment.systemPackages = [
pkgs.libreoffice
pkgs.gimp
pkgs.inkscape
pkgs.firefox
pkgs.pidgin
pkgs.git
pkgs.vim
];
networking = {
useDHCP = false;
interfaces = {
enp0s4.useDHCP = true;
wlp2s0.useDHCP = true;
};
retiolum = retiolumAddresses.tabula;
hostName = "tabula";
};
sound.enable = true;
hardware.pulseaudio.enable = true;
networking.networkmanager.enable = true;
system.stateVersion = "21.11";
}

View File

@@ -0,0 +1,36 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
loader.grub = {
enable = true;
version = 2;
device = "/dev/sda";
};
initrd = {
availableKernelModules = ["pata_sis" "ohci_pci" "ehci_pci" "sata_sis" "usb_storage" "sd_mod" "sr_mod"];
kernelModules = [];
};
kernelModules = [];
extraModulePackages = [];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/6fe3c127-068f-4b71-9cac-5fea66f66dc8";
fsType = "ext4";
};
swapDevices = [
{device = "/dev/disk/by-uuid/874256aa-5bae-44a4-8933-c65f8600fe78";}
];
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}