mirror of
https://github.com/kmein/niveum
synced 2026-03-24 13:41:08 +01:00
Compare commits
47 Commits
2793d2ca0e
...
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 |
@@ -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"
|
||||
|
||||
|
||||
5
ci.nix
5
ci.nix
@@ -45,6 +45,7 @@
|
||||
"mail/gmail/kieran.meinhardt"
|
||||
"mail/meinhaki"
|
||||
"mail/dslalewa"
|
||||
"mail/fsklassp"
|
||||
"mail/posteo"
|
||||
"mega/password"
|
||||
"nextcloud-fysi/password"
|
||||
@@ -52,8 +53,7 @@
|
||||
"openweathermap.key"
|
||||
"restic/password"
|
||||
"traadfri.key"
|
||||
"tt-rss/password"
|
||||
"tt-rss/private-rss.key"
|
||||
"miniflux/password"
|
||||
"wifi/Aether.psk"
|
||||
"spotify/username"
|
||||
"spotify/password"
|
||||
@@ -69,6 +69,7 @@
|
||||
tabula = ensureFiles basic;
|
||||
ful = ensureFiles (["root.password"] ++ basic);
|
||||
makanek = ensureFiles ([
|
||||
"grafana/admin"
|
||||
"irc/retiolum"
|
||||
"irc/hackint"
|
||||
"irc/libera"
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
@@ -68,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";
|
||||
@@ -220,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
|
||||
@@ -266,6 +260,7 @@ in {
|
||||
./seafile.nix
|
||||
./ssh.nix
|
||||
./sshd.nix
|
||||
./sound.nix
|
||||
./sudo.nix
|
||||
./nsxiv.nix
|
||||
./themes.nix
|
||||
@@ -276,5 +271,6 @@ in {
|
||||
./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"
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
@@ -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>
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ in {
|
||||
environment.systemPackages = [
|
||||
pkgs.mr
|
||||
pkgs.git
|
||||
pkgs.git-crypt
|
||||
pkgs.gitAndTools.gitflow
|
||||
pkgs.gitAndTools.gh
|
||||
pkgs.gitAndTools.git-extras
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -87,26 +87,14 @@
|
||||
color listfocus_unread blue default bold
|
||||
color info red default bold
|
||||
|
||||
urls-source "ttrss"
|
||||
ttrss-url "https://feed.kmein.de"
|
||||
ttrss-login "k"
|
||||
ttrss-flag-star "s"
|
||||
ttrss-password "${lib.strings.fileContents <secrets/tt-rss/password>}"
|
||||
ttrss-mode "multi"
|
||||
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} -u ${pkgs.writeText "newsboat-urls" ''
|
||||
https://feed.kmein.de/public.php?op=rss&id=-1&is_cat=0&q=&key=${lib.strings.fileContents <secrets/tt-rss/private-rss.key>} "foo"
|
||||
"query:🕒 Read Later:flags # \"e\""
|
||||
"query:📥 Unread:unread = \"yes\""
|
||||
''} "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
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="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ in {
|
||||
dnsutils
|
||||
# FILE MANAGERS
|
||||
lf
|
||||
pcmanfm
|
||||
cinnamon.nemo
|
||||
# MEDIA
|
||||
ffmpeg
|
||||
imagemagick
|
||||
@@ -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
|
||||
@@ -186,6 +185,7 @@ in {
|
||||
scripts.mpv-radio
|
||||
# kmein.slide
|
||||
termdown
|
||||
scripts.alarm
|
||||
scripts.tolino-screensaver
|
||||
scripts.rfc
|
||||
scripts.tag
|
||||
|
||||
@@ -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>;
|
||||
};
|
||||
}
|
||||
|
||||
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
|
||||
];
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
63
flake.lock
generated
63
flake.lock
generated
@@ -23,11 +23,11 @@
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1671831633,
|
||||
"narHash": "sha256-tANQOkJnlqK4M83KvvXFMFrIbR0xkloqXY5ruqzR3kE=",
|
||||
"lastModified": 1675371293,
|
||||
"narHash": "sha256-LrCjtrAXj/WJphhGEMnHgZs7oTsfOlvPfOjFTIvg39k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d7eee202e597bc7789498a8664082cf0ffedaa8f",
|
||||
"rev": "d1c7730bb707bf8124d997952f7babd2a281ae68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -95,11 +95,11 @@
|
||||
"nix-writers": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1670858162,
|
||||
"narHash": "sha256-znQRO+ET3JovQjtPBib4ueuY9QtqEzPvHubhBEmmTaY=",
|
||||
"lastModified": 1675197881,
|
||||
"narHash": "sha256-gYtduNF59yqv4BgW4fC+tZHKE7cpOkZf+Y34psyFO5U=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "0c8de150426476b5287cf2787bbd85263691a802",
|
||||
"revCount": 37,
|
||||
"rev": "d1424777b5f2e12cbd80efd1b55335dcba7c32bd",
|
||||
"revCount": 38,
|
||||
"type": "git",
|
||||
"url": "https://cgit.krebsco.de/nix-writers"
|
||||
},
|
||||
@@ -110,11 +110,11 @@
|
||||
},
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1671752829,
|
||||
"narHash": "sha256-oFeJzAq0iRL6md9Si8Tx9bltjwjLmldvgUmAteMhYW4=",
|
||||
"lastModified": 1675237434,
|
||||
"narHash": "sha256-YoFR0vyEa1HXufLNIFgOGhIFMRnY6aZ0IepZF5cYemo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9898811c658d39b2692d0ab744377e02fd85d08b",
|
||||
"rev": "285b3ff0660640575186a4086e1f8dc0df2874b5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -126,11 +126,11 @@
|
||||
},
|
||||
"nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1671722432,
|
||||
"narHash": "sha256-ojcZUekIQeOZkHHzR81st7qxX99dB1Eaaq6PU5MNeKc=",
|
||||
"lastModified": 1675273418,
|
||||
"narHash": "sha256-tpYc4TEGvDzh9uRf44QemyQ4TpVuUbxb07b2P99XDbM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "652e92b8064949a11bc193b90b74cb727f2a1405",
|
||||
"rev": "4d7c2644dbac9cf8282c0afe68fca8f0f3e7b2db",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -157,19 +157,18 @@
|
||||
}
|
||||
},
|
||||
"retiolum": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1671456454,
|
||||
"narHash": "sha256-UzNs+lOqrAOzMf9EdcEZsuvjZnBKgPmmoyiwM81EaTQ=",
|
||||
"owner": "krebs",
|
||||
"repo": "retiolum",
|
||||
"rev": "20ad3544d80690791bed8a639d08848924a7aaa9",
|
||||
"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": 1669193831,
|
||||
"narHash": "sha256-R8RNb7mM0bDF3UTfQqpumYPBwal7QzWSKgxMUY2dRm8=",
|
||||
"lastModified": 1675238486,
|
||||
"narHash": "sha256-Hs9NKK0UFaNqrui2VauBnMnV/14U3eNWaI12EmVYXWY=",
|
||||
"owner": "kmein",
|
||||
"repo": "scripts",
|
||||
"rev": "84ad80348294e9423996b52a4b112700ae5d3176",
|
||||
"rev": "5cefa5f112e7fe54e0302b7bc33bc06e1f762002",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -211,17 +210,17 @@
|
||||
"stockholm": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1671927857,
|
||||
"narHash": "sha256-eZBh840OWQn1TIN7Fc9agLvaGMUT+6r2CcOgibBVwKE=",
|
||||
"lastModified": 1675564669,
|
||||
"narHash": "sha256-Fd4wBl9b5Aqt4ctH2vJu/oPvgTOHD+ME8MUEu3oR2tE=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "6e13334579f16940edb1182662d9ac58e57aba0e",
|
||||
"revCount": 11109,
|
||||
"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": {
|
||||
|
||||
13
flake.nix
13
flake.nix
@@ -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,7 +165,7 @@
|
||||
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"]
|
||||
++ {
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
133
lib/streams.nix
133
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
|
||||
@@ -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
|
||||
|
||||
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 \
|
||||
|
||||
@@ -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"];
|
||||
|
||||
@@ -28,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>
|
||||
];
|
||||
|
||||
|
||||
@@ -10,10 +10,39 @@
|
||||
in {
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings.server = {
|
||||
domain = "grafana.kmein.r";
|
||||
http_port = 9444;
|
||||
http_addr = "127.0.0.1";
|
||||
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);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
]
|
||||
@@ -5,26 +5,33 @@
|
||||
...
|
||||
}: let
|
||||
domain = "feed.kmein.de";
|
||||
port = 8181;
|
||||
in {
|
||||
services.tt-rss = {
|
||||
services.miniflux = {
|
||||
enable = true;
|
||||
logDestination = "syslog";
|
||||
root = "/var/lib/tt-rss";
|
||||
selfUrlPath = "https://${domain}";
|
||||
virtualHost = domain;
|
||||
registration = {
|
||||
enable = false;
|
||||
maxUsers = 3;
|
||||
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 = [config.services.tt-rss.database.name];
|
||||
databases = ["miniflux"];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
@@ -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>
|
||||
];
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -48,6 +48,7 @@ in {
|
||||
serviceConfig = {
|
||||
User = "atuin";
|
||||
ExecStart = "${unstable.atuin}/bin/atuin server start";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [8888];
|
||||
|
||||
@@ -26,8 +26,8 @@ in {
|
||||
<niveum/configs/sshd.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 = {
|
||||
|
||||
@@ -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
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
}
|
||||
|
||||
@@ -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