1
0
mirror of https://github.com/kmein/niveum synced 2026-03-25 14:01:06 +01:00

26 Commits

Author SHA1 Message Date
62f3c7fcc0 wip 2023-02-09 18:05:17 +01:00
0f88954989 fix(ci): add grafana secret to makanek 2023-02-09 09:48:36 +01:00
7c349f1383 feat(grafana): provision 2023-02-08 09:26:36 +01:00
0eadbf08df feat: nemo with correct terminal setting 2023-02-07 22:30:42 +01:00
72100329b1 feat(compton): fade + inactiveOpacity 2023-02-07 22:30:16 +01:00
bf7b490372 feat: udiskie 2023-02-07 22:26:59 +01:00
dd4083aec5 fix(fonts): update hash, reject woff 2023-02-06 21:39:38 +01:00
6edd1c0439 feat: reenable flameshot-once 2023-02-06 21:23:33 +01:00
467c80a239 feat(streams): add more todo 2023-02-05 11:43:10 +01:00
b100ea7b28 chore: update and comment flameshot-once 2023-02-03 13:36:40 +01:00
3cdc468e31 feat(streams): add more todo 2023-02-03 11:05:26 +01:00
2d19ba7249 feat: build laptops from stable 2023-01-31 11:03:37 +01:00
7af32a0ad3 fix(ci): tt-rss -> miniflux 2023-01-31 10:24:25 +01:00
0e75118416 feat(streams): remove unicode from playlist names 2023-01-30 10:03:07 +01:00
139fcae7a0 Merge branch 'update_flake_lock_action' 2023-01-29 19:21:00 +01:00
bcfd5d73be feat: calendar add more planets 2023-01-29 19:20:51 +01:00
bcf057e871 fix(miniflux): rename password on server 2023-01-29 19:04:01 +01:00
fad2d0629d feat(mastodon-bot): disable 2023-01-29 18:51:05 +01:00
27cc5766ee fix(miniflux): rename password 2023-01-29 18:43:03 +01:00
813072e47c fix(miniflux): rename password 2023-01-29 17:51:32 +01:00
github-actions[bot]
bcc355f822 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/9e565f0d9d41c19a94f55af205c328ec5177fc0a' (2023-01-07)
  → 'github:nix-community/home-manager/08a778d80308353f4f65c9dcd3790b5da02d6306' (2023-01-28)
• Updated input 'nixos-stable':
    'github:NixOS/nixpkgs/2dea8991d89b9f1e78d874945f78ca15f6954289' (2023-01-06)
  → 'github:NixOS/nixpkgs/ce20e9ebe1903ea2ba1ab006ec63093020c761cb' (2023-01-28)
• Updated input 'nixos-unstable':
    'github:NixOS/nixpkgs/a518c77148585023ff56022f09c4b2c418a51ef5' (2023-01-05)
  → 'github:NixOS/nixpkgs/9b97ad7b4330aacda9b2343396eb3df8a853b4fc' (2023-01-25)
• Updated input 'retiolum':
    'git+https://git.thalheim.io/Mic92/retiolum?ref=refs%2fheads%2fmaster&rev=33ac7efb37d36e1939b62a93494570bce1be4dac' (2023-01-07)
  → 'git+https://git.thalheim.io/Mic92/retiolum?ref=refs%2fheads%2fmaster&rev=a396ad8139cb934e36f0bf0bde84786b2704c6bd' (2023-01-26)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=refs%2fheads%2fmaster&rev=895440aab0d360bd805338fa41874282a3209df0' (2023-01-07)
  → 'git+https://cgit.lassul.us/stockholm?ref=refs%2fheads%2fmaster&rev=e01e296e5d34aa74a4d6edf8203b3dd015a94112' (2023-01-28)
2023-01-29 17:51:13 +01:00
d8b931af7c feat: miniflux 2023-01-29 17:46:31 +01:00
4c8d2a051d feat(backup): also backup notes 2023-01-17 15:50:12 +01:00
2906848f92 feat(backup): also backup sd card directories 2023-01-17 15:37:56 +01:00
c2a78a88bd feat: git-crypt 2023-01-12 10:20:07 +01:00
63bf7ddeb0 feat(firefox): declarative 2023-01-12 10:19:56 +01:00
23 changed files with 1504 additions and 149 deletions

View File

@@ -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"

4
ci.nix
View File

@@ -53,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"
@@ -70,6 +69,7 @@
tabula = ensureFiles basic;
ful = ensureFiles (["root.password"] ++ basic);
makanek = ensureFiles ([
"grafana/admin"
"irc/retiolum"
"irc/hackint"
"irc/libera"

View File

@@ -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"
];
};

View File

@@ -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";

View File

@@ -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;

View File

@@ -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,7 +69,6 @@ in {
};
home-manager.users.me.xdg.enable = true;
home-manager.users.me.dconf.enable = false;
}
{
environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum";
@@ -195,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

View File

@@ -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"
];
};
};
})
];

View File

@@ -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>
'';
};
}

View File

