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

40 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
github-actions[bot]
19e4e76e6f flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/dd99675ee81fef051809bc87d67eb07f5ba022e8' (2022-12-29)
  → 'github:nix-community/home-manager/9e565f0d9d41c19a94f55af205c328ec5177fc0a' (2023-01-07)
• Updated input 'nixos-stable':
    'github:NixOS/nixpkgs/913a47cd064cc06440ea84e5e0452039a85781f0' (2022-12-29)
  → 'github:NixOS/nixpkgs/2dea8991d89b9f1e78d874945f78ca15f6954289' (2023-01-06)
• Updated input 'nixos-unstable':
    'github:NixOS/nixpkgs/677ed08a50931e38382dbef01cba08a8f7eac8f6' (2022-12-29)
  → 'github:NixOS/nixpkgs/a518c77148585023ff56022f09c4b2c418a51ef5' (2023-01-05)
• Updated input 'scripts':
    'github:kmein/scripts/84ad80348294e9423996b52a4b112700ae5d3176' (2022-11-23)
  → 'github:kmein/scripts/2670c7eed566f195f833a25e6ccc6b368fe18af5' (2023-01-07)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=refs%2fheads%2fmaster&rev=de0226995d553e4a70170ce59483a6d71f41932d' (2022-12-30)
  → 'git+https://cgit.lassul.us/stockholm?ref=refs%2fheads%2fmaster&rev=895440aab0d360bd805338fa41874282a3209df0' (2023-01-07)
2023-01-09 10:29:24 +01:00
79e9ab38a8 fix: use retiolum keys from password store 2023-01-08 00:16:30 +01:00
318687f5cf fix(radio): radio-news.r has moved so we have to update the retiolum hosts 2023-01-08 00:06:16 +01:00
c5a297cd7d feat: rusty alarm 2023-01-07 09:58:35 +01:00
6f6100d752 feat: return to pulseaudio 2023-01-07 08:30:57 +01:00
049dadd704 fix(nix): do not use flaky prism.r cache 2023-01-06 17:02:02 +01:00
0a4fa2d16f feat: pipewire 2023-01-06 15:32:23 +01:00
f25c59178c manakish: new sd card 2023-01-06 12:28:12 +01:00
88b6802dae fix(ci): add missing secret 2023-01-06 12:27:47 +01:00
5f88e7287b fix: pandoc man hash 2023-01-06 09:47:12 +01:00
abb0be6a17 feat: bye brave, hello firefox 2023-01-06 09:08:42 +01:00
fec8479e90 fix(tahina): install git for krops to work 2023-01-04 20:43:48 +01:00
190a46abcd feat(nixify): use packages instead of buildInputs 2023-01-04 20:43:38 +01:00
0a4fccd582 feat(mail): add klassphil email 2023-01-04 20:43:26 +01:00
37 changed files with 1637 additions and 200 deletions

View File

@@ -6,12 +6,12 @@ clean() {
rm -rf "$directory" rm -rf "$directory"
} }
year=2022 year=$(date +%Y)
output=/tmp/$year.pdf output=/tmp/$year.pdf
for month in $(seq 1 12); do for month in $(seq 1 12); do
printf "\r%d" "$month" 1>&2 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 done
printf "\r" printf "\r"

5
ci.nix
View File

