mirror of
https://github.com/kmein/niveum
synced 2026-03-23 21:21:08 +01:00
Compare commits
150 Commits
f3bb52e820
...
hass-nix-2
| Author | SHA1 | Date | |
|---|---|---|---|
| 62f3c7fcc0 | |||
| 0f88954989 | |||
| 7c349f1383 | |||
| 0eadbf08df | |||
| 72100329b1 | |||
| bf7b490372 | |||
| dd4083aec5 | |||
| 6edd1c0439 | |||
| 467c80a239 | |||
| b100ea7b28 | |||
| 3cdc468e31 | |||
| 2d19ba7249 | |||
| 7af32a0ad3 | |||
| 0e75118416 | |||
| 139fcae7a0 | |||
| bcfd5d73be | |||
| bcf057e871 | |||
| fad2d0629d | |||
| 27cc5766ee | |||
| 813072e47c | |||
|
|
bcc355f822 | ||
| d8b931af7c | |||
| 4c8d2a051d | |||
| 2906848f92 | |||
| c2a78a88bd | |||
| 63bf7ddeb0 | |||
|
|
19e4e76e6f | ||
| 79e9ab38a8 | |||
| 318687f5cf | |||
| c5a297cd7d | |||
| 6f6100d752 | |||
| 049dadd704 | |||
| 0a4fa2d16f | |||
| f25c59178c | |||
| 88b6802dae | |||
| 5f88e7287b | |||
| abb0be6a17 | |||
| fec8479e90 | |||
| 190a46abcd | |||
| 0a4fccd582 | |||
| 232b6059df | |||
| eb17c7fdd9 | |||
| 1aa7b78b4a | |||
| de6408f28f | |||
| aeed540089 | |||
| d769b79ac3 | |||
| 126dfada4b | |||
|
|
2793d2ca0e | ||
| b536f2af34 | |||
| 41d2a32585 | |||
| 94f2c18432 | |||
| a2e98794cb | |||
| 547d59ee2c | |||
| bc8a035451 | |||
| 36ce5143b4 | |||
| e4514389f1 | |||
| 99bc72eb29 | |||
| 7aee4b566c | |||
| 42cff2dc92 | |||
| 2576637960 | |||
|
|
d83f43a141 | ||
| 218195a781 | |||
| bb8940c9e5 | |||
| e6623e8b4d | |||
| b5514150ab | |||
| 2b2514b2eb | |||
| 3b1af791c9 | |||
| f3e14ffc9e | |||
| f04ca9d1de | |||
| 72b48e90aa | |||
| bd065e7888 | |||
| 45644518bb | |||
| 77ddd1d02f | |||
| 0f5e0e8d6f | |||
| de066361b7 | |||
| ba3a139f8e | |||
| 91fa6faeaf | |||
| e95546ef8a | |||
| b9623e3d57 | |||
| 73929c1963 | |||
| 3197a5a232 | |||
| 6a605633ae | |||
| 52376128a5 | |||
| 4a5bc2d89d | |||
| 3ec22d6ef0 | |||
| 3c86532a5d | |||
| a34b4a8262 | |||
| 3102d6f56c | |||
| a2b65034bf | |||
| 90550dc18b | |||
| 03d40a488b | |||
| 74191a27ee | |||
| a33db562c4 | |||
| 93cc209e52 | |||
| d1b5b0c25c | |||
| ff5bc035c0 | |||
| e06e7bbe0d | |||
| 8786bfad24 | |||
|
|
10949f7746 | ||
| 12e3529df8 | |||
| 4b954a7e83 | |||
| ce99920054 | |||
| c3c0792d50 | |||
| 851a9edc4d | |||
| e69668606e | |||
| 52d73abe06 | |||
| bf899d0bde | |||
| dcf2fa523b | |||
| cae4423fb3 | |||
| 25b37c2b01 | |||
| a4e0e25465 | |||
| 4fa3a3e5fc | |||
| 4950442f8b | |||
| 7252826719 | |||
| a22acd2073 | |||
| 9e85a12084 | |||
| 600d8a5f7d | |||
| 857518578a | |||
| b1fcbcaa96 | |||
| 005e193f56 | |||
| 6e5ff9214e | |||
| 85f3722ba5 | |||
| 797d091643 | |||
| b1544906aa | |||
| c886511c99 | |||
| 7388395908 | |||
| bf42e37daa | |||
| 035fa9e29d | |||
| cc28b894d1 | |||
| c1c1665e50 | |||
| 2dca2596cd | |||
|
|
bede997e7d | ||
| 0082602131 | |||
| 8ffeddb46b | |||
| c06e37f40a | |||
| 8d36a77405 | |||
| 1219517d62 | |||
| 786d1df781 | |||
| c49859900a | |||
| f9ce538975 | |||
| 7d6e7ae1a2 | |||
| 176958cd75 | |||
| 816c21d7de | |||
| 3b1f4799e0 | |||
| c52df45b4f | |||
| 84f83cb6ac | |||
| 652b7d4852 | |||
| e73c139d69 | |||
| 549282140f | |||
|
|
be3795e957 |
@@ -6,12 +6,12 @@ clean() {
|
||||
rm -rf "$directory"
|
||||
}
|
||||
|
||||
year=2022
|
||||
year=$(date +%Y)
|
||||
output=/tmp/$year.pdf
|
||||
|
||||
for month in $(seq 1 12); do
|
||||
printf "\r%d" "$month" 1>&2
|
||||
astrolog -zN Berlin -qm "$month" "$year" -X -K -XA -R Uranus Neptune Pluto -Xr -Xm -Xb -Xo "$(printf "%s/%02d.bmp" "$directory" "$month")" -Xw 1080 720 2>/dev/null
|
||||
astrolog -zN Berlin -qm "$month" "$year" -X -K -XA -Xr -Xm -Xb -Xo "$(printf "%s/%02d.bmp" "$directory" "$month")" -Xw 1080 720 2>/dev/null
|
||||
done
|
||||
printf "\r"
|
||||
|
||||
|
||||
43
.bin/dummy-alert
Executable file
43
.bin/dummy-alert
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
name=$RANDOM
|
||||
url='http://localhost:9093/api/v1/alerts'
|
||||
|
||||
echo "firing up alert $name"
|
||||
|
||||
# change url o
|
||||
curl -XPOST $url -d "[{
|
||||
\"status\": \"firing\",
|
||||
\"labels\": {
|
||||
\"alertname\": \"$name\",
|
||||
\"service\": \"my-service\",
|
||||
\"severity\":\"warning\",
|
||||
\"instance\": \"$name.example.net\"
|
||||
},
|
||||
\"annotations\": {
|
||||
\"summary\": \"High latency is high!\"
|
||||
},
|
||||
\"generatorURL\": \"http://prometheus.int.example.net/<generating_expression>\"
|
||||
}]"
|
||||
|
||||
echo ""
|
||||
|
||||
echo "press enter to resolve alert"
|
||||
read
|
||||
|
||||
echo "sending resolve"
|
||||
curl -XPOST $url -d "[{
|
||||
\"status\": \"resolved\",
|
||||
\"labels\": {
|
||||
\"alertname\": \"$name\",
|
||||
\"service\": \"my-service\",
|
||||
\"severity\":\"warning\",
|
||||
\"instance\": \"$name.example.net\"
|
||||
},
|
||||
\"annotations\": {
|
||||
\"summary\": \"High latency is high!\"
|
||||
},
|
||||
\"generatorURL\": \"http://prometheus.int.example.net/<generating_expression>\"
|
||||
}]"
|
||||
|
||||
echo ""
|
||||
5
.bin/json2csv.jq
Executable file
5
.bin/json2csv.jq
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env -S jq -r -f
|
||||
(map(keys) | add | unique) as $cols
|
||||
| map(. as $row | $cols | map($row[.])) as $rows
|
||||
| $cols, $rows[]
|
||||
| @csv
|
||||
18
.bin/ttrss-unread
Executable file
18
.bin/ttrss-unread
Executable file
@@ -0,0 +1,18 @@
|
||||
#/usr/bin/env -S deno run -A:q
|
||||
set -x
|
||||
session_cache="$HOME/.cache/tt-rss.session"
|
||||
ttrss_endpoint=https://feed.kmein.de/api/
|
||||
ttrss_user=k
|
||||
ttrss_password=$(pass shared/tt-rss/password)
|
||||
|
||||
login() {
|
||||
if [ -f "$session_cache" ]; then
|
||||
session_id="$(cat "$session_cache")"
|
||||
else
|
||||
session_id="$(curl -d '{"op":"login","user":"'"$ttrss_user"'","password":"'"$ttrss_password"'"}' "$ttrss_endpoint" | jq -r .content.session_id)"
|
||||
echo "$session_id" > "$session_cache"
|
||||
fi
|
||||
}
|
||||
|
||||
login
|
||||
curl -d '{"sid":"'"$session_id"'","op":"getUnread"}' "$ttrss_endpoint" | jq .content
|
||||
4
ci.nix
4
ci.nix
@@ -45,6 +45,7 @@
|
||||
"mail/gmail/kieran.meinhardt"
|
||||
"mail/meinhaki"
|
||||
"mail/dslalewa"
|
||||
"mail/fsklassp"
|
||||
"mail/posteo"
|
||||
"mega/password"
|
||||
"nextcloud-fysi/password"
|
||||
@@ -52,6 +53,7 @@
|
||||
"openweathermap.key"
|
||||
"restic/password"
|
||||
"traadfri.key"
|
||||
"miniflux/password"
|
||||
"wifi/Aether.psk"
|
||||
"spotify/username"
|
||||
"spotify/password"
|
||||
@@ -64,8 +66,10 @@
|
||||
kabsa = ensureFiles basic;
|
||||
manakish = ensureFiles basic;
|
||||
tahina = ensureFiles basic;
|
||||
tabula = ensureFiles basic;
|
||||
ful = ensureFiles (["root.password"] ++ basic);
|
||||
makanek = ensureFiles ([
|
||||
"grafana/admin"
|
||||
"irc/retiolum"
|
||||
"irc/hackint"
|
||||
"irc/libera"
|
||||
|
||||
@@ -6,7 +6,12 @@
|
||||
}: let
|
||||
alacritty-cfg = theme:
|
||||
(pkgs.formats.yaml {}).generate "alacritty.yml" {
|
||||
window.opacity = 0.95;
|
||||
window.opacity = 0.99;
|
||||
bell = {
|
||||
animation = "EaseOut";
|
||||
duration = 100;
|
||||
color = "#ffffff";
|
||||
};
|
||||
font = {
|
||||
normal.family = "Monospace";
|
||||
size = 6;
|
||||
@@ -43,6 +48,7 @@
|
||||
name = "alacritty";
|
||||
paths = [
|
||||
(pkgs.writeDashBin "alacritty" ''
|
||||
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml msg create-window "$@" ||
|
||||
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml "$@"
|
||||
'')
|
||||
pkgs.alacritty
|
||||
@@ -56,7 +62,7 @@ in {
|
||||
];
|
||||
|
||||
environment.etc = {
|
||||
"themes/dark/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/ayu-dark.nix>);
|
||||
"themes/light/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/ayu-light.nix>);
|
||||
"themes/dark/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/papercolor-dark.nix>);
|
||||
"themes/light/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/papercolor-light.nix>);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,9 +20,12 @@ in {
|
||||
paths = [
|
||||
"/home/kfm/work"
|
||||
"/home/kfm/projects"
|
||||
"/home/kfm/notes"
|
||||
"/home/kfm/cloud"
|
||||
"/home/kfm/.gnupg"
|
||||
"/home/kfm/.ssh"
|
||||
"/mnt/sd-card/music"
|
||||
"/mnt/sd-card/Books"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
@@ -11,6 +15,82 @@
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.me = {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox.override {
|
||||
cfg = {
|
||||
enableTridactylNative = true;
|
||||
};
|
||||
};
|
||||
profiles = let
|
||||
defaultSettings = {
|
||||
"beacon.enabled" = false;
|
||||
"browser.bookmarks.showMobileBookmarks" = true;
|
||||
"browser.newtab.preload" = false;
|
||||
"browser.search.isUS" = false;
|
||||
"browser.search.region" = "DE";
|
||||
"browser.send_pings" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.startup.homepage" = "chrome://browser/content/blanktab.html";
|
||||
"browser.uidensity" = 1;
|
||||
"browser.urlbar.placeholderName" = "Search";
|
||||
"datareporting.healthreport.service.enabled" = false;
|
||||
"datareporting.healthreport.uploadEnabled" = false;
|
||||
"datareporting.policy.dataSubmissionEnabled" = false;
|
||||
"datareporting.sessions.current.clean" = true;
|
||||
"distribution.searchplugins.defaultLocale" = "de-DE";
|
||||
"general.smoothScroll" = true;
|
||||
"identity.fxaccounts.account.device.name" = config.networking.hostName;
|
||||
"network.cookie.cookieBehavior" = 1;
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"privacy.trackingprotection.enabled" = true;
|
||||
"privacy.trackingprotection.pbmode.enabled" = true;
|
||||
"privacy.trackingprotection.socialtracking.enabled" = true;
|
||||
"services.sync.declinedEngines" = "passwords";
|
||||
"services.sync.engine.passwords" = false;
|
||||
"signon.autofillForms" = false;
|
||||
"signon.rememberSignons" = false;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||
"toolkit.telemetry.cachedClientID" = "";
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||
"toolkit.telemetry.hybridContent.enabled" = false;
|
||||
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||
"toolkit.telemetry.prompted" = 2;
|
||||
"toolkit.telemetry.rejected" = true;
|
||||
"toolkit.telemetry.server" = "";
|
||||
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"toolkit.telemetry.unifiedIsOptIn" = false;
|
||||
"toolkit.telemetry.updatePing.enabled" = false;
|
||||
"ui.prefersReducedMotion" = 1;
|
||||
};
|
||||
in {
|
||||
default = {
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
settings = defaultSettings;
|
||||
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
# ublock-origin
|
||||
# darkreader
|
||||
# sponsorblock
|
||||
# consent-o-matic
|
||||
# i-dont-care-about-cookies
|
||||
# # auto-tab-discard TODO what is this
|
||||
# ];
|
||||
userChrome = ''
|
||||
#TabsToolbar {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [pkgs.brave];
|
||||
|
||||
environment.variables.BROWSER = "brave";
|
||||
|
||||
7
configs/clipboard.nix
Normal file
7
configs/clipboard.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.clipmenu.enable = true;
|
||||
}
|
||||
@@ -61,7 +61,7 @@ in {
|
||||
};
|
||||
in ''
|
||||
mkdir -p ${lib.escapeShellArg kieran.target}
|
||||
${pkgs.nextcloud-client}/bin/nextcloudcmd --user ${kieran.user} --password ${lib.escapeShellArg kieran.password} --path /Notes ${lib.escapeShellArg kieran.target} ${kieran.endpoint}
|
||||
${pkgs.nextcloud-client}/bin/nextcloudcmd --non-interactive --user ${kieran.user} --password ${lib.escapeShellArg kieran.password} --path /Notes ${lib.escapeShellArg kieran.target} ${kieran.endpoint}
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{
|
||||
services.compton = {
|
||||
services.picom = {
|
||||
enable = true;
|
||||
activeOpacity = 1;
|
||||
fade = true;
|
||||
fadeDelta = 10;
|
||||
inactiveOpacity = 0.8;
|
||||
shadow = true;
|
||||
menuOpacity = 0.9;
|
||||
shadowOpacity = 0.3;
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
{
|
||||
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
|
||||
${pkgs.copyq}/bin/copyq config copy_clipboard true
|
||||
${pkgs.copyq}/bin/copyq config copy_selection false
|
||||
|
||||
${pkgs.copyq}/bin/copyq config activate_closes true
|
||||
${pkgs.copyq}/bin/copyq config clipboard_notification_lines 0
|
||||
${pkgs.copyq}/bin/copyq config clipboard_tab \&clipboard
|
||||
${pkgs.copyq}/bin/copyq config disable_tray false
|
||||
${pkgs.copyq}/bin/copyq config hide_tabs false
|
||||
${pkgs.copyq}/bin/copyq config hide_toolbar false
|
||||
${pkgs.copyq}/bin/copyq config item_popup_interval true
|
||||
${pkgs.copyq}/bin/copyq config maxitems 1000
|
||||
${pkgs.copyq}/bin/copyq config move true
|
||||
${pkgs.copyq}/bin/copyq config text_wrap true
|
||||
'';
|
||||
in {
|
||||
environment.systemPackages = [pkgs.copyq];
|
||||
|
||||
systemd.user.services.copyq = {
|
||||
wantedBy = ["graphical-session.target"];
|
||||
environment = {
|
||||
DISPLAY = ":${toString config.services.xserver.display}";
|
||||
};
|
||||
serviceConfig = {
|
||||
SyslogIdentifier = "copyq";
|
||||
ExecStart = "${pkgs.copyq}/bin/copyq";
|
||||
ExecStartPost = copyqConfig;
|
||||
Restart = "always";
|
||||
RestartSec = "15s";
|
||||
StartLimitBurst = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
inherit (lib.strings) makeBinPath;
|
||||
inherit (import <niveum/lib>) localAddresses kieran;
|
||||
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
|
||||
defaultApplications = (import <niveum/lib>).defaultApplications {inherit pkgs;};
|
||||
in {
|
||||
imports = [
|
||||
<home-manager/nixos>
|
||||
@@ -31,13 +32,10 @@ in {
|
||||
tocharian-font = pkgs.callPackage <niveum/packages/tocharian-font.nix> {};
|
||||
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> {};
|
||||
ix = pkgs.callPackage <niveum/packages/ix.nix> {};
|
||||
rofi-pass = pkgs.rofi-pass.overrideAttrs (final: previous: {
|
||||
patches = [
|
||||
# password store androi
|
||||
<niveum/packages/rofi-pass.patch>
|
||||
];
|
||||
});
|
||||
};
|
||||
permittedInsecurePackages = [
|
||||
"qtwebkit-5.212.0-alpha4"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -71,32 +69,6 @@ in {
|
||||
};
|
||||
|
||||
home-manager.users.me.xdg.enable = true;
|
||||
home-manager.users.me.dconf.enable = false;
|
||||
}
|
||||
{
|
||||
sound.enable = true;
|
||||
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
# 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"
|
||||
]
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
users.users.me.extraGroups = ["audio"];
|
||||
|
||||
environment.systemPackages = [pkgs.pavucontrol pkgs.ncpamixer pkgs.pamixer pkgs.pulsemixer];
|
||||
}
|
||||
{
|
||||
environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum";
|
||||
@@ -116,11 +88,11 @@ in {
|
||||
'';
|
||||
swallow = command: "${scripts.swallow}/bin/swallow ${command}";
|
||||
in {
|
||||
"ß" = "${pkgs.utillinux}/bin/setsid";
|
||||
"ß" = "${pkgs.util-linux}/bin/setsid";
|
||||
cat = "${pkgs.bat}/bin/bat --style=plain";
|
||||
chromium-incognito = "chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito";
|
||||
cp = "cp --interactive";
|
||||
ip = "${pkgs.iproute}/bin/ip -c";
|
||||
ip = "${pkgs.iproute2}/bin/ip -c";
|
||||
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";
|
||||
@@ -128,7 +100,7 @@ in {
|
||||
mv = "mv --interactive";
|
||||
nixi = "nix repl '<nixpkgs>'";
|
||||
ns = "nix-shell --run zsh";
|
||||
o = "${pkgs.xdg_utils}/bin/xdg-open";
|
||||
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
|
||||
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
|
||||
rm = "rm --interactive";
|
||||
@@ -189,7 +161,14 @@ in {
|
||||
}
|
||||
{programs.command-not-found.enable = true;}
|
||||
{
|
||||
programs.gnupg.agent.enable = true;
|
||||
home-manager.users.me = {
|
||||
services.gpg-agent = rec {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
defaultCacheTtl = 2 * 60 * 60;
|
||||
maxCacheTtl = 4 * defaultCacheTtl;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.gnupg
|
||||
@@ -216,6 +195,25 @@ in {
|
||||
{
|
||||
home-manager.users.me.home.stateVersion = "22.05";
|
||||
}
|
||||
{
|
||||
systemd.user.services.udiskie = {
|
||||
after = ["udisks2.service"];
|
||||
wants = ["udisks2.service"];
|
||||
wantedBy = ["graphical-session.target"];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.udiskie}/bin/udiskie --verbose --no-config --notify";
|
||||
};
|
||||
};
|
||||
services.udisks2.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
home-manager.users.me = {
|
||||
dconf.enable = true;
|
||||
dconf.settings = {
|
||||
# Change the default terminal for Nemo
|
||||
"org/cinnamon/desktop/applications/terminal".exec = defaultApplications.terminal;
|
||||
};
|
||||
};
|
||||
}
|
||||
./alacritty.nix
|
||||
./backup.nix
|
||||
./bash.nix
|
||||
@@ -224,8 +222,8 @@ in {
|
||||
./ccc.nix
|
||||
./khal.nix
|
||||
./chromium.nix
|
||||
./clipboard.nix
|
||||
./cloud.nix
|
||||
./copyq.nix
|
||||
./compton.nix
|
||||
./direnv.nix
|
||||
./distrobump.nix
|
||||
@@ -262,15 +260,17 @@ in {
|
||||
./seafile.nix
|
||||
./ssh.nix
|
||||
./sshd.nix
|
||||
./sound.nix
|
||||
./sudo.nix
|
||||
./nsxiv.nix
|
||||
./themes.nix
|
||||
./tmux.nix
|
||||
./traadfri.nix
|
||||
# ./traadfri.nix
|
||||
./unclutter.nix
|
||||
./vscode.nix
|
||||
./watson.nix
|
||||
./zsh.nix
|
||||
./tor.nix
|
||||
./mastodon-bot.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
cat > shell.nix <<'EOF'
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.mkShell {
|
||||
buildInputs = [];
|
||||
packages = [];
|
||||
}
|
||||
EOF
|
||||
''${EDITOR:-vim} shell.nix
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
...
|
||||
}: let
|
||||
inherit (import <niveum/lib>) defaultApplications;
|
||||
flameshot-once =
|
||||
pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
|
||||
flameshot-once = pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
(flameshot-once.override {
|
||||
name = "flameshot-once-kmein";
|
||||
config = {
|
||||
imgur = {
|
||||
enable = true;
|
||||
@@ -16,29 +16,36 @@ in {
|
||||
deleteUrl = "http://p.r/image/delete/%1";
|
||||
xdg-open.browser = (defaultApplications pkgs).browser;
|
||||
};
|
||||
timeout = 1000;
|
||||
drawColor = "#ff0000";
|
||||
drawThickness = 2;
|
||||
showDesktopNotification = true;
|
||||
buttons = [
|
||||
"ARROW"
|
||||
"BLUR"
|
||||
"CIRCLE"
|
||||
"CIRCLECOUNT"
|
||||
"COPY"
|
||||
"DRAWER"
|
||||
"EXIT"
|
||||
"IMAGEUPLOADER"
|
||||
"MARKER"
|
||||
"MOVESELECTION"
|
||||
"PENCIL"
|
||||
"RECTANGLE"
|
||||
"SAVE"
|
||||
"SELECTION"
|
||||
"SELECTIONINDICATOR"
|
||||
"TEXT"
|
||||
"UNDO"
|
||||
];
|
||||
settings.General = {
|
||||
autoCloseIdleDaemon = true;
|
||||
drawColor = "#ff0000";
|
||||
drawThickness = 2;
|
||||
checkForUpdates = false;
|
||||
showDesktopNotification = true;
|
||||
disabledTrayIcon = true;
|
||||
showHelp = false;
|
||||
squareMagnifier = true;
|
||||
uploadWithoutConfirmation = true;
|
||||
buttons = [
|
||||
"TYPE_ARROW"
|
||||
"TYPE_CIRCLE"
|
||||
"TYPE_CIRCLECOUNT"
|
||||
"TYPE_COPY"
|
||||
"TYPE_DRAWER"
|
||||
"TYPE_EXIT"
|
||||
"TYPE_IMAGEUPLOADER"
|
||||
"TYPE_MARKER"
|
||||
"TYPE_MOVESELECTION"
|
||||
"TYPE_PENCIL"
|
||||
"TYPE_PIXELATE"
|
||||
"TYPE_RECTANGLE"
|
||||
"TYPE_SAVE"
|
||||
"TYPE_SELECTION"
|
||||
# "TYPE_SELECTIONINDICATOR"
|
||||
"TYPE_TEXT"
|
||||
"TYPE_UNDO"
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
@@ -74,7 +74,7 @@ in {
|
||||
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
|
||||
|
||||
${pkgs.dmenu}/bin/dmenu -i -p flix -l 5 "$@" < ${cacheLocation}/${indexFilename} \
|
||||
| ${pkgs.findutils}/bin/xargs -I '{}' ${pkgs.utillinux}/bin/setsid ${pkgs.xdg_utils}/bin/xdg-open '{}'
|
||||
| ${pkgs.findutils}/bin/xargs -I '{}' ${pkgs.util-linux}/bin/setsid ${pkgs.xdg-utils}/bin/xdg-open '{}'
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
egyptianHiero = zip-font "EgyptianHiero" {
|
||||
url = "https://github.com/MKilani/Djehuty/archive/master.zip";
|
||||
sha256 = "0xaq16ysvxrkcn3264wkmm2ln0hpijpk4iq1n5i7d9gqhjhsav1x";
|
||||
sha256 = "sha256-KbY4vedm757NWfDlgmNhslbZd+2Vs+o5PjtMMGDt61Y=";
|
||||
};
|
||||
antinoou = zip-font "Antinoou" {
|
||||
url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip";
|
||||
@@ -107,5 +107,17 @@ in {
|
||||
sansSerif = ["Noto Sans Display" "Noto Kufi Arabic" "Noto Sans Devanagari" "Noto Sans CJK JP"];
|
||||
emoji = ["Noto Color Emoji"];
|
||||
};
|
||||
# xelatex fails with woff files
|
||||
# ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other
|
||||
fontconfig.localConf = ''
|
||||
<fontconfig>
|
||||
<!-- Reject WOFF fonts We don't register WOFF(2) fonts with fontconfig because of the W3C spec -->
|
||||
<selectfont>
|
||||
<rejectfont>
|
||||
<glob>*.woff*</glob>
|
||||
</rejectfont>
|
||||
</selectfont>
|
||||
</fontconfig>
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,18 +5,19 @@
|
||||
}: {
|
||||
environment = {
|
||||
systemPackages = [pkgs.fzf];
|
||||
variables = {
|
||||
variables = rec {
|
||||
FZF_DEFAULT_COMMAND = "${pkgs.fd}/bin/fd --type f --strip-cwd-prefix --follow --no-ignore-vcs --exclude .git";
|
||||
FZF_DEFAULT_OPTS =
|
||||
lib.escapeShellArgs ["--height=40%" "--layout=reverse"];
|
||||
lib.escapeShellArgs ["--height=40%"];
|
||||
FZF_ALT_C_COMMAND = "${pkgs.fd}/bin/fd --type d";
|
||||
FZF_ALT_C_OPTS = lib.escapeShellArgs [
|
||||
"--preview='${pkgs.tree}/bin/tree -L 1 \"{}\"'"
|
||||
"--bind=space:toggle-preview"
|
||||
"--preview-window=hidden"
|
||||
];
|
||||
FZF_CTRL_T_COMMAND = "${pkgs.fd}/bin/fd --type f";
|
||||
FZF_CTRL_T_COMMAND = FZF_DEFAULT_COMMAND;
|
||||
FZF_CTRL_T_OPTS =
|
||||
lib.escapeShellArgs ["--preview='${pkgs.bat}/bin/bat \"{}\"'"];
|
||||
lib.escapeShellArgs ["--preview='head -$LINES {}'"];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ in {
|
||||
environment.systemPackages = [
|
||||
pkgs.mr
|
||||
pkgs.git
|
||||
pkgs.git-crypt
|
||||
pkgs.gitAndTools.gitflow
|
||||
pkgs.gitAndTools.gh
|
||||
pkgs.gitAndTools.git-extras
|
||||
|
||||
@@ -65,31 +65,16 @@ in {
|
||||
systemd.services.hu-vpn = {
|
||||
enable = true;
|
||||
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
|
||||
username = ${eduroam.identity}
|
||||
password = ${eduroam.password}
|
||||
''
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.openvpn-hu-berlin.conflicts = ["hu-vpn.service"];
|
||||
|
||||
services.openvpn.servers.hu-berlin = {
|
||||
autoStart = false;
|
||||
authUserPass = {
|
||||
username = eduroam.identity;
|
||||
password = eduroam.password;
|
||||
};
|
||||
config = fileContents (pkgs.fetchurl {
|
||||
url = "https://www.cms.hu-berlin.de/de/dl/netze/vpn/openvpn/hu-berlin.ovpn";
|
||||
sha256 = "15b55aibik5460svjq2gwxrcyh6ay4k8savd6cd5lncgndmd8p8h";
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,6 +14,15 @@
|
||||
| ${pkgs.coreutils}/bin/tail --lines=1 \
|
||||
| ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'
|
||||
'';
|
||||
# "envs.sh host" = pkgs.writers.writeDash "envs-host" ''
|
||||
# ${pkgs.curl}/bin/curl -F "file=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
|
||||
# '';
|
||||
"envs.sh mirror" = pkgs.writers.writeDash "envs-mirror" ''
|
||||
${pkgs.curl}/bin/curl -F "url=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
|
||||
'';
|
||||
"envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" ''
|
||||
${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
|
||||
'';
|
||||
"ix.io" = pkgs.writers.writeDash "ix.io" ''
|
||||
${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io
|
||||
'';
|
||||
@@ -32,10 +41,6 @@
|
||||
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||
${scripts.betacode}/bin/betacode
|
||||
'';
|
||||
"devanagari" = pkgs.writers.writeDash "devanagari" ''
|
||||
${scripts.devanagari}/bin/devanagari
|
||||
'';
|
||||
"avesta" = pkgs.writeScript "avesta" (builtins.readFile <niveum/packages/scripts/avesta.sed>);
|
||||
"curl" = pkgs.writers.writeDash "curl" ''
|
||||
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
||||
'';
|
||||
@@ -56,7 +61,6 @@ in {
|
||||
displayManager.defaultSession = "none+i3";
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-gaps;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -96,6 +100,10 @@ in {
|
||||
criteria = {class = "fzfmenu";};
|
||||
command = "floating enable";
|
||||
}
|
||||
{
|
||||
criteria = {class = ".*";};
|
||||
command = "border pixel 2";
|
||||
}
|
||||
{
|
||||
criteria = {class = "mpv";};
|
||||
command = lib.strings.concatStringsSep ", " [
|
||||
@@ -108,7 +116,6 @@ in {
|
||||
}
|
||||
];
|
||||
};
|
||||
gaps.inner = 4;
|
||||
floating = {
|
||||
titlebar = false;
|
||||
border = 1;
|
||||
@@ -122,9 +129,9 @@ in {
|
||||
focused =
|
||||
scheme
|
||||
// {
|
||||
border = colours.cyan.bright;
|
||||
indicator = colours.cyan.bright;
|
||||
childBorder = colours.cyan.bright;
|
||||
border = colours.blue.bright;
|
||||
indicator = colours.blue.bright;
|
||||
childBorder = colours.blue.bright;
|
||||
};
|
||||
unfocused =
|
||||
scheme
|
||||
@@ -197,10 +204,10 @@ in {
|
||||
|
||||
"${modifier}+Shift+b" = "move window to workspace prev";
|
||||
"${modifier}+Shift+n" = "move window to workspace next";
|
||||
"${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}";
|
||||
"${modifier}+Shift+x" = "exec ${move-to-new-workspace}";
|
||||
"${modifier}+b" = "workspace prev";
|
||||
"${modifier}+n" = "workspace next";
|
||||
"${modifier}+x" = "exec --no-startup-id ${new-workspace}";
|
||||
"${modifier}+x" = "exec ${new-workspace}";
|
||||
|
||||
"${modifier}+Shift+c" = "reload";
|
||||
"${modifier}+Shift+q" = "kill";
|
||||
@@ -231,7 +238,7 @@ in {
|
||||
"${modifier}+0" = "exec ${scripts.menu-calc}/bin/=";
|
||||
|
||||
"${modifier}+Shift+w" = "exec ${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}+d" = "exec ${pkgs.writers.writeDash "run" ''exec rofi -modi run,ssh,window -show run''}";
|
||||
"${modifier}+Shift+d" = "exec ${
|
||||
pkgs.writers.writeDash "notemenu" ''
|
||||
set -efu
|
||||
@@ -247,11 +254,12 @@ in {
|
||||
} | rofi -dmenu -i -p 'notes')
|
||||
if test "$note_file"
|
||||
then
|
||||
i3-sensible-terminal -e "$EDITOR" "$note_file"
|
||||
alacritty --working-directory ~/notes -e "$EDITOR" "$note_file"
|
||||
fi
|
||||
''
|
||||
}";
|
||||
"${modifier}+p" = "exec --no-startup-id ${pkgs.rofi-pass}/bin/rofi-pass";
|
||||
"${modifier}+p" = "exec rofi-pass";
|
||||
"${modifier}+Shift+p" = "exec rofi-pass --insert";
|
||||
"${modifier}+u" = "exec ${scripts.unicodmenu}/bin/unicodmenu";
|
||||
|
||||
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
|
||||
@@ -262,15 +270,15 @@ in {
|
||||
"${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";
|
||||
"${modifier}+F12" = "exec ${klem}/bin/klem";
|
||||
"Print" = "exec flameshot-once";
|
||||
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
|
||||
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
|
||||
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
|
||||
"XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 5";
|
||||
"XF86AudioMute" = "exec ${pkgs.pamixer}/bin/pamixer -t";
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer -i 5";
|
||||
"XF86Calculator" = "exec ${pkgs.st}/bin/st -c floating -e ${pkgs.bc}/bin/bc";
|
||||
"XF86AudioPause" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl pause";
|
||||
"XF86AudioPlay" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioNext" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioPrev" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioStop" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl stop";
|
||||
"XF86AudioPause" = "exec ${pkgs.playerctl}/bin/playerctl pause";
|
||||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
|
||||
"XF86ScreenSaver" = "exec ${scripts.k-lock}/bin/k-lock";
|
||||
|
||||
"XF86Display" = "exec ${scripts.dmenurandr}/bin/dmenurandr";
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
gr = "polytonic";
|
||||
ru = "phonetic";
|
||||
ara = "buckwalter";
|
||||
cop = "";
|
||||
ave = "";
|
||||
"in" = "san-kagapa";
|
||||
il = "phonetic";
|
||||
};
|
||||
defaultLanguage = "de";
|
||||
in {
|
||||
@@ -19,9 +23,30 @@ in {
|
||||
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
|
||||
# buckwalter: http://www.qamus.org/transliteration.htm
|
||||
xkbVariant = "T3";
|
||||
xkbOptions =
|
||||
commaSep xkbOptions;
|
||||
xkbOptions = commaSep xkbOptions;
|
||||
libinput.enable = true;
|
||||
xkbDir = pkgs.symlinkJoin {
|
||||
name = "x-keyboard-directory";
|
||||
paths = [
|
||||
"${pkgs.xkeyboard_config}/etc/X11/xkb"
|
||||
(pkgs.linkFarm "custom-x-keyboards" [
|
||||
{
|
||||
name = "symbols/cop";
|
||||
path = pkgs.fetchurl {
|
||||
url = "http://www.moheb.de/download/cop";
|
||||
sha256 = "1l0h6aq536hyinrh0i0ia355y229bjrlibii0sya5bmqh46vycia";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "symbols/ave";
|
||||
path = pkgs.fetchurl {
|
||||
url = "https://blog.simos.info/wp-content/uploads/2010/06/avestan.txt";
|
||||
sha256 = "192zmmm3gxyhim39dsax7r87gsay2w5v2xkhwmvsfipjb60hwp5g";
|
||||
};
|
||||
}
|
||||
])
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
console.keyMap = "de";
|
||||
|
||||
19
configs/mastodon-bot.nix
Normal file
19
configs/mastodon-bot.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{pkgs, ...}: {
|
||||
systemd.services.imaginary-illuminations = {
|
||||
enable = false;
|
||||
wants = ["network-online.target"];
|
||||
serviceConfig = {
|
||||
User = "kfm";
|
||||
Group = "users";
|
||||
WorkingDirectory = "/home/kfm/cloud/Seafile/Documents/Media/imaginary-illuminations";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "15s";
|
||||
};
|
||||
startAt = "7:00";
|
||||
script = ''
|
||||
${pkgs.deno}/bin/deno run -A post.ts
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.timers.imaginary-illuminations.timerConfig.RandomizedDelaySec = "14h";
|
||||
}
|
||||
@@ -10,15 +10,15 @@
|
||||
"image/jpeg" = "nsxiv.desktop";
|
||||
"image/png" = "nsxiv.desktop";
|
||||
"image/vnd.djvu+multipage" = "org.pwmt.zathura.desktop";
|
||||
"text/html" = "brave-browser.desktop";
|
||||
"text/html" = "firefox.desktop";
|
||||
"text/markdown" = "nvim.desktop";
|
||||
"text/plain" = "nvim.desktop";
|
||||
"x-scheme-handler/about" = "brave-browser.desktop";
|
||||
"x-scheme-handler/http" = "brave-browser.desktop";
|
||||
"x-scheme-handler/https" = "brave-browser.desktop";
|
||||
"x-scheme-handler/mailto" = "brave-browser.desktop";
|
||||
"x-scheme-handler/unknown" = "brave-browser.desktop";
|
||||
"x-scheme-handler/webcal" = "brave-browser.desktop";
|
||||
"x-scheme-handler/about" = "firefox.desktop";
|
||||
"x-scheme-handler/http" = "firefox.desktop";
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
"x-scheme-handler/mailto" = "firefox.desktop";
|
||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||
"x-scheme-handler/webcal" = "firefox.desktop";
|
||||
"inode/directory" = "pcmanfm.desktop";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
nginx.enable = false;
|
||||
node = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
enabledCollectors = [
|
||||
"conntrack"
|
||||
"diskstats"
|
||||
@@ -38,8 +39,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [config.services.prometheus.exporters.node.port];
|
||||
|
||||
systemd.services.promtail = {
|
||||
description = "Promtail service for Loki";
|
||||
wantedBy = ["multi-user.target"];
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
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.nsxiv}/bin/nsxiv %s ;
|
||||
video/*; ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput
|
||||
video/*; ${pkgs.util-linux}/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;
|
||||
|
||||
@@ -44,12 +44,14 @@
|
||||
vim-repeat
|
||||
vim-sensible
|
||||
vim-surround
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-dim-1.1.0";
|
||||
(pkgs.vimUtils.buildVimPlugin rec {
|
||||
pname = "vim-dim";
|
||||
version = "1.1.0";
|
||||
name = "${pname}-${version}";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jeffkreeftmeijer";
|
||||
repo = "vim-dim";
|
||||
rev = "1.1.0";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-lyTZUgqUEEJRrzGo1FD8/t8KBioPrtB3MmGvPeEVI/g=";
|
||||
};
|
||||
})
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
browser ${linkhandler}
|
||||
macro , open-in-browser
|
||||
macro c set browser "${pkgs.xsel}/bin/xsel -b <<<" ; open-in-browser ; set browser ${linkhandler}
|
||||
macro v set browser "${pkgs.utillinux}/bin/setsid -f ${pkgs.mpv}/bin/mpv" ; open-in-browser ; set browser ${linkhandler}
|
||||
macro v set browser "${pkgs.util-linux}/bin/setsid -f ${pkgs.mpv}/bin/mpv" ; open-in-browser ; set browser ${linkhandler}
|
||||
macro y set browser "${youtube-download}" ; open-in-browser ; set browser ${linkhandler}
|
||||
|
||||
bind-key j down
|
||||
@@ -86,16 +86,15 @@
|
||||
color listfocus blue default
|
||||
color listfocus_unread blue default bold
|
||||
color info red default bold
|
||||
|
||||
urls-source "miniflux"
|
||||
miniflux-url "https://feed.kmein.de"
|
||||
miniflux-login "kfm"
|
||||
miniflux-password "${lib.strings.fileContents <secrets/miniflux/password>}"
|
||||
'';
|
||||
|
||||
newsboat-sql = "${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db";
|
||||
in {
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
newsboat = pkgs.writers.writeDashBin "newsboat" ''
|
||||
${pkgs.newsboat}/bin/newsboat -C ${newsboat-config} -c ${newsboat-home}/cache.db -u ${newsboat-home}/urls "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.newsboat
|
||||
(pkgs.writers.writeDashBin "newsboat-unread-count" ''
|
||||
|
||||
@@ -9,16 +9,5 @@
|
||||
nix = {
|
||||
package = pkgs.nixUnstable;
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
settings = {
|
||||
substituters = [
|
||||
"http://cache.prism.r"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.prism-1:+S+6Lo/n27XEtvdlQKuJIcb1yO5NUqUCE2lolmTgNJU="
|
||||
"cache.prism-2:YwmCm3/s/D+SxrPKN/ETjlpw/219pNUbpnluatp6FKI="
|
||||
"hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
|
||||
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {utillinux = pkgs.util-linux;};
|
||||
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
|
||||
menstruation = pkgs.callPackage <menstruation-backend> {};
|
||||
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
|
||||
@@ -74,7 +74,7 @@ in {
|
||||
dnsutils
|
||||
# FILE MANAGERS
|
||||
lf
|
||||
pcmanfm
|
||||
cinnamon.nemo
|
||||
# MEDIA
|
||||
ffmpeg
|
||||
imagemagick
|
||||
@@ -103,9 +103,9 @@ in {
|
||||
pup # html toolkit
|
||||
htmlq
|
||||
xsv # csv toolkit
|
||||
xmlstarlet # xml toolkit
|
||||
fq # toolkit for yaml, xml and binaries
|
||||
man-pages
|
||||
posix_man_pages
|
||||
man-pages-posix
|
||||
tree
|
||||
exfat # to mount windows drives
|
||||
parallel # for parallel, since moreutils shadows task spooler
|
||||
@@ -134,7 +134,6 @@ in {
|
||||
pdftk # pdf toolkit
|
||||
mupdf
|
||||
poppler_utils # pdf toolkit
|
||||
foxitreader # for viewing pdf annotations
|
||||
okular # the word is nucular
|
||||
xournalpp # for annotating pdfs
|
||||
pdfpc # presenter console for pdf slides
|
||||
@@ -143,6 +142,7 @@ in {
|
||||
espeak
|
||||
bc # calculator
|
||||
pari # gp -- better calculator
|
||||
rink # unit converter
|
||||
scripts.auc
|
||||
scripts.stackoverflow
|
||||
scripts.infschmv
|
||||
@@ -184,6 +184,8 @@ in {
|
||||
scripts.trans
|
||||
scripts.mpv-radio
|
||||
# kmein.slide
|
||||
termdown
|
||||
scripts.alarm
|
||||
scripts.tolino-screensaver
|
||||
scripts.rfc
|
||||
scripts.tag
|
||||
@@ -235,7 +237,7 @@ in {
|
||||
py.pygments
|
||||
py.schema
|
||||
]))
|
||||
python3Packages.poetry
|
||||
# python3Packages.poetry
|
||||
|
||||
html-tidy
|
||||
nodePackages.csslint
|
||||
@@ -243,6 +245,7 @@ in {
|
||||
nodePackages.prettier
|
||||
nodePackages.typescript
|
||||
nodePackages.yarn
|
||||
deno # better node.js
|
||||
nodejs
|
||||
nodePackages.javascript-typescript-langserver
|
||||
texlive.combined.scheme-full
|
||||
|
||||
@@ -4,8 +4,13 @@
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
<niveum/modules/retiolum.nix>
|
||||
<retiolum/modules/retiolum>
|
||||
];
|
||||
|
||||
networking.hosts = {"42:0:ca48:f98f:63d7:31ce:922b:245d" = ["go"];};
|
||||
|
||||
services.tinc.networks.retiolum = {
|
||||
rsaPrivateKeyFile = toString <system-secrets/retiolum.key>;
|
||||
ed25519PrivateKeyFile = toString <system-secrets/retiolum.ed25519>;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,5 +9,18 @@ in {
|
||||
enable = true;
|
||||
font = "Monospace 10";
|
||||
theme = "${pkgs.rofi}/share/rofi/themes/Arc.rasi";
|
||||
pass = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
_pwgen() {
|
||||
${pkgs.genpass}/bin/genpass "$@"
|
||||
}
|
||||
|
||||
USERNAME_field='login'
|
||||
default_user2=kmein
|
||||
help_color="#FF0000"
|
||||
''; # help_color set by https://github.com/mrossinek/dotfiles/commit/13fc5f24caa78c8f20547bf473266879507f13bf
|
||||
};
|
||||
plugins = [pkgs.rofi-calc];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,4 +7,10 @@
|
||||
fonts.fontconfig.enable = false;
|
||||
nix.gc.automatic = true;
|
||||
nix.optimise.automatic = true;
|
||||
services.journald.extraConfig = "SystemMaxUse=500M";
|
||||
# https://webzine.snowflake.ovh/issue-001.html -- garbage collect when less then 1 GB is available, make 3 GB fee
|
||||
nix.extraOptions = ''
|
||||
min-free = 1073741824
|
||||
max-free = 3221225472
|
||||
'';
|
||||
}
|
||||
|
||||
45
configs/sound.nix
Normal file
45
configs/sound.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{pkgs, ...}: {
|
||||
sound.enable = true;
|
||||
|
||||
# realtime audio for pulseaudio
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = false;
|
||||
systemWide = false;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
# 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"
|
||||
]
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
users.users.me.extraGroups = ["pipewire" "audio"];
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.pavucontrol
|
||||
pkgs.ncpamixer
|
||||
pkgs.pamixer
|
||||
pkgs.pulsemixer
|
||||
pkgs.pulseaudio # for pactl
|
||||
];
|
||||
}
|
||||
@@ -49,6 +49,11 @@ in {
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
};
|
||||
tabula = {
|
||||
hostname = "tabula.r";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
};
|
||||
manakish = {
|
||||
hostname = "manakish.r";
|
||||
user = "kfm";
|
||||
|
||||
@@ -295,7 +295,7 @@ in {
|
||||
// dictionaries.englishGerman));
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.goldendict
|
||||
# pkgs.goldendict
|
||||
(makeStardict "lsj" dictionaries.classics)
|
||||
(makeStardict "sa" dictionaries.sanskrit)
|
||||
(makeStardict "oed" dictionaries.oed)
|
||||
|
||||
35
configs/telegram-bots/celan.nix
Normal file
35
configs/telegram-bots/celan.nix
Normal 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-celan.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";
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -22,6 +22,7 @@ in {
|
||||
./smyth.nix
|
||||
./nachtischsatan.nix
|
||||
./tlg-wotd.nix
|
||||
./celan.nix
|
||||
<niveum/modules/telegram-bot.nix>
|
||||
];
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}: {
|
||||
niveum.telegramBots.smyth = {
|
||||
enable = true;
|
||||
time = "06/6:00";
|
||||
time = "08:00";
|
||||
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||
chatIds = ["@HerbertWeirSmyth"];
|
||||
command = toString (pkgs.writers.writeDash "random-smyth" ''
|
||||
@@ -25,7 +25,7 @@
|
||||
'');
|
||||
};
|
||||
|
||||
systemd.timers.telegram-bot-smyth.timerConfig.RandomizedDelaySec = "3h";
|
||||
systemd.timers.telegram-bot-smyth.timerConfig.RandomizedDelaySec = "10h";
|
||||
|
||||
niveum.passport.services = [
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
${pkgs.curl}/bin/curl -sSL http://stephanus.tlg.uci.edu/Iris/Wotd \
|
||||
| ${pkgs.recode}/bin/recode html..utf8 \
|
||||
| ${pkgs.jq}/bin/jq -r '
|
||||
"*\(.word)* '\'''\(.definition | rtrimstr(" "))'\'''\n\nFirst occurrence: \(.firstOccurrence)\nNumber of occurrences: \(.totalOccurrences)"
|
||||
"*\(.word)* '\'''\(.definition | sub("<.*>"; "") | rtrimstr(" "))'\'''\n\nFirst occurrence: \(.firstOccurrence)\nNumber of occurrences: \(.totalOccurrences)"
|
||||
'
|
||||
'');
|
||||
parseMode = "Markdown";
|
||||
|
||||
@@ -7,6 +7,15 @@
|
||||
# nothing to see here
|
||||
'';
|
||||
|
||||
environment.systemPackages = [pkgs.atuin];
|
||||
environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" ''
|
||||
auto_sync = true
|
||||
update_check = false
|
||||
sync_address = "http://zaatar.r:8888"
|
||||
sync_frequency = 0
|
||||
style = "compact"
|
||||
'');
|
||||
|
||||
programs.zsh = let
|
||||
zsh-completions = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
@@ -14,12 +23,6 @@
|
||||
rev = "cf565254e26bb7ce03f51889e9a29953b955b1fb";
|
||||
sha256 = "1yf4rz99acdsiy0y1v3bm65xvs2m0sl92ysz0rnnrlbd5amn283l";
|
||||
};
|
||||
zsh-history-substring-search = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-history-substring-search";
|
||||
rev = "aae3388491c2312c4efb2e86bcb999927bb2900e";
|
||||
sha256 = "0lgmq1xcccnz5cf7vl0r0qj351hwclx9p80cl0qczxry4r2g5qaz";
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
@@ -54,12 +57,6 @@
|
||||
autoload -U zmv run-help
|
||||
|
||||
fpath=(${zsh-completions}/src $fpath)
|
||||
source ${zsh-history-substring-search}/zsh-history-substring-search.zsh
|
||||
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
bindkey -M vicmd 'k' history-substring-search-up
|
||||
bindkey -M vicmd 'j' history-substring-search-down
|
||||
'';
|
||||
promptInit = with config.niveum; ''
|
||||
autoload -Uz vcs_info
|
||||
@@ -71,6 +68,13 @@
|
||||
zstyle ':vcs_info:*' formats "%c%u%F{cyan}%b%f"
|
||||
zstyle ':vcs_info:*' actionformats "(%a) %c%u%F{cyan}%b%f"
|
||||
|
||||
# atuin distributed shell history
|
||||
export ATUIN_NOBIND="true" # disable all keybdinings of atuin
|
||||
eval "$(atuin init zsh)"
|
||||
bindkey '^r' _atuin_search_widget # bind ctrl+r to atuin
|
||||
# use zsh only session history
|
||||
fc -p
|
||||
|
||||
precmd () {
|
||||
vcs_info
|
||||
RPROMPT="$vcs_info_msg_0_"
|
||||
|
||||
101
flake.lock
generated
101
flake.lock
generated
@@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -23,11 +23,11 @@
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1663932797,
|
||||
"narHash": "sha256-IH8ZBW99W2k7wKLS+Sat9HiKX1TPZjFTnsPizK5crok=",
|
||||
"lastModified": 1675371293,
|
||||
"narHash": "sha256-LrCjtrAXj/WJphhGEMnHgZs7oTsfOlvPfOjFTIvg39k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "de3758e31a3a1bc79d569f5deb5dac39791bf9b6",
|
||||
"rev": "d1c7730bb707bf8124d997952f7babd2a281ae68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -63,11 +63,11 @@
|
||||
"menstruation-backend": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1649545504,
|
||||
"narHash": "sha256-TVm3246ML7gWPeGm+bdb+Qo8o/7nve7sQ2hBdCZm3z8=",
|
||||
"lastModified": 1667816906,
|
||||
"narHash": "sha256-VdckYVSQZfqThPb06Y5TGSI+kkibgM/G9pH5SQHIybI=",
|
||||
"owner": "kmein",
|
||||
"repo": "menstruation.rs",
|
||||
"rev": "d9f3c6d53542fd7c7ed191e37cf4e342d4a47bcb",
|
||||
"rev": "95c495d453c35f20a6a5641a88a862c668404acf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -79,11 +79,11 @@
|
||||
"menstruation-telegram": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1634815642,
|
||||
"narHash": "sha256-q1OTMx5ayNu9ppHJBDUie/ow+BcA5DXnHEm11EY+C4E=",
|
||||
"lastModified": 1667816918,
|
||||
"narHash": "sha256-yQSl0iKqHm7qFLELY8e7OzRRdnqSBbzJmQIYgkXlJpQ=",
|
||||
"owner": "kmein",
|
||||
"repo": "menstruation-telegram",
|
||||
"rev": "a34555cf46f02157718b0565b5456348fff54181",
|
||||
"rev": "828872cf9c425442705a95019eceee397bc1c03f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -95,11 +95,11 @@
|
||||
"nix-writers": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1554228333,
|
||||
"narHash": "sha256-hG/PlcCvCQhNcU55NpHfATkyH9k6cZmO7uvBoJjasXU=",
|
||||
"lastModified": 1675197881,
|
||||
"narHash": "sha256-gYtduNF59yqv4BgW4fC+tZHKE7cpOkZf+Y34psyFO5U=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71",
|
||||
"revCount": 32,
|
||||
"rev": "d1424777b5f2e12cbd80efd1b55335dcba7c32bd",
|
||||
"revCount": 38,
|
||||
"type": "git",
|
||||
"url": "https://cgit.krebsco.de/nix-writers"
|
||||
},
|
||||
@@ -110,27 +110,27 @@
|
||||
},
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1663939948,
|
||||
"narHash": "sha256-tZROWStjk7aXbM6XTbspRb9dSk/4lw7EFBOrt2A09Ag=",
|
||||
"lastModified": 1675237434,
|
||||
"narHash": "sha256-YoFR0vyEa1HXufLNIFgOGhIFMRnY6aZ0IepZF5cYemo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7e27b838cd7ac90fed03d0d5a8487848c4b0b6d2",
|
||||
"rev": "285b3ff0660640575186a4086e1f8dc0df2874b5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-22.05",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1663850217,
|
||||
"narHash": "sha256-tp9nXo1/IdN/xN9m06ryy0QUAEfoN6K56ObM/1QTAjc=",
|
||||
"lastModified": 1675273418,
|
||||
"narHash": "sha256-tpYc4TEGvDzh9uRf44QemyQ4TpVuUbxb07b2P99XDbM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ae1dc133ea5f1538d035af41e5ddbc2ebcb67b90",
|
||||
"rev": "4d7c2644dbac9cf8282c0afe68fca8f0f3e7b2db",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -143,11 +143,11 @@
|
||||
"recht": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1619583518,
|
||||
"narHash": "sha256-3eFw6xWue9cvPxXq1ROq32ecvPOmqOedgQhyOr7N9iE=",
|
||||
"lastModified": 1669719044,
|
||||
"narHash": "sha256-WsLWlTM2Hrurj9kVajybIOavV9QPYiJweMCOQR6h+YI=",
|
||||
"owner": "kmein",
|
||||
"repo": "recht",
|
||||
"rev": "d551afed23122bb3106e59eb2274394ec5555048",
|
||||
"rev": "7c15b13328fb5cee01012c488ff235ee730cac70",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -157,19 +157,18 @@
|
||||
}
|
||||
},
|
||||
"retiolum": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1664019034,
|
||||
"narHash": "sha256-do31QxpQtmuWclx9yhM6UslVO7XdXofLbXZ4nr3fLJ0=",
|
||||
"owner": "krebs",
|
||||
"repo": "retiolum",
|
||||
"rev": "8d9b86a0ce503588bb34ae8676fdbcb0e4014119",
|
||||
"type": "github"
|
||||
"lastModified": 1675364416,
|
||||
"narHash": "sha256-u7kbHg/cp+GdW55B6V52GG0D9+zWOhmVI2nh/NiMxfw=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "ae5112af96361acc314e1d270d0c9281984fc517",
|
||||
"revCount": 280,
|
||||
"type": "git",
|
||||
"url": "https://git.thalheim.io/Mic92/retiolum"
|
||||
},
|
||||
"original": {
|
||||
"owner": "krebs",
|
||||
"repo": "retiolum",
|
||||
"type": "github"
|
||||
"type": "git",
|
||||
"url": "https://git.thalheim.io/Mic92/retiolum"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
@@ -195,11 +194,11 @@
|
||||
"scripts": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1662493500,
|
||||
"narHash": "sha256-EdAEKDQ6z7oinqQ28ELE3+taJ106DgmhNJt/rpqHJic=",
|
||||
"lastModified": 1675238486,
|
||||
"narHash": "sha256-Hs9NKK0UFaNqrui2VauBnMnV/14U3eNWaI12EmVYXWY=",
|
||||
"owner": "kmein",
|
||||
"repo": "scripts",
|
||||
"rev": "51c641ac3c1100d80313696663db70c2eb3698dc",
|
||||
"rev": "5cefa5f112e7fe54e0302b7bc33bc06e1f762002",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -211,17 +210,17 @@
|
||||
"stockholm": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663587256,
|
||||
"narHash": "sha256-tOwUL8UFP8H8FosYVp8WiPr0nIPhcbN79nNJJgD0cUU=",
|
||||
"lastModified": 1675564669,
|
||||
"narHash": "sha256-Fd4wBl9b5Aqt4ctH2vJu/oPvgTOHD+ME8MUEu3oR2tE=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "55957c6d6adb51d2079c117c1e7309c60ee0fe0f",
|
||||
"revCount": 10779,
|
||||
"rev": "e44fe862f0bedc658aabd1daafb16376f188857e",
|
||||
"revCount": 11353,
|
||||
"type": "git",
|
||||
"url": "https://cgit.lassul.us/stockholm"
|
||||
"url": "https://cgit.krebsco.de/stockholm"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://cgit.lassul.us/stockholm"
|
||||
"url": "https://cgit.krebsco.de/stockholm"
|
||||
}
|
||||
},
|
||||
"telebots": {
|
||||
@@ -243,11 +242,11 @@
|
||||
"tinc-graph": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663740920,
|
||||
"narHash": "sha256-F04wF/6KkzZZ1d8r3xOqkXg1IlBl32LaUBnBYjWUA1A=",
|
||||
"lastModified": 1666162569,
|
||||
"narHash": "sha256-7ebWs/ryDebUMONkn6dPckNnUGrEuPQScoY+O/+vo+Q=",
|
||||
"owner": "kmein",
|
||||
"repo": "tinc-graph",
|
||||
"rev": "78e7ed7acae6a3a29f537fdbf5db993a63b46fff",
|
||||
"rev": "72a4b305fcb49cfd6d456103cda45888a6b34bbe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -290,11 +289,11 @@
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
18
flake.nix
18
flake.nix
@@ -2,7 +2,7 @@
|
||||
description = "niveum: packages, modules, systems";
|
||||
|
||||
inputs = {
|
||||
nixos-stable.url = "github:NixOS/nixpkgs/nixos-22.05";
|
||||
nixos-stable.url = "github:NixOS/nixpkgs/nixos-22.11";
|
||||
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
@@ -15,6 +15,7 @@
|
||||
inputs.nixpkgs.follows = "nixos-stable";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
retiolum.url = "git+https://git.thalheim.io/Mic92/retiolum";
|
||||
|
||||
# legacy
|
||||
menstruation-backend = {
|
||||
@@ -33,16 +34,12 @@
|
||||
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";
|
||||
url = "git+https://cgit.krebsco.de/stockholm";
|
||||
flake = false;
|
||||
};
|
||||
telebots = {
|
||||
@@ -129,8 +126,8 @@
|
||||
nixos-unstable = github "NixOS/nixpkgs";
|
||||
nix-writers = "https://cgit.krebsco.de/nix-writers";
|
||||
recht = github "kmein/recht";
|
||||
retiolum = github "krebs/retiolum";
|
||||
stockholm = "https://cgit.lassul.us/stockholm";
|
||||
retiolum = "https://git.thalheim.io/Mic92/retiolum";
|
||||
stockholm = "https://cgit.krebsco.de/stockholm";
|
||||
scripts = github "kmein/scripts";
|
||||
telebots = github "kmein/telebots";
|
||||
tinc-graph = github "kmein/tinc-graph";
|
||||
@@ -168,13 +165,14 @@
|
||||
if externalNetwork ? name
|
||||
then externalNetwork.${name}
|
||||
else "${name}.r";
|
||||
unstable = name == "kabsa" || name == "manakish";
|
||||
unstable = false; # name == "kabsa" || name == "manakish";
|
||||
sources =
|
||||
["nix-writers" "nixpkgs" "retiolum" "stockholm"]
|
||||
++ {
|
||||
zaatar = ["traadfri"];
|
||||
zaatar = ["traadfri" "nixos-unstable"];
|
||||
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"];
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
bright = "#4b4b4b";
|
||||
dark = "#242424";
|
||||
bright = "#282c34";
|
||||
dark = "#282c34";
|
||||
};
|
||||
red = {
|
||||
bright = "#fc1c18";
|
||||
dark = "#d71c15";
|
||||
bright = "#e06c75";
|
||||
dark = "#e06c75";
|
||||
};
|
||||
green = {
|
||||
bright = "#6bc219";
|
||||
dark = "#5aa513";
|
||||
bright = "#98c379";
|
||||
dark = "#98c379";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#fec80e";
|
||||
dark = "#fdb40c";
|
||||
bright = "#e5c07b";
|
||||
dark = "#e5c07b";
|
||||
};
|
||||
blue = {
|
||||
bright = "#0955ff";
|
||||
dark = "#063b8c";
|
||||
bright = "#61afef";
|
||||
dark = "#61afef";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#fb0050";
|
||||
dark = "#e40038";
|
||||
bright = "#c678dd";
|
||||
dark = "#c678dd";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#3ea8fc";
|
||||
dark = "#2595e1";
|
||||
bright = "#56b6c2";
|
||||
dark = "#56b6c2";
|
||||
};
|
||||
white = {
|
||||
bright = "#8c00ec";
|
||||
dark = "#efefef";
|
||||
bright = "#dcdfe4";
|
||||
dark = "#dcdfe4";
|
||||
};
|
||||
background = "#181818";
|
||||
foreground = white.dark;
|
||||
cursor = "#bbbbbb";
|
||||
background = black.dark;
|
||||
foreground = white.bright;
|
||||
cursor = "#a3b3cc";
|
||||
}
|
||||
|
||||
37
lib/colours/owickstrom-light.nix
Normal file
37
lib/colours/owickstrom-light.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
bright = "#4b4b4b";
|
||||
dark = "#242424";
|
||||
};
|
||||
red = {
|
||||
bright = "#fc1c18";
|
||||
dark = "#d71c15";
|
||||
};
|
||||
green = {
|
||||
bright = "#6bc219";
|
||||
dark = "#5aa513";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#fec80e";
|
||||
dark = "#fdb40c";
|
||||
};
|
||||
blue = {
|
||||
bright = "#0955ff";
|
||||
dark = "#063b8c";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#fb0050";
|
||||
dark = "#e40038";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#3ea8fc";
|
||||
dark = "#2595e1";
|
||||
};
|
||||
white = {
|
||||
bright = "#8c00ec";
|
||||
dark = "#efefef";
|
||||
};
|
||||
background = white.dark;
|
||||
foreground = "#181818";
|
||||
cursor = "#bbbbbb";
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
rec {
|
||||
black = {
|
||||
bright = "#282c34";
|
||||
dark = "#282c34";
|
||||
};
|
||||
red = {
|
||||
bright = "#e06c75";
|
||||
dark = "#e06c75";
|
||||
};
|
||||
green = {
|
||||
bright = "#98c379";
|
||||
dark = "#98c379";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#e5c07b";
|
||||
dark = "#e5c07b";
|
||||
};
|
||||
blue = {
|
||||
bright = "#61afef";
|
||||
dark = "#61afef";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#c678dd";
|
||||
dark = "#c678dd";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#56b6c2";
|
||||
dark = "#56b6c2";
|
||||
};
|
||||
white = {
|
||||
bright = "#dcdfe4";
|
||||
dark = "#dcdfe4";
|
||||
};
|
||||
background = black.dark;
|
||||
foreground = white.bright;
|
||||
cursor = "#a3b3cc";
|
||||
}
|
||||
37
lib/colours/papercolor-dark.nix
Normal file
37
lib/colours/papercolor-dark.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
dark = "#1c1c1c";
|
||||
bright = "#585858";
|
||||
};
|
||||
red = {
|
||||
dark = "#af005f";
|
||||
bright = "#5faf5f";
|
||||
};
|
||||
green = {
|
||||
bright = "#afd700";
|
||||
dark = "#5faf00";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#af87d7";
|
||||
dark = "#d7af5f";
|
||||
};
|
||||
blue = {
|
||||
dark = "#5fafd7";
|
||||
bright = "#ffaf00";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#ff5faf";
|
||||
dark = "#808080";
|
||||
};
|
||||
cyan = {
|
||||
dark = "#d7875f";
|
||||
bright = "#00afaf";
|
||||
};
|
||||
white = {
|
||||
dark = "#d0d0d0";
|
||||
bright = "#5f8787";
|
||||
};
|
||||
background = black.dark;
|
||||
foreground = white.dark;
|
||||
cursor = blue.bright;
|
||||
}
|
||||
37
lib/colours/papercolor-light.nix
Normal file
37
lib/colours/papercolor-light.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
dark = "#eeeeee";
|
||||
bright = "#bcbcbc";
|
||||
};
|
||||
red = {
|
||||
dark = "#af0000";
|
||||
bright = "#d70000";
|
||||
};
|
||||
green = {
|
||||
dark = "#008700";
|
||||
bright = "#d70087";
|
||||
};
|
||||
yellow = {
|
||||
dark = "#5f8700";
|
||||
bright = "#8700af";
|
||||
};
|
||||
blue = {
|
||||
dark = "#0087af";
|
||||
bright = "#d75f00";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#878787";
|
||||
dark = "#d75f00";
|
||||
};
|
||||
cyan = {
|
||||
dark = "#005f87";
|
||||
bright = "#005faf";
|
||||
};
|
||||
white = {
|
||||
dark = "#444444";
|
||||
bright = "#005f87";
|
||||
};
|
||||
background = black.dark;
|
||||
foreground = white.dark;
|
||||
cursor = blue.bright;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
pkgs: rec {
|
||||
terminal = "alacritty";
|
||||
browser = "${pkgs.brave}/bin/brave";
|
||||
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
fileManager = "${pkgs.cinnamon.nemo}/bin/nemo";
|
||||
}
|
||||
|
||||
@@ -40,16 +40,16 @@ rec {
|
||||
|
||||
sshPort = 22022;
|
||||
|
||||
colours = import ./colours/ibm-3270.nix;
|
||||
colours = import ./colours/papercolor-dark.nix;
|
||||
|
||||
theme = pkgs: {
|
||||
gtk = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome3.gnome-themes-extra;
|
||||
package = pkgs.gnome.gnome-themes-extra;
|
||||
};
|
||||
icon = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.gnome3.adwaita-icon-theme;
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
};
|
||||
cursor = {
|
||||
name = "capitaine-cursors-white";
|
||||
|
||||
@@ -59,6 +59,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
uni-fsi = {
|
||||
user = "fsklassp";
|
||||
password = lib.strings.fileContents <secrets/mail/fsklassp>;
|
||||
address = "fsklassp@hu-berlin.de";
|
||||
imap = "mailbox.cms.hu-berlin.de";
|
||||
smtp = "mailhost.cms.hu-berlin.de";
|
||||
smtpSettings = smtp: "smtp://${smtp}";
|
||||
folders = {
|
||||
drafts = "Drafts";
|
||||
sent = "Sent";
|
||||
trash = "Trash";
|
||||
};
|
||||
};
|
||||
|
||||
work-fysi = rec {
|
||||
user = "kieran@fysi.tech";
|
||||
address = user;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
setsid = script:
|
||||
pkgs.writers.writeDash "setsid-command" ''
|
||||
${pkgs.utillinux}/bin/setsid ${script}
|
||||
${pkgs.util-linux}/bin/setsid ${script}
|
||||
'';
|
||||
|
||||
accounts = import <niveum/lib/email.nix> {inherit lib;};
|
||||
@@ -23,7 +23,7 @@ in {
|
||||
warning_fg = colours.yellow.bright;
|
||||
warning_bg = colours.background;
|
||||
alternating_tint_bg = colours.background;
|
||||
alternating_tint_fg = colours.background;
|
||||
alternating_tint_fg = colours.foreground;
|
||||
critical_bg = colours.background;
|
||||
good_bg = colours.background;
|
||||
idle_bg = colours.background;
|
||||
@@ -75,7 +75,7 @@ in {
|
||||
{
|
||||
block = "github";
|
||||
info = ["total"];
|
||||
warning = ["mention" "review_requested"];
|
||||
warning = ["mention" "review_requested" "team_mention" "manual" "invitation" "assign" "subscribed"];
|
||||
}
|
||||
{
|
||||
block = "custom";
|
||||
|
||||
@@ -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";
|
||||
|
||||
135
lib/streams.nix
135
lib/streams.nix
@@ -3,49 +3,49 @@
|
||||
# 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
|
||||
tags = {
|
||||
ambient = "🧘 Ambient";
|
||||
american = "🇺🇸 USA";
|
||||
amro = "👦 Amro";
|
||||
arabic = "🇱🇧 عربي";
|
||||
balkan = "🇧🇦 Balkan";
|
||||
berlin = "🐻 Berlin";
|
||||
brazilian = "🇧🇷 Brasil";
|
||||
chill = "🧊 Chill";
|
||||
chinese = "🇨🇳 中国";
|
||||
classical = "🎻 Classical";
|
||||
discover = "😲 Discover";
|
||||
danish = "🇩🇰 Dansk";
|
||||
dnb = "🥁 DnB";
|
||||
dubstep = "🎆 Dubstep";
|
||||
french = "🇫🇷 France";
|
||||
geschepper = "🤯 Geschepper";
|
||||
greek = "🇬🇷 Ελλάδα";
|
||||
greenlandic = "🇬🇱 Kalaallit Nunaat";
|
||||
groovy = "🕺 Groovy";
|
||||
holy = "⛪ Holy";
|
||||
indian = "🇮🇳 भारत";
|
||||
irie = "🇯🇲 Irie";
|
||||
irish = "🇮🇪 Éire";
|
||||
jazz = "🎷 Jazz";
|
||||
lofi = "✍ Lo-Fi";
|
||||
metal = "🤘 Metal";
|
||||
party = "🪩 Party";
|
||||
pop = "🎙 Pop";
|
||||
radiorecord = "⏺ Record";
|
||||
rap = "💸 Rap";
|
||||
rock = "🎸 Rock";
|
||||
russian = "🇷🇺 Россия";
|
||||
schlager = "💩 Schlager";
|
||||
soma = "🍄 σῶμα – सोमः";
|
||||
text = "📚 Text";
|
||||
top40 = "♻️ Top 40";
|
||||
trad = "👘 Trad";
|
||||
trance = "🎇 Trance";
|
||||
trap = "🪤 Trap";
|
||||
turkish = "🇹🇷 Türkiye";
|
||||
vintage = "🕰️ Vintage";
|
||||
wave = "🌊 WAVE";
|
||||
xmas = "🎅 Christmas";
|
||||
ambient = "ambient";
|
||||
american = "american";
|
||||
amro = "dj_amro";
|
||||
arabic = "arabi";
|
||||
balkan = "balkan";
|
||||
berlin = "berlin";
|
||||
brazilian = "brasil";
|
||||
chill = "chill";
|
||||
chinese = "china";
|
||||
classical = "classical";
|
||||
discover = "discover";
|
||||
danish = "denmark";
|
||||
dnb = "dnb";
|
||||
dubstep = "dubstep";
|
||||
french = "france";
|
||||
geschepper = "geschepper";
|
||||
greek = "greece";
|
||||
greenlandic = "greenland";
|
||||
groovy = "groovy";
|
||||
holy = "holy";
|
||||
indian = "india";
|
||||
irie = "jamaica";
|
||||
irish = "ireland";
|
||||
jazz = "jazz";
|
||||
lofi = "lofi";
|
||||
metal = "metal";
|
||||
party = "party";
|
||||
pop = "pop";
|
||||
radiorecord = "radiorecord";
|
||||
rap = "rap";
|
||||
rock = "rock";
|
||||
russian = "russia";
|
||||
schlager = "schlager";
|
||||
soma = "soma";
|
||||
text = "text";
|
||||
top40 = "top40";
|
||||
trad = "trad";
|
||||
trance = "trance";
|
||||
trap = "trap";
|
||||
turkish = "turkey";
|
||||
vintage = "vintage";
|
||||
wave = "wave";
|
||||
xmas = "xmas";
|
||||
};
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/blob/bc06c93905f60a82d6ebbb78f78cf289257860cc/lib/trivial.nix#L281-L282
|
||||
@@ -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];
|
||||
@@ -1593,11 +1593,32 @@ in
|
||||
logo = "https://cdn.radiofrance.fr/s3/cruiser-production/2019/01/3c4dc967-ed2c-4ce5-a998-9437a64e05d5/300x300_rapfr.jpg";
|
||||
tags = [tags.french tags.rap];
|
||||
}
|
||||
{
|
||||
station = "Radio Sunna";
|
||||
desc = "Sunnah of the Prophet";
|
||||
stream = "http://andromeda.shoutca.st:8189/stream";
|
||||
tags = [tags.arabic tags.text tags.holy];
|
||||
}
|
||||
{
|
||||
stream = "http://66.45.232.131:9994/;stream.mp3";
|
||||
station = "ERTU Al Quran Al Kareem";
|
||||
tags = [tags.arabic tags.text tags.holy];
|
||||
}
|
||||
{
|
||||
stream = "http://149.28.52.216:3344/listen.mp3";
|
||||
station = "Verse 24/7 Holy Quran";
|
||||
tags = [tags.arabic tags.text tags.holy];
|
||||
}
|
||||
{
|
||||
stream = "https://s6.voscast.com:9355/stream";
|
||||
station = "Kilid Herat";
|
||||
tags = [tags.arabic tags.holy]; # nasheeds
|
||||
}
|
||||
{
|
||||
stream = "https://s6.voscast.com:9355/stream";
|
||||
station = "Radio Salam Watandar";
|
||||
tags = [tags.arabic tags.holy];
|
||||
}
|
||||
{
|
||||
stream = "http://onair15.xdevel.com:7064/1/";
|
||||
station = "Radio Mozart Italia";
|
||||
@@ -1861,5 +1882,31 @@ http://ca.radioboss.fm:8149/stream
|
||||
Christian radio in all languages
|
||||
https://jesuscomingfm.com/#
|
||||
tamazight http://live.jesuscomingfm.com:8462/;
|
||||
|
||||
supposedly good Greek radio
|
||||
https://onairmediagroup.live24.gr/kralfm100xanthi
|
||||
|
||||
Somali Radio
|
||||
http://n0b.radiojar.com/1pu7hhf8kfhvv
|
||||
|
||||
Sanskrit
|
||||
https://stream-23.zeno.fm/m08mkwsyw8quv?zs=0w7MJFPdRfavhR_zPt0M2g
|
||||
https://divyavani.radioca.st/stream
|
||||
|
||||
Chillout from kassel
|
||||
https://server4.streamserver24.com:2199/tunein/ejanowsk.pls
|
||||
|
||||
Radio Mariam Arabic (Rome)
|
||||
http://www.dreamsiteradiocp4.com:8014/stream
|
||||
|
||||
https://radio.kamchatkalive.ru:8103/rock
|
||||
https://radio.kamchatkalive.ru:8103/chillout
|
||||
https://radio.kamchatkalive.ru:8103/dance
|
||||
|
||||
Fuṣḥā Stories (Bahrain Radio 102.3 FM)
|
||||
http://n02.radiojar.com/sxfbks1vfy8uv.mp3
|
||||
|
||||
Bahrain Quran Radio
|
||||
http://s2.voscast.com:12312/;
|
||||
*/
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ let g:netrw_altv=1 " open splits to the right
|
||||
let g:netrw_liststyle=3 " tree view
|
||||
let g:netrw_list_hide=netrw_gitignore#Hide()
|
||||
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
|
||||
let g:netrw_winsize = 25
|
||||
|
||||
call matchadd('colorcolumn', '\%101v', 100)
|
||||
highlight colorcolumn ctermbg=red
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./constants.nix
|
||||
./dropbox.nix
|
||||
./retiolum.nix
|
||||
];
|
||||
}
|
||||
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
|
||||
src = fetchgit {
|
||||
url = "https://github.com/jgm/pandoc";
|
||||
rev = pandoc.version;
|
||||
sha256 = "sha256-AY9GarrU7PBFgoYxqQkE2ghoUy7+0Gu6/Mwa+fdQM2U=";
|
||||
sha256 = "sha256-8mkHbHoXrkgcXZ/rYlVh2fhL12WjcTt97a1W+oYVYOs=";
|
||||
};
|
||||
buildPhase = ''
|
||||
mkdir -p $out/man/man1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
cmake,
|
||||
pkgconfig,
|
||||
pkg-config,
|
||||
libogg,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [libogg];
|
||||
|
||||
nativeBuildInputs = [cmake pkgconfig];
|
||||
nativeBuildInputs = [cmake pkg-config];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/fmang/opustags";
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/rofi-pass b/rofi-pass
|
||||
index 48928db..13682a5 100755
|
||||
--- a/rofi-pass
|
||||
+++ b/rofi-pass
|
||||
@@ -15,7 +15,7 @@ _image_viewer () {
|
||||
|
||||
# We expect to find these fields in pass(1)'s output
|
||||
URL_field='url'
|
||||
-USERNAME_field='user'
|
||||
+USERNAME_field='login'
|
||||
AUTOTYPE_field='autotype'
|
||||
OTPmethod_field='otp_method'
|
||||
31
packages/rusty-jeep.nix
Normal file
31
packages/rusty-jeep.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
pkg-config,
|
||||
alsa-lib,
|
||||
}:
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "rusty-jeep";
|
||||
version = "1.0.0";
|
||||
|
||||
src = let
|
||||
repo = fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "scripts";
|
||||
rev = "c8e80b34c08e427f83b6af19a361e8c0711a4e6c";
|
||||
sha256 = "18jlf9zkhni4jsvzrlkkllqvv5dkhjmilggcchbs32hr1km51q84";
|
||||
};
|
||||
in "${repo}/rusty-jeep";
|
||||
|
||||
nativeBuildInputs = [pkg-config];
|
||||
buildInputs = [alsa-lib];
|
||||
|
||||
cargoHash = "sha256-8qbYTqRk+4InJNX6xK95VxISamDb5KID+wbmUDJYJ94=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A beeping program inspired by K_belwagen";
|
||||
license = licenses.wtfpl;
|
||||
maintainers = [maintainers.kmein];
|
||||
};
|
||||
}
|
||||
@@ -33,6 +33,25 @@ in
|
||||
name = "instaget";
|
||||
};
|
||||
|
||||
alarm = let
|
||||
rusty-jeep = pkgs.callPackage ../rusty-jeep.nix {};
|
||||
in
|
||||
pkgs.writers.writeDashBin "alarm" ''
|
||||
export PATH=${lib.makeBinPath [pkgs.coreutils pkgs.bc rusty-jeep]}
|
||||
for i in `seq 8000 1000 10000`; do
|
||||
echo $i 100
|
||||
done | rusty-jeep
|
||||
echo 'if you heard that sound, then goto sleep..^_^'
|
||||
|
||||
echo sleep "$@"
|
||||
sleep "$@"
|
||||
|
||||
echo 'wake up!'
|
||||
while :; do
|
||||
echo $(echo "($(od -tu -An -N 2 /dev/urandom)%1000)+500"|bc) $(echo "($(od -tu -An -N 2 /dev/urandom)%500)+100"|bc)
|
||||
done | rusty-jeep 1
|
||||
'';
|
||||
|
||||
infschmv = pkgs.writers.writeDashBin "InfSchMV" ''
|
||||
${pkgs.curl}/bin/curl -sSL https://www.berlin.de/corona/massnahmen/verordnung/ \
|
||||
| ${pkgs.pup}/bin/pup .textile \
|
||||
@@ -308,7 +327,7 @@ in
|
||||
};
|
||||
|
||||
default-gateway = pkgs.writers.writeDashBin "default-gateway" ''
|
||||
${pkgs.iproute}/bin/ip -json route | ${pkgs.jq}/bin/jq --raw-output '.[0].gateway'
|
||||
${pkgs.iproute2}/bin/ip -json route | ${pkgs.jq}/bin/jq --raw-output '.[0].gateway'
|
||||
'';
|
||||
|
||||
betacode =
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
vimUtils,
|
||||
fetchFromGitHub,
|
||||
}: (vimUtils.buildVimPluginFrom2Nix {
|
||||
name = "cheat.sh-vim";
|
||||
pname = "cheat.sh-vim";
|
||||
version = "826219d1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "dbeniamine";
|
||||
repo = "cheat.sh-vim";
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
vimUtils,
|
||||
fetchFromGitHub,
|
||||
}: (vimUtils.buildVimPluginFrom2Nix {
|
||||
name = "icalendar.vim";
|
||||
pname = "icalendar.vim";
|
||||
version = "542fff45";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vim-scripts";
|
||||
repo = "icalendar.vim";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
vimUtils.buildVimPluginFrom2Nix {
|
||||
name = "jq.vim";
|
||||
pname = "jq.vim";
|
||||
version = "5baf8ed1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vito-c";
|
||||
repo = "jq.vim";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
vimUtils.buildVimPluginFrom2Nix {
|
||||
name = "vim-256noir";
|
||||
pname = "vim-256noir";
|
||||
version = "e8668a18";
|
||||
src = fetchFromGitHub {
|
||||
owner = "andreasvc";
|
||||
repo = "vim-256noir";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
vimUtils.buildVimPluginFrom2Nix rec {
|
||||
name = "vim-colors-paramount";
|
||||
pname = "vim-colors-paramount";
|
||||
version = "a5601d36";
|
||||
src = fetchFromGitHub {
|
||||
owner = "owickstrom";
|
||||
repo = "vim-colors-paramount";
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
vimUtils,
|
||||
fetchFromGitHub,
|
||||
}: (vimUtils.buildVimPluginFrom2Nix rec {
|
||||
name = "vim-fetch";
|
||||
pname = "vim-fetch";
|
||||
version = "76c08586";
|
||||
src = fetchFromGitHub {
|
||||
owner = "wsdjeg";
|
||||
repo = "vim-fetch";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
vimUtils.buildVimPluginFrom2Nix {
|
||||
name = "vim-fsharp";
|
||||
pname = "vim-fsharp";
|
||||
version = "627db7d7";
|
||||
src = fetchFromGitHub {
|
||||
owner = "fsharp";
|
||||
repo = "vim-fsharp";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
vimUtils.buildVimPluginFrom2Nix {
|
||||
name = "vim-mail";
|
||||
pname = "vim-mail";
|
||||
version = "acdbb5bd";
|
||||
src = fetchFromGitHub {
|
||||
owner = "dbeniamine";
|
||||
repo = "vim-mail";
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
vimUtils,
|
||||
fetchFromGitHub,
|
||||
}: (vimUtils.buildVimPluginFrom2Nix {
|
||||
name = "vim-reason-plus";
|
||||
pname = "vim-reason-plus";
|
||||
version = "c11a2940";
|
||||
src = fetchFromGitHub {
|
||||
owner = "reasonml-editor";
|
||||
repo = "vim-reason-plus";
|
||||
|
||||
@@ -13,7 +13,7 @@ in {
|
||||
<niveum/configs/save-space.nix>
|
||||
<niveum/configs/spacetime.nix>
|
||||
<niveum/configs/sshd.nix>
|
||||
<niveum/modules/retiolum.nix>
|
||||
<niveum/configs/retiolum.nix>
|
||||
];
|
||||
|
||||
nix.nixPath = ["/var/src"];
|
||||
@@ -45,4 +45,7 @@ in {
|
||||
users.users.root.passwordFile = toString <system-secrets/root.password>;
|
||||
|
||||
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
|
||||
|
||||
# since 22.05 timeout fails?
|
||||
systemd.services.systemd-networkd-wait-online.enable = false;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ in {
|
||||
max-jobs = 2;
|
||||
};
|
||||
|
||||
environment.systemPackages = [pkgs.minecraft];
|
||||
environment.systemPackages = [pkgs.minecraft pkgs.zeroad];
|
||||
|
||||
networking = {
|
||||
hostName = "kabsa";
|
||||
|
||||
@@ -10,10 +10,8 @@ in {
|
||||
./gitea.nix
|
||||
./hardware-configuration.nix
|
||||
./hedgedoc.nix
|
||||
./matterbridge.nix
|
||||
./menstruation.nix
|
||||
./moinbot.nix
|
||||
# ./horoscopy.nix
|
||||
./monitoring
|
||||
./moodle-dl-borsfaye.nix
|
||||
./names.nix
|
||||
@@ -22,6 +20,7 @@ in {
|
||||
./radio.nix
|
||||
./retiolum-map.nix
|
||||
./tarot.nix
|
||||
./tt-rss.nix
|
||||
./urlwatch.nix
|
||||
./weechat.nix
|
||||
<niveum/configs/monitoring.nix>
|
||||
@@ -29,8 +28,8 @@ in {
|
||||
<niveum/configs/save-space.nix>
|
||||
<niveum/configs/spacetime.nix>
|
||||
<niveum/configs/sshd.nix>
|
||||
<niveum/configs/retiolum.nix>
|
||||
<niveum/configs/telegram-bots>
|
||||
<niveum/modules/retiolum.nix>
|
||||
<niveum/modules/passport.nix>
|
||||
];
|
||||
|
||||
@@ -44,7 +43,7 @@ in {
|
||||
passwordFile = toString <secrets/restic/password>;
|
||||
paths = [
|
||||
"/var/lib/codimd"
|
||||
"/var/lib/postgresql"
|
||||
config.services.postgresqlBackup.location
|
||||
"/var/lib/weechat"
|
||||
"/var/lib/nextcloud"
|
||||
"/var/lib/grafana"
|
||||
|
||||
@@ -4,10 +4,12 @@ let
|
||||
in {
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
disableRegistration = true;
|
||||
rootUrl = domain;
|
||||
appName = "code.kmein.de";
|
||||
ssh.clonePort = sshPort;
|
||||
settings = {
|
||||
server.SSH_PORT = sshPort;
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."code.kmein.de" = {
|
||||
forceSSL = true;
|
||||
|
||||
@@ -27,7 +27,7 @@ in {
|
||||
|
||||
services.hedgedoc = {
|
||||
enable = true;
|
||||
configuration = {
|
||||
settings = {
|
||||
allowOrigin = [domain];
|
||||
allowAnonymous = true;
|
||||
allowGravatar = false;
|
||||
|
||||
@@ -4,7 +4,13 @@
|
||||
...
|
||||
}: let
|
||||
backend = pkgs.callPackage <menstruation-backend> {};
|
||||
telegram = pkgs.callPackage <menstruation-telegram> {};
|
||||
old-pkgs = import (pkgs.fetchFromGitHub {
|
||||
owner = "NixOs";
|
||||
repo = "nixpkgs";
|
||||
rev = "695b3515251873e0a7e2021add4bba643c56cde3";
|
||||
hash = "sha256-T86oFvcUIRwHWBWUt7WjaP4BP/3lDGbv5AppQSI1FkI=";
|
||||
}) {};
|
||||
telegram = old-pkgs.poetry2nix.mkPoetryApplication {projectDir = <menstruation-telegram>;};
|
||||
backendPort = 8000;
|
||||
in {
|
||||
services.redis.servers.menstruation = {
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
systemd.services.moinbot = {
|
||||
startAt = "7:00";
|
||||
script = ''
|
||||
echo moin | ${pkgs.ircaids}/bin/ircsink \
|
||||
--nick moinbot \
|
||||
greeting=$(echo "moin
|
||||
oi
|
||||
noim" | shuf -n1)
|
||||
echo "$greeting" | ${pkgs.ircaids}/bin/ircsink \
|
||||
--nick "$greeting""bot" \
|
||||
--server irc.hackint.org \
|
||||
--port 6697 \
|
||||
--secure \
|
||||
|
||||
@@ -10,21 +10,69 @@
|
||||
in {
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
domain = "grafana.kmein.r";
|
||||
port = 9444;
|
||||
addr = "127.0.0.1";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${config.services.grafana.domain} = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}";
|
||||
proxyWebsockets = true;
|
||||
settings = {
|
||||
server = {
|
||||
domain = "grafana.kmein.r";
|
||||
http_port = 9444;
|
||||
http_addr = "127.0.0.1";
|
||||
};
|
||||
smtp = let
|
||||
inherit (import <niveum/lib/email.nix> {inherit lib;}) cock;
|
||||
address = builtins.split "@" cock.user;
|
||||
in {
|
||||
enabled = true;
|
||||
from_address = cock.address;
|
||||
password = cock.password;
|
||||
user = cock.user;
|
||||
host = cock.smtpSettings cock.smtp;
|
||||
startTLS_policy = "MandatoryStartTLS";
|
||||
};
|
||||
dashboards.default_home_dashboard_path = toString ./grafana-dashboards/niveum.json;
|
||||
security = {
|
||||
admin_user = "admin";
|
||||
admin_password = lib.strings.fileContents <system-secrets/grafana/admin>;
|
||||
};
|
||||
};
|
||||
provision = {
|
||||
enable = true;
|
||||
dashboards.settings.providers = [
|
||||
{
|
||||
name = "dashboards";
|
||||
type = "file";
|
||||
options.path = ./grafana-dashboards;
|
||||
}
|
||||
];
|
||||
datasources.settings.datasources = builtins.fromJSON (builtins.readFile ./grafana-datasources.json);
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
${config.services.grafana.settings.server.domain} = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
${lib.removePrefix "http://" config.services.prometheus.alertmanager.webExternalUrl} = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.prometheus.alertmanager.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
${lib.removePrefix "http://" config.services.prometheus.webExternalUrl} = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus.webExternalUrl = "http://prometheus.kmein.r";
|
||||
|
||||
niveum.passport.services = [
|
||||
{
|
||||
title = "Prometheus";
|
||||
link = config.services.prometheus.webExternalUrl;
|
||||
description = "collects metrics from devices in the <i>niveum</i> network, blackbox monitors some websites.";
|
||||
}
|
||||
{
|
||||
@@ -33,11 +81,12 @@ in {
|
||||
}
|
||||
{
|
||||
title = "Grafana";
|
||||
link = "http://${config.services.grafana.domain}";
|
||||
link = "http://${config.services.grafana.settings.server.domain}";
|
||||
description = "displays metrics from devices in the <i>niveum</i> network.";
|
||||
}
|
||||
{
|
||||
title = "Alertmanager bot";
|
||||
title = "Alertmanager";
|
||||
link = config.services.prometheus.alertmanager.webExternalUrl;
|
||||
description = "notifies me when something goes wrong.";
|
||||
}
|
||||
];
|
||||
@@ -143,48 +192,45 @@ in {
|
||||
})
|
||||
];
|
||||
|
||||
systemd.services.alertmanager-bot-telegram = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
after = ["ip-up.target"];
|
||||
environment.TELEGRAM_ADMIN = "18980945";
|
||||
environment.TELEGRAM_TOKEN = lib.strings.fileContents <system-secrets/telegram/prometheus.token>;
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
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}}
|
||||
''
|
||||
}'';
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus.alertmanager = {
|
||||
enable = true;
|
||||
listenAddress = "localhost";
|
||||
webExternalUrl = "http://alertmanager.kmein.r";
|
||||
configuration = {
|
||||
route = {
|
||||
group_wait = "30s";
|
||||
repeat_interval = "4h";
|
||||
receiver = "me";
|
||||
repeat_interval = "24h";
|
||||
receiver = "all";
|
||||
};
|
||||
receivers = [
|
||||
{
|
||||
name = "me";
|
||||
webhook_configs = [
|
||||
name = "all";
|
||||
telegram_configs = [
|
||||
{
|
||||
url = "http://localhost:16320";
|
||||
bot_token = lib.strings.fileContents <system-secrets/telegram/prometheus.token>;
|
||||
chat_id = 18980945;
|
||||
parse_mode = "";
|
||||
api_url = "https://api.telegram.org";
|
||||
send_resolved = true;
|
||||
message = ''
|
||||
{{range .Alerts -}}
|
||||
{{ .Status }}: {{ index .Annotations "summary" }}
|
||||
{{end -}}
|
||||
'';
|
||||
}
|
||||
];
|
||||
email_configs = let
|
||||
inherit (import <niveum/lib>) kieran;
|
||||
inherit (import <niveum/lib/email.nix> {inherit lib;}) cock;
|
||||
in [
|
||||
{
|
||||
send_resolved = true;
|
||||
to = kieran.email;
|
||||
from = cock.user;
|
||||
smarthost = "${cock.smtp}:587";
|
||||
auth_username = cock.user;
|
||||
auth_identity = cock.user;
|
||||
auth_password = cock.password;
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -196,7 +242,7 @@ in {
|
||||
{
|
||||
scheme = "http";
|
||||
path_prefix = "/";
|
||||
static_configs = [{targets = ["localhost:9093"];}];
|
||||
static_configs = [{targets = ["localhost:${toString config.services.prometheus.alertmanager.port}"];}];
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
944
systems/makanek/monitoring/grafana-dashboards/niveum.json
Normal file
944
systems/makanek/monitoring/grafana-dashboards/niveum.json
Normal file
@@ -0,0 +1,944 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "grafana"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": false,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 1,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"collapsed": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 26,
|
||||
"panels": [],
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Running",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "sAagoeS7k"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "cps"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 1
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 28,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.3.1",
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "sAagoeS7k"
|
||||
},
|
||||
"expr": "rate({job=\"systemd-journal\"} |~ \"[Ee]rror|[Cc]rit\" [5m])",
|
||||
"legendFormat": "{{unit}}@{{host}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Error Rate",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "cps",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 12,
|
||||
"y": 1
|
||||
},
|
||||
"id": 22,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"text": {},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.3.1",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(node_systemd_unit_state{state!=\"inactive\",state!=\"activating\",state!=\"deactivating\"}) by (state)",
|
||||
"interval": "",
|
||||
"legendFormat": "{{state}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "SystemD Units",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 6,
|
||||
"x": 18,
|
||||
"y": 1
|
||||
},
|
||||
"id": 18,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.3.1",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(node_logind_sessions{type=\"tty\"}) by (job)",
|
||||
"interval": "",
|
||||
"legendFormat": "{{job}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "tty sessions",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "sAagoeS7k"
|
||||
},
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "reqps"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 12,
|
||||
"y": 5
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 30,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": false,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.3.1",
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "sAagoeS7k"
|
||||
},
|
||||
"expr": "rate({unit=\"nginx.service\"} |= \"GET\"[5m])",
|
||||
"legendFormat": "{{host}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "nginx requests",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "reqps",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"collapsed": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"id": 14,
|
||||
"panels": [],
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Free",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "decbytes"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 10
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.3.1",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "node_filesystem_avail_bytes{mountpoint=~\"/|/backup\"}",
|
||||
"format": "time_series",
|
||||
"interval": "",
|
||||
"intervalFactor": 1,
|
||||
"legendFormat": "{{job}}:{{mountpoint}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Free Disk Space",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "decbytes"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 6,
|
||||
"x": 12,
|
||||
"y": 10
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.3.1",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "node_memory_MemFree_bytes",
|
||||
"interval": "",
|
||||
"legendFormat": "{{job}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Free Memory",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 6,
|
||||
"x": 18,
|
||||
"y": 10
|
||||
},
|
||||
"id": 12,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.3.1",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "node_load15",
|
||||
"interval": "",
|
||||
"legendFormat": "{{job}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Load (15m)",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"collapsed": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 15
|
||||
},
|
||||
"id": 16,
|
||||
"panels": [],
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "IO",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "Bps"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 16
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 20,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.3.1",
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "rate(node_network_receive_bytes_total{device!=\"lo\"}[5m])",
|
||||
"interval": "",
|
||||
"legendFormat": "recv: {{job}} / {{device}}",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "rate(node_network_transmit_bytes_total{device!=\"lo\"}[5m])",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "send: {{job}} / {{device}}",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Network IO",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"$$hashKey": "object:2175",
|
||||
"format": "Bps",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"$$hashKey": "object:2176",
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "Bps"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 16
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 10,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.3.1",
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "rate(node_disk_written_bytes_total{device=\"sda\"}[5m])",
|
||||
"interval": "",
|
||||
"legendFormat": "write: {{job}}",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "rate(node_disk_read_bytes_total{device=\"sda\"}[5m])",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "read: {{job}}",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Disk IO",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"$$hashKey": "object:1290",
|
||||
"format": "Bps",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"$$hashKey": "object:1291",
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"collapsed": false,
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 23
|
||||
},
|
||||
"id": 32,
|
||||
"panels": [],
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "HTTP",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"fillOpacity": 70,
|
||||
"lineWidth": 1
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "red"
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 200
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 400
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "none"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 24
|
||||
},
|
||||
"id": 34,
|
||||
"maxDataPoints": 200,
|
||||
"options": {
|
||||
"colWidth": 0.9,
|
||||
"legend": {
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"rowHeight": 0.9,
|
||||
"showValue": "auto",
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "tOBnpeI7z"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "probe_http_status_code",
|
||||
"interval": "",
|
||||
"legendFormat": "{{instance}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "HTTP Probe",
|
||||
"type": "status-history"
|
||||
}
|
||||
],
|
||||
"refresh": "5s",
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "niveum",
|
||||
"uid": "alpUteInz",
|
||||
"version": 31,
|
||||
"weekStart": ""
|
||||
}
|
||||
38
systems/makanek/monitoring/grafana-datasources.json
Normal file
38
systems/makanek/monitoring/grafana-datasources.json
Normal file
@@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"id": 2,
|
||||
"uid": "sAagoeS7k",
|
||||
"orgId": 1,
|
||||
"name": "Loki",
|
||||
"type": "loki",
|
||||
"typeName": "Loki",
|
||||
"typeLogoUrl": "public/app/plugins/datasource/loki/img/loki_icon.svg",
|
||||
"access": "proxy",
|
||||
"url": "http://localhost:3100",
|
||||
"user": "",
|
||||
"database": "",
|
||||
"basicAuth": false,
|
||||
"isDefault": false,
|
||||
"jsonData": {},
|
||||
"readOnly": true
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"uid": "tOBnpeI7z",
|
||||
"orgId": 1,
|
||||
"name": "Prometheus",
|
||||
"type": "prometheus",
|
||||
"typeName": "Prometheus",
|
||||
"typeLogoUrl": "public/app/plugins/datasource/prometheus/img/prometheus_logo.svg",
|
||||
"access": "proxy",
|
||||
"url": "http://localhost:9001",
|
||||
"user": "",
|
||||
"database": "",
|
||||
"basicAuth": false,
|
||||
"isDefault": true,
|
||||
"jsonData": {
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"readOnly": true
|
||||
}
|
||||
]
|
||||
@@ -20,7 +20,7 @@ in {
|
||||
];
|
||||
|
||||
services.moodle-dl = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
startAt = "hourly";
|
||||
package = moodle-dl-package;
|
||||
notifyOnly = true;
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
in {
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud24;
|
||||
package = pkgs.nextcloud25;
|
||||
|
||||
https = true;
|
||||
enableBrokenCiphersForSSE = false;
|
||||
|
||||
autoUpdateApps = {
|
||||
enable = true;
|
||||
@@ -20,6 +21,8 @@ in {
|
||||
|
||||
hostName = "cloud.xn--kiern-0qa.de";
|
||||
|
||||
phpOptions."opcache.interned_strings_buffer" = "32"; # buffer size in MB
|
||||
|
||||
config = {
|
||||
overwriteProtocol = "https";
|
||||
|
||||
@@ -31,6 +34,27 @@ in {
|
||||
adminpassFile = passwordFile <system-secrets/nextcloud/admin>;
|
||||
adminuser = "admin";
|
||||
# extraTrustedDomains = [ "toum.r" ];
|
||||
defaultPhoneRegion = "DE";
|
||||
};
|
||||
|
||||
logLevel = 2;
|
||||
|
||||
extraOptions = let
|
||||
inherit (import <niveum/lib/email.nix> {inherit lib;}) cock;
|
||||
address = builtins.split "@" cock.user;
|
||||
in {
|
||||
defaultapp = "files";
|
||||
mail_smtpmode = "smtp";
|
||||
mail_sendmailmode = "smtp";
|
||||
mail_smtphost = cock.smtp;
|
||||
mail_smtpport = "587";
|
||||
mail_from_address = builtins.elemAt address 0;
|
||||
mail_domain = builtins.elemAt address 2;
|
||||
mail_smtpsecure = "tls";
|
||||
mail_smtpauthtype = "LOGIN";
|
||||
mail_smtpauth = 1;
|
||||
mail_smtpname = cock.user;
|
||||
mail_smtppassword = cock.password;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -42,13 +66,18 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
databases = [config.services.nextcloud.config.dbname];
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = ["nextcloud"];
|
||||
ensureDatabases = [config.services.nextcloud.config.dbname];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "nextcloud";
|
||||
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
||||
ensurePermissions."DATABASE ${config.services.nextcloud.config.dbname}" = "ALL PRIVILEGES";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ in {
|
||||
rm -rf "$stockholm"
|
||||
}
|
||||
${pkgs.git}/bin/git clone ${remote} "$stockholm"
|
||||
${pkgs.git}/bin/git --git-dir "$stockholm"/.git log --pretty='"%s" by %an, %ar.' --since "$(${pkgs.coreutils}/bin/date -I -d "yesterday")" \
|
||||
${pkgs.git}/bin/git --git-dir "$stockholm"/.git log --pretty='"%s" by %an, %ar.' --since "$(${pkgs.coreutils}/bin/date -d '1 hours ago')" \
|
||||
| ${pkgs.jq}/bin/jq -R '{text: ., from: now | todateiso8601, to: (now + (60 * 60)) | todateiso8601}' \
|
||||
| ${pkgs.curl}/bin/curl -Ssfd @- http://radio-news.r/
|
||||
'';
|
||||
|
||||
@@ -20,32 +20,30 @@ in {
|
||||
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
|
||||
''
|
||||
}'';
|
||||
scriptFile = 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
|
||||
'';
|
||||
};
|
||||
|
||||
niveum.passport.services = [
|
||||
|
||||
37
systems/makanek/tt-rss.nix
Normal file
37
systems/makanek/tt-rss.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
domain = "feed.kmein.de";
|
||||
port = 8181;
|
||||
in {
|
||||
services.miniflux = {
|
||||
enable = true;
|
||||
adminCredentialsFile = pkgs.writeText "miniflux" ''
|
||||
ADMIN_USERNAME='kfm'
|
||||
ADMIN_PASSWORD='${lib.strings.fileContents <secrets/miniflux/password>}'
|
||||
'';
|
||||
config = {
|
||||
FETCH_YOUTUBE_WATCH_TIME = "1";
|
||||
POLLING_FREQUENCY = "20";
|
||||
PORT = toString port;
|
||||
BASE_URL = "https://feed.kmein.de";
|
||||
# POCKET_CONSUMER_KEY = ...
|
||||
};
|
||||
};
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
databases = ["miniflux"];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -26,19 +26,6 @@
|
||||
url = "http://lammla.info/index.php?reihe=30";
|
||||
filter = ["html2text" "strip"];
|
||||
}
|
||||
{
|
||||
name = "Tatort";
|
||||
url = "https://www.daserste.de/unterhaltung/krimi/tatort/vorschau/index.html";
|
||||
filter = [
|
||||
"html2text"
|
||||
"strip"
|
||||
{
|
||||
shellpipe = ''
|
||||
${pkgs.gnused}/bin/sed 's/ / /g;s/))/&\n/g;s/ \+/ /g'
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Kratylos";
|
||||
url = "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
|
||||
@@ -49,11 +36,6 @@
|
||||
url = "http://www.zeno.org/Lesesaal/M/E-Books";
|
||||
filter = [{element-by-class = "zenoCOMain";} "html2text" "strip"];
|
||||
}
|
||||
{
|
||||
name = "Arnshaugk Neuerscheinungen";
|
||||
url = "http://www.arnshaugk.de/index.php";
|
||||
filter = ["html2text" "strip"];
|
||||
}
|
||||
{
|
||||
name = "Carolina Welslau";
|
||||
url = "https://carolinawelslau.de/";
|
||||
|
||||
@@ -34,6 +34,11 @@
|
||||
device = "/dev/disk/by-uuid/D4AC-91B0";
|
||||
fsType = "vfat";
|
||||
};
|
||||
"/mnt/sd-card" = {
|
||||
device = "/dev/disk/by-id/mmc-5E4S5_0x4c585d15-part1";
|
||||
fsType = "ext4";
|
||||
options = ["nofail"];
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{pkgs, ...}: {
|
||||
services.xserver.displayManager.sessionCommands = let
|
||||
intern = "LVDS-1";
|
||||
extern = "HDMI-1";
|
||||
extern = "HDMI-3";
|
||||
pulseaudioCard = "alsa_card.pci-0000_00_1b.0";
|
||||
pulseaudioProfile = "output:hdmi-stereo+input:analog-stereo";
|
||||
pulseaudioProfile = "output:hdmi-stereo-extra2+input:analog-stereo";
|
||||
in
|
||||
toString (pkgs.writers.writeDash "hdmi-on" ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output ${intern} --primary --auto --output ${extern} --above ${intern} --auto
|
||||
|
||||
64
systems/tabula/configuration.nix
Normal file
64
systems/tabula/configuration.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import <niveum/lib>) retiolumAddresses;
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
<niveum/configs/spacetime.nix>
|
||||
<niveum/configs/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";
|
||||
}
|
||||
36
systems/tabula/hardware-configuration.nix
Normal file
36
systems/tabula/hardware-configuration.nix
Normal 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;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
<niveum/configs/spacetime.nix>
|
||||
<niveum/modules/retiolum.nix>
|
||||
<niveum/configs/retiolum.nix>
|
||||
<niveum/configs/sshd.nix>
|
||||
];
|
||||
|
||||
@@ -51,6 +51,7 @@ in {
|
||||
pkgs.firefox
|
||||
pkgs.audacity
|
||||
pkgs.pidgin
|
||||
pkgs.git
|
||||
];
|
||||
|
||||
networking = {
|
||||
|
||||
55
systems/zaatar/atuin.nix
Normal file
55
systems/zaatar/atuin.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{config, ...}: let
|
||||
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||
unstable = import <nixos-unstable> {inherit (config.nixpkgs) config;};
|
||||
in {
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
dataDir = "/var/state/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||
ensureDatabases = ["atuin"];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "atuin";
|
||||
ensurePermissions."DATABASE atuin" = "ALL PRIVILEGES";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
databases = ["atuin"];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
(tmpfilesConfig {
|
||||
type = "d";
|
||||
path = "/var/state/postgresql";
|
||||
mode = "0700";
|
||||
user = "postgres";
|
||||
group = "postgres";
|
||||
})
|
||||
];
|
||||
|
||||
users.groups.atuin = {};
|
||||
users.users.atuin = {
|
||||
isSystemUser = true;
|
||||
group = "atuin";
|
||||
home = "/run/atuin";
|
||||
createHome = true;
|
||||
};
|
||||
|
||||
systemd.services.atuin = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
environment = {
|
||||
ATUIN_HOST = "0.0.0.0";
|
||||
ATUIN_PORT = "8888";
|
||||
ATUIN_OPEN_REGISTRATION = "true";
|
||||
ATUIN_DB_URI = "postgres:///atuin";
|
||||
};
|
||||
serviceConfig = {
|
||||
User = "atuin";
|
||||
ExecStart = "${unstable.atuin}/bin/atuin server start";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [8888];
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
inherit (import <niveum/lib>) retiolumAddresses restic;
|
||||
in {
|
||||
imports = [
|
||||
./atuin.nix
|
||||
./backup.nix
|
||||
./gaslight.nix
|
||||
./hardware-configuration.nix
|
||||
@@ -23,10 +24,10 @@ in {
|
||||
<niveum/configs/printing.nix>
|
||||
<niveum/configs/spacetime.nix>
|
||||
<niveum/configs/sshd.nix>
|
||||
<niveum/configs/traadfri.nix>
|
||||
# <niveum/configs/traadfri.nix>
|
||||
<niveum/configs/tmux.nix>
|
||||
<niveum/configs/retiolum.nix>
|
||||
<niveum/configs/wpa_supplicant.nix>
|
||||
<niveum/modules/retiolum.nix>
|
||||
];
|
||||
|
||||
services.restic.backups.moodle-dl = {
|
||||
@@ -40,6 +41,7 @@ in {
|
||||
paths = [
|
||||
"/var/lib/moodle-dl"
|
||||
"/var/lib/containers/storage/volumes/home-assistant"
|
||||
config.services.postgresqlBackup.location
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,46 @@
|
||||
let
|
||||
{pkgs, ...}: let
|
||||
port = 8123;
|
||||
mosquittoPort = 1883;
|
||||
zigbee2mqttPort = 7977;
|
||||
in {
|
||||
networking.firewall.allowedTCPPorts = [port];
|
||||
networking.firewall.allowedTCPPorts = [port zigbee2mqttPort];
|
||||
|
||||
services.zigbee2mqtt = {
|
||||
enable = true;
|
||||
settings = {
|
||||
serial.port = "/dev/ttyACM0";
|
||||
permit_join = true;
|
||||
homeassistant = true;
|
||||
frontend = {
|
||||
port = zigbee2mqttPort;
|
||||
host = "0.0.0.0";
|
||||
};
|
||||
experimental.new_api = true;
|
||||
mqtt = {
|
||||
discovery = true;
|
||||
base_topic = "zigbee";
|
||||
server = "mqtt://localhost:${toString mosquittoPort}";
|
||||
user = "as59";
|
||||
password = "as59-mqtt";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.mosquitto = {
|
||||
enable = true;
|
||||
listeners = [
|
||||
{
|
||||
acl = [];
|
||||
users.as59 = {
|
||||
acl = ["readwrite #"];
|
||||
password = "as59-mqtt";
|
||||
};
|
||||
port = mosquittoPort;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = [pkgs.mosquitto];
|
||||
|
||||
services.nginx.virtualHosts."home.kmein.r" = {
|
||||
locations."/" = {
|
||||
@@ -9,16 +48,150 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers = {
|
||||
backend = "podman";
|
||||
containers.homeassistant = {
|
||||
volumes = ["home-assistant:/config"];
|
||||
environment.TZ = "Europe/Berlin";
|
||||
image = "ghcr.io/home-assistant/home-assistant:stable";
|
||||
extraOptions = [
|
||||
"--network=host"
|
||||
# "--device=/dev/ttyUSB0:/dev/ttyACM0" # Example, change this to match your own hardware
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
configWritable = true;
|
||||
lovelaceConfigWritable = true;
|
||||
config = let
|
||||
in {
|
||||
homeassistant = {
|
||||
name = "Home";
|
||||
time_zone = "Europe/Berlin";
|
||||
latitude = "52.46187";
|
||||
longitude = "13.41489";
|
||||
elevation = 90;
|
||||
unit_system = "metric";
|
||||
# customize = friendly_names;
|
||||
};
|
||||
config = {};
|
||||
sun.elevation = 66;
|
||||
discovery = {};
|
||||
frontend = {};
|
||||
http = {};
|
||||
weather = [
|
||||
#{
|
||||
# platform = "openweathermap";
|
||||
# api_key = "xxx"; # TODO put into secrets
|
||||
#}
|
||||
];
|
||||
system_health = {};
|
||||
history = {};
|
||||
switch = [
|
||||
{
|
||||
platform = "mqtt";
|
||||
name = "zigbee2mqtt_join";
|
||||
state_topic = "/zigbee2mqtt/bridge/config/permit_join";
|
||||
command_topic = "/zigbee2mqtt/bridge/config/permit_join";
|
||||
payload_on = "true";
|
||||
payload_off = "false";
|
||||
}
|
||||
];
|
||||
automation = [
|
||||
{
|
||||
id = "zigbee_join_enabled";
|
||||
alias = "";
|
||||
trigger = {
|
||||
platform = "state";
|
||||
entity_id = "switch.zigbee2mqtt_join";
|
||||
to = "on";
|
||||
};
|
||||
action = {
|
||||
service = "timer.start";
|
||||
entity_id = "timer.zigbee_permit_join";
|
||||
};
|
||||
}
|
||||
{
|
||||
id = "zigbee_join_disabled";
|
||||
trigger = [
|
||||
{
|
||||
platform = "event";
|
||||
event_type = "timer.finished";
|
||||
event_data.entity_id = "timer.zigbee_permit_join";
|
||||
}
|
||||
{
|
||||
platform = "state";
|
||||
entity_id = "switch.zigbee2mqtt_join";
|
||||
to = "off";
|
||||
}
|
||||
];
|
||||
action = [
|
||||
{
|
||||
service = "timer.cancel";
|
||||
data.entity_id = "timer.zigbee_permit_join";
|
||||
}
|
||||
{
|
||||
service = "switch.turn_off";
|
||||
entity_id = "switch.zigbee2mqtt_join";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
timer.zigbee_permit_join = {
|
||||
name = "Zigbee Time remaining";
|
||||
duration = 120;
|
||||
};
|
||||
mobile_app = {};
|
||||
sensor = [
|
||||
{
|
||||
platform = "dwd_weather_warnings";
|
||||
region_name = "Berlin";
|
||||
}
|
||||
# Sensor for monitoring the bridge state
|
||||
{
|
||||
platform = "mqtt";
|
||||
name = "Zigbee2mqtt Bridge state";
|
||||
state_topic = "/zigbee2mqtt/bridge/state";
|
||||
icon = "mdi:router-wireless";
|
||||
}
|
||||
# Sensor for Showing the Zigbee2mqtt Version
|
||||
{
|
||||
platform = "mqtt";
|
||||
name = "Zigbee2mqtt Version";
|
||||
state_topic = "/zigbee2mqtt/bridge/config";
|
||||
value_template = "{{ value_json.version }}";
|
||||
icon = "mdi:zigbee";
|
||||
}
|
||||
# Sensor for Showing the Coordinator Version
|
||||
{
|
||||
platform = "mqtt";
|
||||
name = "Coordinator Version";
|
||||
state_topic = "/zigbee2mqtt/bridge/config";
|
||||
value_template = "{{ value_json.coordinator }}";
|
||||
icon = "mdi:chip";
|
||||
}
|
||||
];
|
||||
mqtt = {
|
||||
broker = "localhost";
|
||||
port = mosquittoPort;
|
||||
client_id = "home-assistant";
|
||||
username = "gg23";
|
||||
password = "gg23-mqtt";
|
||||
keepalive = 60;
|
||||
protocol = 3.1;
|
||||
|
||||
discovery = true;
|
||||
birth_message = {
|
||||
topic = "/hass/status";
|
||||
payload = "online";
|
||||
};
|
||||
will_message = {
|
||||
topic = "/hass/status";
|
||||
payload = "offline";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# virtualisation.oci-containers = {
|
||||
# backend = "podman";
|
||||
# containers.homeassistant = {
|
||||
# volumes = ["home-assistant:/config"];
|
||||
# environment.TZ = "Europe/Berlin";
|
||||
# image = "ghcr.io/home-assistant/home-assistant:stable";
|
||||
# extraOptions = [
|
||||
# "--network=host"
|
||||
# # "--device=/dev/ttyUSB0:/dev/ttyACM0" # Example, change this to match your own hardware
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ in {
|
||||
|
||||
# WS 2022
|
||||
115414 # Nonnos
|
||||
116108 # Dialektologie
|
||||
];
|
||||
download_submissions = true;
|
||||
download_descriptions = true;
|
||||
|
||||
@@ -72,6 +72,8 @@ in {
|
||||
extraStopCommands = firewall.removeRules rules;
|
||||
};
|
||||
|
||||
# to reset:
|
||||
# ssh zaatar 'rm /var/lib/mpd/playlists/*.m3u && systemd-tmpfiles --create'
|
||||
systemd.tmpfiles.rules = let
|
||||
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
||||
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
|
||||
@@ -93,7 +95,7 @@ in {
|
||||
mode = "0644";
|
||||
user = "mpd";
|
||||
group = "mpd";
|
||||
path = "/var/lib/mpd/playlist/all.m3u";
|
||||
path = "/var/lib/mpd/playlists/all.m3u";
|
||||
argument = makePlaylist "all" streams;
|
||||
})
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user