@@ -9,6 +9,7 @@ in {
environment.systemPackages = [
pkgs.mr
pkgs.git
pkgs.git-crypt
pkgs.gitAndTools.gitflow
pkgs.gitAndTools.gh
pkgs.gitAndTools.git-extras

View File

@@ -1,6 +1,6 @@
{pkgs, ...}: {
systemd.services.imaginary-illuminations = {
enable = true;
enable = false;
wants = ["network-online.target"];
serviceConfig = {
User = "kfm";

View File

@@ -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" ''

View File

@@ -74,7 +74,7 @@ in {
dnsutils
# FILE MANAGERS
lf
pcmanfm
cinnamon.nemo
# MEDIA
ffmpeg
imagemagick

52
flake.lock generated
View File

@@ -23,11 +23,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1673089714,
"narHash": "sha256-D58SGNOVe+s7r2iewnCA8q68gyrfQcOnD1TdJo1wFLY=",
"lastModified": 1675371293,
"narHash": "sha256-LrCjtrAXj/WJphhGEMnHgZs7oTsfOlvPfOjFTIvg39k=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "9e565f0d9d41c19a94f55af205c328ec5177fc0a",
"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": 1672968032,
"narHash": "sha256-26Jns3GmHem44a06UN5Rj/KOD9qNJThyQrom02Ijur8=",
"lastModified": 1675237434,
"narHash": "sha256-YoFR0vyEa1HXufLNIFgOGhIFMRnY6aZ0IepZF5cYemo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2dea8991d89b9f1e78d874945f78ca15f6954289",
"rev": "285b3ff0660640575186a4086e1f8dc0df2874b5",
"type": "github"
},
"original": {
@@ -126,11 +126,11 @@
},
"nixos-unstable": {
"locked": {
"lastModified": 1672953546,
"narHash": "sha256-oz757DnJ1ITvwyTovuwG3l9cX6j9j6/DH9eH+cXFJmc=",
"lastModified": 1675273418,
"narHash": "sha256-tpYc4TEGvDzh9uRf44QemyQ4TpVuUbxb07b2P99XDbM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a518c77148585023ff56022f09c4b2c418a51ef5",
"rev": "4d7c2644dbac9cf8282c0afe68fca8f0f3e7b2db",
"type": "github"
},
"original": {
@@ -158,11 +158,11 @@
},
"retiolum": {
"locked": {
"lastModified": 1673132416,
"narHash": "sha256-dSiQtni1+8NEd+FsAVdm1C+p799/+M3R7kqsWvEbOvU=",
"lastModified": 1675364416,
"narHash": "sha256-u7kbHg/cp+GdW55B6V52GG0D9+zWOhmVI2nh/NiMxfw=",
"ref": "refs/heads/master",
"rev": "33ac7efb37d36e1939b62a93494570bce1be4dac",
"revCount": 267,
"rev": "ae5112af96361acc314e1d270d0c9281984fc517",
"revCount": 280,
"type": "git",
"url": "https://git.thalheim.io/Mic92/retiolum"
},
@@ -194,11 +194,11 @@
"scripts": {
"flake": false,
"locked": {
"lastModified": 1673090227,
"narHash": "sha256-Gb9wkGuuDzggXW+W4YPh5d2Ho5j3FGt4iixNzML4IdM=",
"lastModified": 1675238486,
"narHash": "sha256-Hs9NKK0UFaNqrui2VauBnMnV/14U3eNWaI12EmVYXWY=",
"owner": "kmein",
"repo": "scripts",
"rev": "2670c7eed566f195f833a25e6ccc6b368fe18af5",
"rev": "5cefa5f112e7fe54e0302b7bc33bc06e1f762002",
"type": "github"
},
"original": {
@@ -210,17 +210,17 @@
"stockholm": {
"flake": false,
"locked": {
"lastModified": 1673131905,
"narHash": "sha256-fNrWxDX1a1r0bOnZndb3/2+LHDpCQVMXRKwc+9pa44Q=",
"lastModified": 1675564669,
"narHash": "sha256-Fd4wBl9b5Aqt4ctH2vJu/oPvgTOHD+ME8MUEu3oR2tE=",
"ref": "refs/heads/master",
"rev": "895440aab0d360bd805338fa41874282a3209df0",
"revCount": 11179,
"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": {

View File

@@ -39,7 +39,7 @@
flake = false;
};
stockholm = {
url = "git+https://cgit.lassul.us/stockholm";
url = "git+https://cgit.krebsco.de/stockholm";
flake = false;
};
telebots = {
@@ -127,7 +127,7 @@
nix-writers = "https://cgit.krebsco.de/nix-writers";
recht = github "kmein/recht";
retiolum = "https://git.thalheim.io/Mic92/retiolum";
stockholm = "https://cgit.lassul.us/stockholm";
stockholm = "https://cgit.krebsco.de/stockholm";
scripts = github "kmein/scripts";
telebots = github "kmein/telebots";
tinc-graph = github "kmein/tinc-graph";
@@ -165,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"]
++ {

View File

@@ -1,5 +1,5 @@
pkgs: rec {
terminal = "alacritty";
browser = "${pkgs.firefox}/bin/firefox";
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
fileManager = "${pkgs.cinnamon.nemo}/bin/nemo";
}

View File

@@ -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 = "🌊 ";
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/;
*/

View File

@@ -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

View File

@@ -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);
};
};

View 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": ""
}

View 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
}
]

View File

@@ -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}";
};
};
}

View File

@@ -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
# ];
# };
# };
}

View File

@@ -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;
})
];