@@ -45,6 +45,7 @@
"mail/gmail/kieran.meinhardt" "mail/gmail/kieran.meinhardt"
"mail/meinhaki" "mail/meinhaki"
"mail/dslalewa" "mail/dslalewa"
"mail/fsklassp"
"mail/posteo" "mail/posteo"
"mega/password" "mega/password"
"nextcloud-fysi/password" "nextcloud-fysi/password"
@@ -52,8 +53,7 @@
"openweathermap.key" "openweathermap.key"
"restic/password" "restic/password"
"traadfri.key" "traadfri.key"
"tt-rss/password" "miniflux/password"
"tt-rss/private-rss.key"
"wifi/Aether.psk" "wifi/Aether.psk"
"spotify/username" "spotify/username"
"spotify/password" "spotify/password"
@@ -69,6 +69,7 @@
tabula = ensureFiles basic; tabula = ensureFiles basic;
ful = ensureFiles (["root.password"] ++ basic); ful = ensureFiles (["root.password"] ++ basic);
makanek = ensureFiles ([ makanek = ensureFiles ([
"grafana/admin"
"irc/retiolum" "irc/retiolum"
"irc/hackint" "irc/hackint"
"irc/libera" "irc/libera"

View File

@@ -20,9 +20,12 @@ in {
paths = [ paths = [
"/home/kfm/work" "/home/kfm/work"
"/home/kfm/projects" "/home/kfm/projects"
"/home/kfm/notes"
"/home/kfm/cloud" "/home/kfm/cloud"
"/home/kfm/.gnupg" "/home/kfm/.gnupg"
"/home/kfm/.ssh" "/home/kfm/.ssh"
"/mnt/sd-card/music"
"/mnt/sd-card/Books"
]; ];
}; };

View File

@@ -1,4 +1,8 @@
{pkgs, ...}: { {
pkgs,
config,
...
}: {
programs.chromium = { programs.chromium = {
enable = true; enable = true;
extensions = [ 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.systemPackages = [pkgs.brave];
environment.variables.BROWSER = "brave"; environment.variables.BROWSER = "brave";

View File

@@ -1,6 +1,10 @@
{ {
services.compton = { services.picom = {
enable = true; enable = true;
activeOpacity = 1;
fade = true;
fadeDelta = 10;
inactiveOpacity = 0.8;
shadow = true; shadow = true;
menuOpacity = 0.9; menuOpacity = 0.9;
shadowOpacity = 0.3; shadowOpacity = 0.3;

View File

@@ -8,6 +8,7 @@
inherit (lib.strings) makeBinPath; inherit (lib.strings) makeBinPath;
inherit (import <niveum/lib>) localAddresses kieran; inherit (import <niveum/lib>) localAddresses kieran;
scripts = import <niveum/packages/scripts> {inherit pkgs lib;}; scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
defaultApplications = (import <niveum/lib>).defaultApplications {inherit pkgs;};
in { in {
imports = [ imports = [
<home-manager/nixos> <home-manager/nixos>
@@ -68,32 +69,6 @@ in {
}; };
home-manager.users.me.xdg.enable = true; 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"; environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum";
@@ -220,6 +195,25 @@ in {
{ {
home-manager.users.me.home.stateVersion = "22.05"; 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 ./alacritty.nix
./backup.nix ./backup.nix
./bash.nix ./bash.nix
@@ -266,6 +260,7 @@ in {
./seafile.nix ./seafile.nix
./ssh.nix ./ssh.nix
./sshd.nix ./sshd.nix
./sound.nix
./sudo.nix ./sudo.nix
./nsxiv.nix ./nsxiv.nix
./themes.nix ./themes.nix

View File

@@ -10,7 +10,7 @@
cat > shell.nix <<'EOF' cat > shell.nix <<'EOF'
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {} }:
pkgs.mkShell { pkgs.mkShell {
buildInputs = []; packages = [];
} }
EOF EOF
''${EDITOR:-vim} shell.nix ''${EDITOR:-vim} shell.nix

View File

@@ -4,11 +4,11 @@
... ...
}: let }: let
inherit (import <niveum/lib>) defaultApplications; inherit (import <niveum/lib>) defaultApplications;
flameshot-once = flameshot-once = pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
in { in {
environment.systemPackages = [ environment.systemPackages = [
(flameshot-once.override { (flameshot-once.override {
name = "flameshot-once-kmein";
config = { config = {
imgur = { imgur = {
enable = true; enable = true;
@@ -16,29 +16,36 @@ in {
deleteUrl = "http://p.r/image/delete/%1"; deleteUrl = "http://p.r/image/delete/%1";
xdg-open.browser = (defaultApplications pkgs).browser; xdg-open.browser = (defaultApplications pkgs).browser;
}; };
timeout = 1000; settings.General = {
drawColor = "#ff0000"; autoCloseIdleDaemon = true;
drawThickness = 2; drawColor = "#ff0000";
showDesktopNotification = true; drawThickness = 2;
buttons = [ checkForUpdates = false;
"ARROW" showDesktopNotification = true;
"BLUR" disabledTrayIcon = true;
"CIRCLE" showHelp = false;
"CIRCLECOUNT" squareMagnifier = true;
"COPY" uploadWithoutConfirmation = true;
"DRAWER" buttons = [
"EXIT" "TYPE_ARROW"
"IMAGEUPLOADER" "TYPE_CIRCLE"
"MARKER" "TYPE_CIRCLECOUNT"
"MOVESELECTION" "TYPE_COPY"
"PENCIL" "TYPE_DRAWER"
"RECTANGLE" "TYPE_EXIT"
"SAVE" "TYPE_IMAGEUPLOADER"
"SELECTION" "TYPE_MARKER"
"SELECTIONINDICATOR" "TYPE_MOVESELECTION"
"TEXT" "TYPE_PENCIL"
"UNDO" "TYPE_PIXELATE"
]; "TYPE_RECTANGLE"
"TYPE_SAVE"
"TYPE_SELECTION"
# "TYPE_SELECTIONINDICATOR"
"TYPE_TEXT"
"TYPE_UNDO"
];
};
}; };
}) })
]; ];

View File

@@ -18,7 +18,7 @@
egyptianHiero = zip-font "EgyptianHiero" { egyptianHiero = zip-font "EgyptianHiero" {
url = "https://github.com/MKilani/Djehuty/archive/master.zip"; url = "https://github.com/MKilani/Djehuty/archive/master.zip";
sha256 = "0xaq16ysvxrkcn3264wkmm2ln0hpijpk4iq1n5i7d9gqhjhsav1x"; sha256 = "sha256-KbY4vedm757NWfDlgmNhslbZd+2Vs+o5PjtMMGDt61Y=";
}; };
antinoou = zip-font "Antinoou" { antinoou = zip-font "Antinoou" {
url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip"; 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"]; sansSerif = ["Noto Sans Display" "Noto Kufi Arabic" "Noto Sans Devanagari" "Noto Sans CJK JP"];
emoji = ["Noto Color Emoji"]; 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 = [ environment.systemPackages = [
pkgs.mr pkgs.mr
pkgs.git pkgs.git
pkgs.git-crypt
pkgs.gitAndTools.gitflow pkgs.gitAndTools.gitflow
pkgs.gitAndTools.gh pkgs.gitAndTools.gh
pkgs.gitAndTools.git-extras pkgs.gitAndTools.git-extras

View File

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

View File

@@ -10,15 +10,15 @@
"image/jpeg" = "nsxiv.desktop"; "image/jpeg" = "nsxiv.desktop";
"image/png" = "nsxiv.desktop"; "image/png" = "nsxiv.desktop";
"image/vnd.djvu+multipage" = "org.pwmt.zathura.desktop"; "image/vnd.djvu+multipage" = "org.pwmt.zathura.desktop";
"text/html" = "brave-browser.desktop"; "text/html" = "firefox.desktop";
"text/markdown" = "nvim.desktop"; "text/markdown" = "nvim.desktop";
"text/plain" = "nvim.desktop"; "text/plain" = "nvim.desktop";
"x-scheme-handler/about" = "brave-browser.desktop"; "x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/http" = "brave-browser.desktop"; "x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "brave-browser.desktop"; "x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/mailto" = "brave-browser.desktop"; "x-scheme-handler/mailto" = "firefox.desktop";
"x-scheme-handler/unknown" = "brave-browser.desktop"; "x-scheme-handler/unknown" = "firefox.desktop";
"x-scheme-handler/webcal" = "brave-browser.desktop"; "x-scheme-handler/webcal" = "firefox.desktop";
"inode/directory" = "pcmanfm.desktop"; "inode/directory" = "pcmanfm.desktop";
}; };
}; };

View File

@@ -87,26 +87,14 @@
color listfocus_unread blue default bold color listfocus_unread blue default bold
color info red default bold color info red default bold
urls-source "ttrss" urls-source "miniflux"
ttrss-url "https://feed.kmein.de" miniflux-url "https://feed.kmein.de"
ttrss-login "k" miniflux-login "kfm"
ttrss-flag-star "s" miniflux-password "${lib.strings.fileContents <secrets/miniflux/password>}"
ttrss-password "${lib.strings.fileContents <secrets/tt-rss/password>}"
ttrss-mode "multi"
''; '';
newsboat-sql = "${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db"; newsboat-sql = "${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db";
in { 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 = [ environment.systemPackages = [
pkgs.newsboat pkgs.newsboat
(pkgs.writers.writeDashBin "newsboat-unread-count" '' (pkgs.writers.writeDashBin "newsboat-unread-count" ''

View File

@@ -9,16 +9,5 @@
nix = { nix = {
package = pkgs.nixUnstable; package = pkgs.nixUnstable;
extraOptions = "experimental-features = nix-command flakes"; 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="
];
};
}; };
} }

View File

@@ -74,7 +74,7 @@ in {
dnsutils dnsutils
# FILE MANAGERS # FILE MANAGERS
lf lf
pcmanfm cinnamon.nemo
# MEDIA # MEDIA
ffmpeg ffmpeg
imagemagick imagemagick
@@ -185,6 +185,7 @@ in {
scripts.mpv-radio scripts.mpv-radio
# kmein.slide # kmein.slide
termdown termdown
scripts.alarm
scripts.tolino-screensaver scripts.tolino-screensaver
scripts.rfc scripts.rfc
scripts.tag scripts.tag

45
configs/sound.nix Normal file
View 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
];
}

52
flake.lock generated
View File

@@ -23,11 +23,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1672349765, "lastModified": 1675371293,
"narHash": "sha256-Ul3lSGglgHXhgU3YNqsNeTlRH1pqxbR64h+2hM+HtnM=", "narHash": "sha256-LrCjtrAXj/WJphhGEMnHgZs7oTsfOlvPfOjFTIvg39k=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "dd99675ee81fef051809bc87d67eb07f5ba022e8", "rev": "d1c7730bb707bf8124d997952f7babd2a281ae68",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -95,11 +95,11 @@
"nix-writers": { "nix-writers": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1670858162, "lastModified": 1675197881,
"narHash": "sha256-znQRO+ET3JovQjtPBib4ueuY9QtqEzPvHubhBEmmTaY=", "narHash": "sha256-gYtduNF59yqv4BgW4fC+tZHKE7cpOkZf+Y34psyFO5U=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "0c8de150426476b5287cf2787bbd85263691a802", "rev": "d1424777b5f2e12cbd80efd1b55335dcba7c32bd",
"revCount": 37, "revCount": 38,
"type": "git", "type": "git",
"url": "https://cgit.krebsco.de/nix-writers" "url": "https://cgit.krebsco.de/nix-writers"
}, },
@@ -110,11 +110,11 @@
}, },
"nixos-stable": { "nixos-stable": {
"locked": { "locked": {
"lastModified": 1672353432, "lastModified": 1675237434,
"narHash": "sha256-oZfgp/44/o2tWiylV30cR+DLyWTJ+5dhsdWZVpzs3e4=", "narHash": "sha256-YoFR0vyEa1HXufLNIFgOGhIFMRnY6aZ0IepZF5cYemo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "913a47cd064cc06440ea84e5e0452039a85781f0", "rev": "285b3ff0660640575186a4086e1f8dc0df2874b5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -126,11 +126,11 @@
}, },
"nixos-unstable": { "nixos-unstable": {
"locked": { "locked": {
"lastModified": 1672350804, "lastModified": 1675273418,
"narHash": "sha256-jo6zkiCabUBn3ObuKXHGqqORUMH27gYDIFFfLq5P4wg=", "narHash": "sha256-tpYc4TEGvDzh9uRf44QemyQ4TpVuUbxb07b2P99XDbM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "677ed08a50931e38382dbef01cba08a8f7eac8f6", "rev": "4d7c2644dbac9cf8282c0afe68fca8f0f3e7b2db",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -158,11 +158,11 @@
}, },
"retiolum": { "retiolum": {
"locked": { "locked": {
"lastModified": 1672359952, "lastModified": 1675364416,
"narHash": "sha256-LtjHkpWpI6BmKDFJcq8hIdrgvWUwR735ghyFkv57Ycw=", "narHash": "sha256-u7kbHg/cp+GdW55B6V52GG0D9+zWOhmVI2nh/NiMxfw=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "ba72b3c271867111d3d5e006c11c643dd7547d34", "rev": "ae5112af96361acc314e1d270d0c9281984fc517",
"revCount": 264, "revCount": 280,
"type": "git", "type": "git",
"url": "https://git.thalheim.io/Mic92/retiolum" "url": "https://git.thalheim.io/Mic92/retiolum"
}, },
@@ -194,11 +194,11 @@
"scripts": { "scripts": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1669193831, "lastModified": 1675238486,
"narHash": "sha256-R8RNb7mM0bDF3UTfQqpumYPBwal7QzWSKgxMUY2dRm8=", "narHash": "sha256-Hs9NKK0UFaNqrui2VauBnMnV/14U3eNWaI12EmVYXWY=",
"owner": "kmein", "owner": "kmein",
"repo": "scripts", "repo": "scripts",
"rev": "84ad80348294e9423996b52a4b112700ae5d3176", "rev": "5cefa5f112e7fe54e0302b7bc33bc06e1f762002",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -210,17 +210,17 @@
"stockholm": { "stockholm": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1672442705, "lastModified": 1675564669,
"narHash": "sha256-rvI3X92HXsBH0+nVm0K+lPfbobZDkkhXSa2RmNu8EA8=", "narHash": "sha256-Fd4wBl9b5Aqt4ctH2vJu/oPvgTOHD+ME8MUEu3oR2tE=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "de0226995d553e4a70170ce59483a6d71f41932d", "rev": "e44fe862f0bedc658aabd1daafb16376f188857e",
"revCount": 11156, "revCount": 11353,
"type": "git", "type": "git",
"url": "https://cgit.lassul.us/stockholm" "url": "https://cgit.krebsco.de/stockholm"
}, },
"original": { "original": {
"type": "git", "type": "git",
"url": "https://cgit.lassul.us/stockholm" "url": "https://cgit.krebsco.de/stockholm"
} }
}, },
"telebots": { "telebots": {

View File

@@ -39,7 +39,7 @@
flake = false; flake = false;
}; };
stockholm = { stockholm = {
url = "git+https://cgit.lassul.us/stockholm"; url = "git+https://cgit.krebsco.de/stockholm";
flake = false; flake = false;
}; };
telebots = { telebots = {
@@ -127,7 +127,7 @@
nix-writers = "https://cgit.krebsco.de/nix-writers"; nix-writers = "https://cgit.krebsco.de/nix-writers";
recht = github "kmein/recht"; recht = github "kmein/recht";
retiolum = "https://git.thalheim.io/Mic92/retiolum"; retiolum = "https://git.thalheim.io/Mic92/retiolum";
stockholm = "https://cgit.lassul.us/stockholm"; stockholm = "https://cgit.krebsco.de/stockholm";
scripts = github "kmein/scripts"; scripts = github "kmein/scripts";
telebots = github "kmein/telebots"; telebots = github "kmein/telebots";
tinc-graph = github "kmein/tinc-graph"; tinc-graph = github "kmein/tinc-graph";
@@ -165,7 +165,7 @@
if externalNetwork ? name if externalNetwork ? name
then externalNetwork.${name} then externalNetwork.${name}
else "${name}.r"; else "${name}.r";
unstable = name == "kabsa" || name == "manakish"; unstable = false; # name == "kabsa" || name == "manakish";
sources = sources =
["nix-writers" "nixpkgs" "retiolum" "stockholm"] ["nix-writers" "nixpkgs" "retiolum" "stockholm"]
++ { ++ {

View File

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

View File

@@ -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 { work-fysi = rec {
user = "kieran@fysi.tech"; user = "kieran@fysi.tech";
address = user; address = user;

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})' # 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 let
tags = { tags = {
ambient = "🧘 Ambient"; ambient = "ambient";
american = "🇺🇸 USA"; american = "american";
amro = "👦 Amro"; amro = "dj_amro";
arabic = "🇱🇧 عربي"; arabic = "arabi";
balkan = "🇧🇦 Balkan"; balkan = "balkan";
berlin = "🐻 Berlin"; berlin = "berlin";
brazilian = "🇧🇷 Brasil"; brazilian = "brasil";
chill = "🧊 Chill"; chill = "chill";
chinese = "🇨🇳 "; chinese = "china";
classical = "🎻 Classical"; classical = "classical";
discover = "😲 Discover"; discover = "discover";
danish = "🇩🇰 Dansk"; danish = "denmark";
dnb = "🥁 DnB"; dnb = "dnb";
dubstep = "🎆 Dubstep"; dubstep = "dubstep";
french = "🇫🇷 France"; french = "france";
geschepper = "🤯 Geschepper"; geschepper = "geschepper";
greek = "🇬🇷 Ελλάδα"; greek = "greece";
greenlandic = "🇬🇱 Kalaallit Nunaat"; greenlandic = "greenland";
groovy = "🕺 Groovy"; groovy = "groovy";
holy = " Holy"; holy = "holy";
indian = "🇮🇳 "; indian = "india";
irie = "🇯🇲 Irie"; irie = "jamaica";
irish = "🇮🇪 Éire"; irish = "ireland";
jazz = "🎷 Jazz"; jazz = "jazz";
lofi = " Lo-Fi"; lofi = "lofi";
metal = "🤘 Metal"; metal = "metal";
party = "🪩 Party"; party = "party";
pop = "🎙 Pop"; pop = "pop";
radiorecord = " Record"; radiorecord = "radiorecord";
rap = "💸 Rap"; rap = "rap";
rock = "🎸 Rock"; rock = "rock";
russian = "🇷🇺 Россия"; russian = "russia";
schlager = "💩 Schlager"; schlager = "schlager";
soma = "🍄 σμα "; soma = "soma";
text = "📚 Text"; text = "text";
top40 = " Top 40"; top40 = "top40";
trad = "👘 Trad"; trad = "trad";
trance = "🎇 Trance"; trance = "trance";
trap = "🪤 Trap"; trap = "trap";
turkish = "🇹🇷 Türkiye"; turkish = "turkey";
vintage = "🕰 Vintage"; vintage = "vintage";
wave = "🌊 "; wave = "wave";
xmas = "🎅 Christmas"; xmas = "xmas";
}; };
# https://github.com/NixOS/nixpkgs/blob/bc06c93905f60a82d6ebbb78f78cf289257860cc/lib/trivial.nix#L281-L282 # 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"; logo = "https://cdn.radiofrance.fr/s3/cruiser-production/2019/01/3c4dc967-ed2c-4ce5-a998-9437a64e05d5/300x300_rapfr.jpg";
tags = [tags.french tags.rap]; 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"; stream = "http://66.45.232.131:9994/;stream.mp3";
station = "ERTU Al Quran Al Kareem"; station = "ERTU Al Quran Al Kareem";
tags = [tags.arabic tags.text tags.holy]; 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/"; stream = "http://onair15.xdevel.com:7064/1/";
station = "Radio Mozart Italia"; station = "Radio Mozart Italia";
@@ -1861,5 +1882,31 @@ http://ca.radioboss.fm:8149/stream
Christian radio in all languages Christian radio in all languages
https://jesuscomingfm.com/# https://jesuscomingfm.com/#
tamazight http://live.jesuscomingfm.com:8462/; 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_liststyle=3 " tree view
let g:netrw_list_hide=netrw_gitignore#Hide() let g:netrw_list_hide=netrw_gitignore#Hide()
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
let g:netrw_winsize = 25
call matchadd('colorcolumn', '\%101v', 100) call matchadd('colorcolumn', '\%101v', 100)
highlight colorcolumn ctermbg=red highlight colorcolumn ctermbg=red

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation {
src = fetchgit { src = fetchgit {
url = "https://github.com/jgm/pandoc"; url = "https://github.com/jgm/pandoc";
rev = pandoc.version; rev = pandoc.version;
sha256 = "sha256-AY9GarrU7PBFgoYxqQkE2ghoUy7+0Gu6/Mwa+fdQM2U="; sha256 = "sha256-8mkHbHoXrkgcXZ/rYlVh2fhL12WjcTt97a1W+oYVYOs=";
}; };
buildPhase = '' buildPhase = ''
mkdir -p $out/man/man1 mkdir -p $out/man/man1

31
packages/rusty-jeep.nix Normal file
View 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];
};
}

View File

@@ -33,6 +33,25 @@ in
name = "instaget"; 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" '' infschmv = pkgs.writers.writeDashBin "InfSchMV" ''
${pkgs.curl}/bin/curl -sSL https://www.berlin.de/corona/massnahmen/verordnung/ \ ${pkgs.curl}/bin/curl -sSL https://www.berlin.de/corona/massnahmen/verordnung/ \
| ${pkgs.pup}/bin/pup .textile \ | ${pkgs.pup}/bin/pup .textile \

View File

@@ -13,7 +13,7 @@ in {
<niveum/configs/save-space.nix> <niveum/configs/save-space.nix>
<niveum/configs/spacetime.nix> <niveum/configs/spacetime.nix>
<niveum/configs/sshd.nix> <niveum/configs/sshd.nix>
<retiolum/modules/retiolum> <niveum/configs/retiolum.nix>
]; ];
nix.nixPath = ["/var/src"]; nix.nixPath = ["/var/src"];

View File

@@ -28,8 +28,8 @@ in {
<niveum/configs/save-space.nix> <niveum/configs/save-space.nix>
<niveum/configs/spacetime.nix> <niveum/configs/spacetime.nix>
<niveum/configs/sshd.nix> <niveum/configs/sshd.nix>
<niveum/configs/retiolum.nix>
<niveum/configs/telegram-bots> <niveum/configs/telegram-bots>
<retiolum/modules/retiolum>
<niveum/modules/passport.nix> <niveum/modules/passport.nix>
]; ];

View File

@@ -10,10 +10,39 @@
in { in {
services.grafana = { services.grafana = {
enable = true; enable = true;
settings.server = { settings = {
domain = "grafana.kmein.r"; server = {
http_port = 9444; domain = "grafana.kmein.r";
http_addr = "127.0.0.1"; 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 }: let
domain = "feed.kmein.de"; domain = "feed.kmein.de";
port = 8181;
in { in {
services.tt-rss = { services.miniflux = {
enable = true; enable = true;
logDestination = "syslog"; adminCredentialsFile = pkgs.writeText "miniflux" ''
root = "/var/lib/tt-rss"; ADMIN_USERNAME='kfm'
selfUrlPath = "https://${domain}"; ADMIN_PASSWORD='${lib.strings.fileContents <secrets/miniflux/password>}'
virtualHost = domain; '';
registration = { config = {
enable = false; FETCH_YOUTUBE_WATCH_TIME = "1";
maxUsers = 3; POLLING_FREQUENCY = "20";
PORT = toString port;
BASE_URL = "https://feed.kmein.de";
# POCKET_CONSUMER_KEY = ...
}; };
}; };
services.postgresqlBackup = { services.postgresqlBackup = {
enable = true; enable = true;
databases = [config.services.tt-rss.database.name]; databases = ["miniflux"];
}; };
services.nginx.virtualHosts.${domain} = { services.nginx.virtualHosts.${domain} = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString port}";
};
}; };
} }

View File

@@ -34,6 +34,11 @@
device = "/dev/disk/by-uuid/D4AC-91B0"; device = "/dev/disk/by-uuid/D4AC-91B0";
fsType = "vfat"; fsType = "vfat";
}; };
"/mnt/sd-card" = {
device = "/dev/disk/by-id/mmc-5E4S5_0x4c585d15-part1";
fsType = "ext4";
options = ["nofail"];
};
}; };
swapDevices = []; swapDevices = [];

View File

@@ -8,7 +8,7 @@ in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
<niveum/configs/spacetime.nix> <niveum/configs/spacetime.nix>
<retiolum/modules/retiolum> <niveum/configs/retiolum.nix>
<niveum/configs/sshd.nix> <niveum/configs/sshd.nix>
]; ];

View File

@@ -8,7 +8,7 @@ in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
<niveum/configs/spacetime.nix> <niveum/configs/spacetime.nix>
<retiolum/modules/retiolum> <niveum/configs/retiolum.nix>
<niveum/configs/sshd.nix> <niveum/configs/sshd.nix>
]; ];
@@ -51,6 +51,7 @@ in {
pkgs.firefox pkgs.firefox
pkgs.audacity pkgs.audacity
pkgs.pidgin pkgs.pidgin
pkgs.git
]; ];
networking = { networking = {

View File

@@ -26,8 +26,8 @@ in {
<niveum/configs/sshd.nix> <niveum/configs/sshd.nix>
# <niveum/configs/traadfri.nix> # <niveum/configs/traadfri.nix>
<niveum/configs/tmux.nix> <niveum/configs/tmux.nix>
<niveum/configs/retiolum.nix>
<niveum/configs/wpa_supplicant.nix> <niveum/configs/wpa_supplicant.nix>
<retiolum/modules/retiolum>
]; ];
services.restic.backups.moodle-dl = { services.restic.backups.moodle-dl = {

View File

@@ -1,7 +1,46 @@
let {pkgs, ...}: let
port = 8123; port = 8123;
mosquittoPort = 1883;
zigbee2mqttPort = 7977;
in { 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" = { services.nginx.virtualHosts."home.kmein.r" = {
locations."/" = { locations."/" = {
@@ -9,16 +48,150 @@ in {
}; };
}; };
virtualisation.oci-containers = { services.home-assistant = {
backend = "podman"; enable = true;
containers.homeassistant = { configWritable = true;
volumes = ["home-assistant:/config"]; lovelaceConfigWritable = true;
environment.TZ = "Europe/Berlin"; config = let
image = "ghcr.io/home-assistant/home-assistant:stable"; in {
extraOptions = [ homeassistant = {
"--network=host" name = "Home";
# "--device=/dev/ttyUSB0:/dev/ttyACM0" # Example, change this to match your own hardware 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; extraStopCommands = firewall.removeRules rules;
}; };
# to reset:
# ssh zaatar 'rm /var/lib/mpd/playlists/*.m3u && systemd-tmpfiles --create'
systemd.tmpfiles.rules = let systemd.tmpfiles.rules = let
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams); tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams; tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
@@ -93,7 +95,7 @@ in {
mode = "0644"; mode = "0644";
user = "mpd"; user = "mpd";
group = "mpd"; group = "mpd";
path = "/var/lib/mpd/playlist/all.m3u"; path = "/var/lib/mpd/playlists/all.m3u";
argument = makePlaylist "all" streams; argument = makePlaylist "all" streams;
}) })
]; ];