From fcb5d44b931b777aaf62d68f31c0a5142c23363c Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 6 Nov 2022 09:57:21 +0100 Subject: ma gui: restructure main-laptop --- makefu/2configs/gui/look-up.nix | 13 +++++++++++++ makefu/2configs/main-laptop.nix | 12 +----------- 2 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 makefu/2configs/gui/look-up.nix diff --git a/makefu/2configs/gui/look-up.nix b/makefu/2configs/gui/look-up.nix new file mode 100644 index 00000000..d27f5cff --- /dev/null +++ b/makefu/2configs/gui/look-up.nix @@ -0,0 +1,13 @@ +{ + systemd.services.look-up = { + startAt = "*:30"; + serviceConfig = { + ExecStart= pkgs.writeDash "look-up" '' + set -x + eval "export '$(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(${pkgs.procps}/bin/pgrep -u ${user} ${window-manager})/environ)'" + ${pkgs.libnotify}/bin/notify-send -u critical -t 9999999 'look up once in a while' + ''; + User = user; + }; + }; +} diff --git a/makefu/2configs/main-laptop.nix b/makefu/2configs/main-laptop.nix index cb78c823..a7181cfe 100644 --- a/makefu/2configs/main-laptop.nix +++ b/makefu/2configs/main-laptop.nix @@ -12,6 +12,7 @@ let in { imports = [ ./gui/base.nix + ./gui/look-up.nix ./fetchWallpaper.nix ./zsh-user.nix ./tools/core.nix @@ -72,15 +73,4 @@ in { location.latitude = 48.7; location.longitude = 9.1; - systemd.services.look-up = { - startAt = "*:30"; - serviceConfig = { - ExecStart= pkgs.writeDash "look-up" '' - set -x - eval "export '$(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(${pkgs.procps}/bin/pgrep -u ${user} ${window-manager})/environ)'" - ${pkgs.libnotify}/bin/notify-send -u critical -t 9999999 'look up once in a while' - ''; - User = user; - }; - }; } -- cgit v1.2.3 From ae39dfcefee2fe3cb369dabed074f14f5af7d6b5 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 17 Nov 2022 13:43:18 +0100 Subject: airsensor-py: fix py39 issues --- makefu/5pkgs/airsensor-py/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makefu/5pkgs/airsensor-py/default.nix b/makefu/5pkgs/airsensor-py/default.nix index 4eae26c0..86ea22d8 100644 --- a/makefu/5pkgs/airsensor-py/default.nix +++ b/makefu/5pkgs/airsensor-py/default.nix @@ -2,7 +2,7 @@ with pkgs.python3Packages; buildPythonApplication rec { name = "airsensor-py-${version}"; - version = "2017-12-05"; + version = "1.0.0"; propagatedBuildInputs = [ pyusb click @@ -11,7 +11,7 @@ buildPythonApplication rec { src = fetchFromGitHub { owner = "makefu"; repo = "airsensor-py"; - rev = "7ac5f185dc848fca1b556e4c0396dd73f6a93995"; - sha256 = "0387b025y8kb0zml7916p70hmzc3y18kqh46b9xv5qayljxymq2w"; + rev = "1.0.0"; + sha256 = "1jpvvl965bg3ymvr58c433jyy0smczn65fnqsskxn7basznii5g8"; }; } -- cgit v1.2.3 From 1eda659c24a118bcba849beb0fbf0ac9b5d32076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Thu, 1 Dec 2022 17:02:06 +0100 Subject: kartei: add alertmanager.kmein.r alias --- kartei/kmein/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/kartei/kmein/default.nix b/kartei/kmein/default.nix index 39125e35..d2aa8922 100644 --- a/kartei/kmein/default.nix +++ b/kartei/kmein/default.nix @@ -82,6 +82,7 @@ in "makanek.r" "makanek.kmein.r" "grafana.kmein.r" + "alertmanager.kmein.r" "names.kmein.r" "graph.r" "rrm.r" -- cgit v1.2.3 From 48ee52673e79f46e53fbfd86a9258a1a106d8ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Thu, 1 Dec 2022 19:57:54 +0100 Subject: kartei: add prometheus.kmein.r alias --- kartei/kmein/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/kartei/kmein/default.nix b/kartei/kmein/default.nix index d2aa8922..1a5a57d1 100644 --- a/kartei/kmein/default.nix +++ b/kartei/kmein/default.nix @@ -83,6 +83,7 @@ in "makanek.kmein.r" "grafana.kmein.r" "alertmanager.kmein.r" + "prometheus.kmein.r" "names.kmein.r" "graph.r" "rrm.r" -- cgit v1.2.3 From 217dffa8efce1db7618905e780c64eacf0d63d41 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 4 Dec 2022 21:53:01 +0100 Subject: ma ham: add heizung --- makefu/2configs/home/ham/automation/fenster_auf.nix | 2 +- makefu/2configs/home/ham/automation/shutdown_button.nix | 3 +++ makefu/2configs/home/ham/default.nix | 6 ++++++ makefu/2configs/home/ham/multi/heizung.nix | 11 +++++++++++ makefu/2configs/home/ham/sensor/dwd.nix | 2 ++ makefu/2configs/home/ham/sensor/outside.nix | 9 +++++++-- 6 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 makefu/2configs/home/ham/multi/heizung.nix diff --git a/makefu/2configs/home/ham/automation/fenster_auf.nix b/makefu/2configs/home/ham/automation/fenster_auf.nix index b3682fe0..698327ff 100644 --- a/makefu/2configs/home/ham/automation/fenster_auf.nix +++ b/makefu/2configs/home/ham/automation/fenster_auf.nix @@ -88,7 +88,7 @@ in { duschfenster_lang_offen.name = "Duschfenster lange offen"; ist_sommer = { name = "Es ist Sommer"; - initial = true; # TODO + initial = false; # TODO }; }; diff --git a/makefu/2configs/home/ham/automation/shutdown_button.nix b/makefu/2configs/home/ham/automation/shutdown_button.nix index ec1a2556..ec84bbe9 100644 --- a/makefu/2configs/home/ham/automation/shutdown_button.nix +++ b/makefu/2configs/home/ham/automation/shutdown_button.nix @@ -47,6 +47,9 @@ in { { service = "media_player.media_stop"; target.entity_id = all_media_player; } + { service = "script.turn_on"; + target.entity_id = "script.alle_heizungen_aus"; + } ]; } ]; diff --git a/makefu/2configs/home/ham/default.nix b/makefu/2configs/home/ham/default.nix index b0815293..861ec27a 100644 --- a/makefu/2configs/home/ham/default.nix +++ b/makefu/2configs/home/ham/default.nix @@ -18,6 +18,7 @@ in { # ./multi/flurlicht.nix ./multi/kurzzeitwecker.nix ./multi/the_playlist.nix + ./multi/heizung.nix # ./multi/fliegen-couter.nix ./device_tracker/openwrt.nix @@ -192,5 +193,10 @@ in { configDir = hassdir; }; + krebs.secret.files."hass-secrets" = { + source-path = toString + "/hass/secrets.yaml"; + path = "/var/lib/hass/secrets.yaml"; + owner.name = "hass"; + }; state = [ "/var/lib/hass/known_devices.yaml" ]; } diff --git a/makefu/2configs/home/ham/multi/heizung.nix b/makefu/2configs/home/ham/multi/heizung.nix new file mode 100644 index 00000000..73f90dfe --- /dev/null +++ b/makefu/2configs/home/ham/multi/heizung.nix @@ -0,0 +1,11 @@ +{ + services.home-assistant.config = + { + # 18 Grad + script.alle_heizungen_aus.sequence = [{ + service = "climate.set_temperature"; + target.entity_id = [ "climate.wohnzimmer_heizung" ]; + data.temperature = "18.0"; + }]; + }; +} diff --git a/makefu/2configs/home/ham/sensor/dwd.nix b/makefu/2configs/home/ham/sensor/dwd.nix index c1d55d03..623f099a 100644 --- a/makefu/2configs/home/ham/sensor/dwd.nix +++ b/makefu/2configs/home/ham/sensor/dwd.nix @@ -4,5 +4,7 @@ { platform = "dwd_weather_warnings"; region_name = "Stadt Stuttgart"; } + { platform = "nina"; + } ]; } diff --git a/makefu/2configs/home/ham/sensor/outside.nix b/makefu/2configs/home/ham/sensor/outside.nix index 332746be..d05e8a1f 100644 --- a/makefu/2configs/home/ham/sensor/outside.nix +++ b/makefu/2configs/home/ham/sensor/outside.nix @@ -4,8 +4,7 @@ services.home-assistant.config.sensor = [ { platform = "darksky"; - api_key = lib.removeSuffix "\n" - (builtins.readFile ); + api_key = "!secret darksky"; language = "de"; monitored_conditions = [ "summary" "icon" @@ -21,5 +20,11 @@ units = "si" ; scan_interval = "00:30:00"; } + { + platform = "open_meteo"; + } + { + platform = "met"; + } ]; } -- cgit v1.2.3 From 1df762657baf7d0c27a178113e613c94e6b12aa3 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 5 Dec 2022 16:17:24 +0100 Subject: k pkgs.ukrepl: init --- krebs/5pkgs/simple/ukrepl.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 krebs/5pkgs/simple/ukrepl.nix diff --git a/krebs/5pkgs/simple/ukrepl.nix b/krebs/5pkgs/simple/ukrepl.nix new file mode 100644 index 00000000..bdea4181 --- /dev/null +++ b/krebs/5pkgs/simple/ukrepl.nix @@ -0,0 +1,11 @@ +{ lib, pkgs,stdenv }: +let + src = pkgs.fetchFromGitHub { + owner = "makefu"; + repo = "ukrepl"; + rev = "0baa5cc4d5c3c17af704b69a800dd1f520ded8e3"; + hash = "sha256:1lnhkf02f18fvf3l2fcszvs4x115lql17akabd5ph9ff9z33k8rv"; + }; +in + pkgs.writers.writePython3Bin "ukrepl" {} (builtins.readFile (src + "/ukrepl")) + -- cgit v1.2.3 From b1d1322e25459f1f7c79a866b2abf06fc5535e33 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 8 Dec 2022 16:12:00 +0100 Subject: tv pinentry-urxvt: show tinted screenshots --- tv/5pkgs/simple/pinentry-urxvt/default.nix | 74 ++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/tv/5pkgs/simple/pinentry-urxvt/default.nix b/tv/5pkgs/simple/pinentry-urxvt/default.nix index 65b76c07..6e4f6b00 100644 --- a/tv/5pkgs/simple/pinentry-urxvt/default.nix +++ b/tv/5pkgs/simple/pinentry-urxvt/default.nix @@ -20,7 +20,11 @@ let type = lib.types.str; }; display = lib.mkOption { - default = ":0"; + default = null; + type = lib.types.nullOr lib.types.str; + }; + xwud.className = lib.mkOption { + default = "PinentryUrxvtXwudFloat"; type = lib.types.str; }; }; @@ -30,12 +34,76 @@ let in + # pinentry-urxvt - A mechanism for PIN entry utilizing rxvt-unicode + # + # This spawns a PIN entry terminal on top of a tinted screenshot of the + # current display's root window. The display for spawning the terminal can + # be predefined, in which case both the current and the predefined display + # will show the screenshot. + # + # The purpose of the screenshot, aside from looking nice, is to prevent entry + # of the PIN into the wrong window, e.g. by accidentally moving the cursor + # while typing. If necessary, the screenshot can be closed by sending 'q', + # 'Q', or ctrl-c while its focused. + # pkgs.write "pinentry-urxvt" { "/bin/pinentry".link = pkgs.writeDash "pinentry-urxvt-wrapper" '' set -efu + + trap cleanup EXIT + + cleanup() { + rm "$screenshot" + # Kill process group in order to kill screenshot windows. + ${pkgs.utillinux}/bin/kill 0 + } + + screenshot=$(${pkgs.coreutils}/bin/mktemp -t pinentry-urxvt.screenshot.XXXXXXXX) + + ${pkgs.xorg.xwd}/bin/xwd -root | + ${pkgs.imagemagick}/bin/convert xwd:- -fill \#424242 -colorize 80% xwd:"$screenshot" + + show_screenshot() { + ${pkgs.exec "pinentry-urxvt.show_screenshot" { + filename = "${pkgs.xorg.xwud}/bin/xwud"; + argv = [ + cfg.xwud.className + "-noclick" + ]; + }} < "$screenshot" & + wait_for_screenshot $! + } + + # Wait for the xwud window by trying to intercept the call to munmap(). + # If it cannot be intercepted within 0.1s, assume that attaching strace + # wasn't fast enough or xwud doesn't call munmap() anymore. In either + # case fall back to search the window by class name, assuming there can + # be only one per display. + wait_for_screenshot() { + if ! \ + ${pkgs.coreutils}/bin/timeout 0.1 \ + ${pkgs.strace}/bin/strace -p "$1" -e munmap 2>&1 | + read -r _ + then + until ${pkgs.xdotool}/bin/xdotool search \ + --classname ${lib.shell.escape cfg.xwud.className} + do + ${pkgs.coreutils}/bin/sleep 0.1 + done + fi + } + + show_screenshot + + ${lib.optionalString (cfg.display != null) /* sh */ '' + if test "$DISPLAY" != ${lib.shell.escape cfg.display}; then + export DISPLAY=${lib.shell.escape cfg.display} + show_screenshot + fi + ''} + exec 3<&0 4>&1 5>&2 - export DISPLAY=${lib.shell.escape cfg.display} - exec ${pkgs.rxvt_unicode}/bin/urxvt \ + ${pkgs.rxvt_unicode}/bin/urxvt \ -name ${lib.shell.escape cfg.appName} \ -e ${pkgs.writeDash "pinentry-urxvt-tty" '' set -efu -- cgit v1.2.3 From eb3285feea223f3aa2a54beeccbe3a9135067616 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 00:28:58 +0100 Subject: lib.mapNixDir: admit just files with .nix suffix --- lib/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 7c3b0370..d65c891a 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -95,9 +95,12 @@ let path = dirPath + "/${relPath}"; in nameValuePair (toPackageName name) (f path)) - (filter - (name: name != "default.nix" && !hasPrefix "." name) - (attrNames (readDir dirPath)))); + (attrNames + (filterAttrs + (name: type: + (type == "regular" && hasSuffix ".nix" name && name != "default.nix") || + (type == "directory" && !hasPrefix "." name)) + (readDir dirPath)))); # https://tools.ietf.org/html/rfc5952 normalize-ip6-addr = -- cgit v1.2.3 From e6863fe8c68ff3ad704b1eef4b71fb4870b83bdf Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 00:30:08 +0100 Subject: lib: add isNixDirEntry --- lib/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index d65c891a..ad3a78a0 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -96,11 +96,11 @@ let in nameValuePair (toPackageName name) (f path)) (attrNames - (filterAttrs - (name: type: - (type == "regular" && hasSuffix ".nix" name && name != "default.nix") || - (type == "directory" && !hasPrefix "." name)) - (readDir dirPath)))); + (filterAttrs isNixDirEntry (readDir dirPath)))); + + isNixDirEntry = name: type: + (type == "regular" && hasSuffix ".nix" name && name != "default.nix") || + (type == "directory" && !hasPrefix "." name); # https://tools.ietf.org/html/rfc5952 normalize-ip6-addr = -- cgit v1.2.3 From 5b579b8fb96c073ddf55935ee1dbb360a22f18b9 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 01:33:39 +0100 Subject: lib: add lib reference --- lib/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/default.nix b/lib/default.nix index ad3a78a0..149b97a7 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -194,3 +194,4 @@ let in lib +// { inherit lib; } -- cgit v1.2.3 From e56f5d7e61e46852ebe1b4904d6f4085091bd469 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 00:30:44 +0100 Subject: tv pkgs: use isNixDirEntry --- tv/5pkgs/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 5a018a16..494cb9e6 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -14,7 +14,6 @@ fix (foldl' (flip extends) (_: super) (map (name: import (./. + "/${name}")) - (filter - (name: name != "default.nix" && !hasPrefix "." name) - (pushBack "override" - (attrNames (readDir ./.)))))) + (pushBack "override" + (attrNames + (filterAttrs isNixDirEntry (readDir ./.)))))) -- cgit v1.2.3 From 6d64096cd99db27357bf2d038bdfdfc2d3a3aeae Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 01:31:56 +0100 Subject: tv: normalize lib imports --- tv/1systems/alnus/config.nix | 3 +-- tv/1systems/alnus/lib | 1 + tv/1systems/au/lib | 1 + tv/1systems/bu/config.nix | 6 ++---- tv/1systems/bu/lib | 1 + tv/1systems/lib | 1 + tv/1systems/mu/config.nix | 3 +-- tv/1systems/mu/lib | 1 + tv/1systems/nomic/config.nix | 3 +-- tv/1systems/nomic/lib | 1 + tv/1systems/querel/config.nix | 3 +-- tv/1systems/querel/lib | 1 + tv/1systems/wu/config.nix | 3 +-- tv/1systems/wu/lib | 1 + tv/1systems/xu/config.nix | 3 +-- tv/1systems/xu/lib | 1 + tv/1systems/zu/config.nix | 3 +-- tv/2configs/backup.nix | 5 ++--- tv/2configs/bash/default.nix | 7 ++----- tv/2configs/bash/lib | 1 + tv/2configs/binary-cache/default.nix | 2 +- tv/2configs/binary-cache/lib | 1 + tv/2configs/br.nix | 2 +- tv/2configs/default.nix | 3 +-- tv/2configs/exim-retiolum.nix | 7 ++----- tv/2configs/exim-smarthost.nix | 7 ++----- tv/2configs/gitconfig.nix | 7 ++----- tv/2configs/gitrepos.nix | 7 ++----- tv/2configs/htop.nix | 7 ++----- tv/2configs/hw/AO753.nix | 7 ++----- tv/2configs/hw/lib | 1 + tv/2configs/hw/w110er.nix | 5 ++--- tv/2configs/hw/x220.nix | 6 ++---- tv/2configs/imgur.nix | 3 +-- tv/2configs/lib | 1 + tv/2configs/nginx/default.nix | 7 ++----- tv/2configs/nginx/lib | 1 + tv/2configs/nginx/public_html.nix | 7 ++----- tv/2configs/pki/default.nix | 2 +- tv/2configs/pki/lib | 1 + tv/2configs/ppp.nix | 2 +- tv/2configs/pulse.nix | 6 ++---- tv/2configs/repo-sync/lib | 1 + tv/2configs/repo-sync/wiki.nix | 5 ++--- tv/2configs/retiolum.nix | 7 ++----- tv/2configs/ssh.nix | 7 ++----- tv/2configs/sshd.nix | 2 +- tv/2configs/urlwatch.nix | 2 +- tv/2configs/vim.nix | 6 ++---- tv/2configs/xdg.nix | 7 ++----- tv/2configs/xp-332.nix | 2 +- tv/2configs/xserver/Xmodmap.nix | 2 +- tv/2configs/xserver/default.nix | 5 ++--- tv/2configs/xserver/lib | 1 + tv/2configs/xserver/sxiv.nix | 2 +- tv/2configs/xserver/urxvt.nix | 2 +- tv/2configs/xserver/xserver.conf.nix | 5 ++--- tv/3modules/Xresources.nix | 2 +- tv/3modules/charybdis/config.nix | 2 +- tv/3modules/charybdis/default.nix | 3 ++- tv/3modules/charybdis/lib | 1 + tv/3modules/dnsmasq.nix | 2 +- tv/3modules/ejabberd/default.nix | 4 ++-- tv/3modules/ejabberd/lib | 1 + tv/3modules/focus.nix | 2 +- tv/3modules/hosts.nix | 7 ++----- tv/3modules/hw.nix | 2 +- tv/3modules/im.nix | 2 +- tv/3modules/iptables.nix | 6 ++---- tv/3modules/lib | 1 + tv/3modules/org.freedesktop.machine1.host-shell.nix | 3 ++- tv/3modules/slock.nix | 2 +- tv/3modules/x0vncserver.nix | 4 +--- tv/5pkgs/default.nix | 2 +- tv/5pkgs/haskell/default.nix | 2 +- tv/5pkgs/haskell/lib | 1 + tv/5pkgs/lib | 1 + tv/5pkgs/override/default.nix | 2 +- tv/5pkgs/override/lib | 1 + tv/5pkgs/rpi/default.nix | 4 +--- tv/5pkgs/rpi/lib | 1 + tv/5pkgs/simple/bash-fzf-history.nix | 2 +- tv/5pkgs/simple/default.nix | 2 +- tv/5pkgs/simple/lib | 1 + tv/5pkgs/simple/pinentry-urxvt/default.nix | 3 +-- tv/5pkgs/simple/pinentry-urxvt/lib | 1 + tv/5pkgs/simple/q/default.nix | 4 ++-- tv/5pkgs/simple/q/lib | 1 + tv/5pkgs/vim/default.nix | 2 +- tv/5pkgs/vim/hack.nix | 2 +- tv/5pkgs/vim/lib | 1 + tv/5pkgs/vim/nix.nix | 2 +- tv/5pkgs/vim/vim.nix | 2 +- tv/lib | 1 + 94 files changed, 121 insertions(+), 158 deletions(-) create mode 120000 tv/1systems/alnus/lib create mode 120000 tv/1systems/au/lib create mode 120000 tv/1systems/bu/lib create mode 120000 tv/1systems/lib create mode 120000 tv/1systems/mu/lib create mode 120000 tv/1systems/nomic/lib create mode 120000 tv/1systems/querel/lib create mode 120000 tv/1systems/wu/lib create mode 120000 tv/1systems/xu/lib create mode 120000 tv/2configs/bash/lib create mode 120000 tv/2configs/binary-cache/lib create mode 120000 tv/2configs/hw/lib create mode 120000 tv/2configs/lib create mode 120000 tv/2configs/nginx/lib create mode 120000 tv/2configs/pki/lib create mode 120000 tv/2configs/repo-sync/lib create mode 120000 tv/2configs/xserver/lib create mode 120000 tv/3modules/charybdis/lib create mode 120000 tv/3modules/ejabberd/lib create mode 120000 tv/3modules/lib create mode 120000 tv/5pkgs/haskell/lib create mode 120000 tv/5pkgs/lib create mode 120000 tv/5pkgs/override/lib create mode 120000 tv/5pkgs/rpi/lib create mode 120000 tv/5pkgs/simple/lib create mode 120000 tv/5pkgs/simple/pinentry-urxvt/lib create mode 120000 tv/5pkgs/simple/q/lib create mode 120000 tv/5pkgs/vim/lib create mode 120000 tv/lib diff --git a/tv/1systems/alnus/config.nix b/tv/1systems/alnus/config.nix index c36fbc4b..90501d56 100644 --- a/tv/1systems/alnus/config.nix +++ b/tv/1systems/alnus/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - imports = [ diff --git a/tv/1systems/alnus/lib b/tv/1systems/alnus/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/1systems/alnus/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/au/lib b/tv/1systems/au/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/1systems/au/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/bu/config.nix b/tv/1systems/bu/config.nix index 11cdac39..22e5f148 100644 --- a/tv/1systems/bu/config.nix +++ b/tv/1systems/bu/config.nix @@ -1,7 +1,5 @@ -{ config, pkgs, ... }: let - lib = import ../../../lib; -in { - +with import ./lib; +{ config, pkgs, ... }: { imports = [ ./disks.nix diff --git a/tv/1systems/bu/lib b/tv/1systems/bu/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/1systems/bu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/lib b/tv/1systems/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/1systems/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/mu/config.nix b/tv/1systems/mu/config.nix index 00bd5da1..00cdf84c 100644 --- a/tv/1systems/mu/config.nix +++ b/tv/1systems/mu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - imports = [ diff --git a/tv/1systems/mu/lib b/tv/1systems/mu/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/1systems/mu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/nomic/config.nix b/tv/1systems/nomic/config.nix index 4dc0b4e8..fb67814d 100644 --- a/tv/1systems/nomic/config.nix +++ b/tv/1systems/nomic/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.nomic; imports = [ diff --git a/tv/1systems/nomic/lib b/tv/1systems/nomic/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/1systems/nomic/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/querel/config.nix b/tv/1systems/querel/config.nix index 44c7685e..8df29f75 100644 --- a/tv/1systems/querel/config.nix +++ b/tv/1systems/querel/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - imports = [ diff --git a/tv/1systems/querel/lib b/tv/1systems/querel/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/1systems/querel/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/wu/config.nix b/tv/1systems/wu/config.nix index bf250cef..4d45f6d4 100644 --- a/tv/1systems/wu/config.nix +++ b/tv/1systems/wu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ../lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.wu; imports = [ diff --git a/tv/1systems/wu/lib b/tv/1systems/wu/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/1systems/wu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/xu/config.nix b/tv/1systems/xu/config.nix index 8a86e209..1d143ce3 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.xu; imports = [ diff --git a/tv/1systems/xu/lib b/tv/1systems/xu/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/1systems/xu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/zu/config.nix b/tv/1systems/zu/config.nix index 8a3040a3..169fa6bd 100644 --- a/tv/1systems/zu/config.nix +++ b/tv/1systems/zu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.zu; imports = [ diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix index a5e0cf4c..c8ab73b5 100644 --- a/tv/2configs/backup.nix +++ b/tv/2configs/backup.nix @@ -1,6 +1,5 @@ -{ config, lib, ... }: -with import ; -{ +with import ./lib; +{ config, pkgs, ... }: { krebs.backup.plans = { } // mapAttrs (_: recursiveUpdate { snapshots = { diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix index 92e2499a..c0855bb2 100644 --- a/tv/2configs/bash/default.nix +++ b/tv/2configs/bash/default.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { programs.bash = { interactiveShellInit = /* sh */ '' HISTCONTROL='erasedups:ignorespace' diff --git a/tv/2configs/bash/lib b/tv/2configs/bash/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/2configs/bash/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/binary-cache/default.nix b/tv/2configs/binary-cache/default.nix index 58791f4f..66d74071 100644 --- a/tv/2configs/binary-cache/default.nix +++ b/tv/2configs/binary-cache/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: with import ; +{ config, lib, pkgs, ... }: with import ./lib; { environment.etc."binary-cache.pubkey".text = config.krebs.build.host.binary-cache.pubkey; diff --git a/tv/2configs/binary-cache/lib b/tv/2configs/binary-cache/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/2configs/binary-cache/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/br.nix b/tv/2configs/br.nix index e6a46e90..4a8db2e3 100644 --- a/tv/2configs/br.nix +++ b/tv/2configs/br.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { imports = [ diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index c9047023..5710f28f 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - boot.tmpOnTmpfs = true; krebs.enable = true; diff --git a/tv/2configs/exim-retiolum.nix b/tv/2configs/exim-retiolum.nix index 3d4ada46..fefc6dd2 100644 --- a/tv/2configs/exim-retiolum.nix +++ b/tv/2configs/exim-retiolum.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.systemPackages = [ pkgs.eximlog ]; diff --git a/tv/2configs/exim-smarthost.nix b/tv/2configs/exim-smarthost.nix index 4a0dcf61..e905536d 100644 --- a/tv/2configs/exim-smarthost.nix +++ b/tv/2configs/exim-smarthost.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.systemPackages = [ pkgs.eximlog ]; diff --git a/tv/2configs/gitconfig.nix b/tv/2configs/gitconfig.nix index 771a4b2a..fb9b78e6 100644 --- a/tv/2configs/gitconfig.nix +++ b/tv/2configs/gitconfig.nix @@ -1,8 +1,5 @@ -{ config, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.etc.gitconfig.text = '' [alias] patch = !${pkgs.git}/bin/git --no-pager diff --no-color diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 4fba5fe7..d8e7755f 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -let { +with import ./lib; +{ config, pkgs, ... }: let { body = { diff --git a/tv/2configs/htop.nix b/tv/2configs/htop.nix index e78caeb5..09372980 100644 --- a/tv/2configs/htop.nix +++ b/tv/2configs/htop.nix @@ -1,8 +1,5 @@ -{ pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ pkgs, ... }: { nixpkgs.config.packageOverrides = super: { htop = pkgs.symlinkJoin { name = "htop"; diff --git a/tv/2configs/hw/AO753.nix b/tv/2configs/hw/AO753.nix index dd6fcfe6..b998fcf7 100644 --- a/tv/2configs/hw/AO753.nix +++ b/tv/2configs/hw/AO753.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { imports = [ ../smartd.nix diff --git a/tv/2configs/hw/lib b/tv/2configs/hw/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/2configs/hw/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix index 09dd9a49..bf749a98 100644 --- a/tv/2configs/hw/w110er.nix +++ b/tv/2configs/hw/w110er.nix @@ -1,6 +1,5 @@ -{ pkgs, ... }: let - lib = import ; -in { +with import ./lib; +{ pkgs, ... }: { imports = [ ../smartd.nix { diff --git a/tv/2configs/hw/x220.nix b/tv/2configs/hw/x220.nix index c3ec7b40..ee3c7dc0 100644 --- a/tv/2configs/hw/x220.nix +++ b/tv/2configs/hw/x220.nix @@ -1,7 +1,5 @@ -{ config, pkgs, ... }: let - lib = import ; -in -{ +with import ./lib; +{ config, pkgs, ... }: { imports = [ ../smartd.nix { diff --git a/tv/2configs/imgur.nix b/tv/2configs/imgur.nix index 1df67f93..e2212276 100644 --- a/tv/2configs/imgur.nix +++ b/tv/2configs/imgur.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - services.nginx.virtualHosts."ni.r" = { locations."/image" = { extraConfig = /* nginx */ '' diff --git a/tv/2configs/lib b/tv/2configs/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/2configs/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/nginx/default.nix b/tv/2configs/nginx/default.nix index efea3a84..6844df99 100644 --- a/tv/2configs/nginx/default.nix +++ b/tv/2configs/nginx/default.nix @@ -1,8 +1,5 @@ -{ config, lib, ... }: - -with import ; - -{ +with import ./lib; +{ config, ... }: { services.nginx = { enableReload = true; diff --git a/tv/2configs/nginx/lib b/tv/2configs/nginx/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/2configs/nginx/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/nginx/public_html.nix b/tv/2configs/nginx/public_html.nix index 43d7189e..c2403cd8 100644 --- a/tv/2configs/nginx/public_html.nix +++ b/tv/2configs/nginx/public_html.nix @@ -1,8 +1,5 @@ -{ config, lib, ... }: - -with import ; - -{ +with import ./lib; +{ config, ... }: { services.nginx = { enable = true; virtualHosts.default = { diff --git a/tv/2configs/pki/default.nix b/tv/2configs/pki/default.nix index 51a5c716..415755b1 100644 --- a/tv/2configs/pki/default.nix +++ b/tv/2configs/pki/default.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let certFile = config.environment.etc."ssl/certs/ca-certificates.crt".source; diff --git a/tv/2configs/pki/lib b/tv/2configs/pki/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/2configs/pki/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/ppp.nix b/tv/2configs/ppp.nix index c801401b..24d2831c 100644 --- a/tv/2configs/ppp.nix +++ b/tv/2configs/ppp.nix @@ -1,5 +1,5 @@ +with import ./lib; { config, pkgs, ... }: let - lib = import ; cfg = { pin = "@${toString }"; ttys.ppp = "/dev/ttyACM0"; diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix index 513a0eb1..7a07e815 100644 --- a/tv/2configs/pulse.nix +++ b/tv/2configs/pulse.nix @@ -1,7 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; -let +with import ./lib; +{ config, pkgs, ... }: let pkg = pkgs.pulseaudio; runDir = "/run/pulse"; diff --git a/tv/2configs/repo-sync/lib b/tv/2configs/repo-sync/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/2configs/repo-sync/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/repo-sync/wiki.nix b/tv/2configs/repo-sync/wiki.nix index 91343990..515e731c 100644 --- a/tv/2configs/repo-sync/wiki.nix +++ b/tv/2configs/repo-sync/wiki.nix @@ -1,6 +1,5 @@ -{ config, pkgs, ... }: let - lib = import ; -in { +with import ./lib; +{ config, pkgs, ... }: { krebs.repo-sync.enable = true; krebs.repo-sync.repos.wiki.branches.hotdog = { origin.url = "http://cgit.hotdog.r/wiki"; diff --git a/tv/2configs/retiolum.nix b/tv/2configs/retiolum.nix index 3c3b2adf..de77de38 100644 --- a/tv/2configs/retiolum.nix +++ b/tv/2configs/retiolum.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { krebs.tinc.retiolum = { enable = true; connectTo = filter (ne config.krebs.build.host.name) [ diff --git a/tv/2configs/ssh.nix b/tv/2configs/ssh.nix index 84d24736..ad828813 100644 --- a/tv/2configs/ssh.nix +++ b/tv/2configs/ssh.nix @@ -1,8 +1,5 @@ -{ config, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { # Override NixOS's "Allow DSA keys for now." environment.etc."ssh/ssh_config".text = mkForce '' AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"} diff --git a/tv/2configs/sshd.nix b/tv/2configs/sshd.nix index 79af5b01..4da8c821 100644 --- a/tv/2configs/sshd.nix +++ b/tv/2configs/sshd.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, ... }: let cfg.host = config.krebs.build.host; in { diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix index 619b0445..7ba364ff 100644 --- a/tv/2configs/urlwatch.nix +++ b/tv/2configs/urlwatch.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let exec = filename: args: url: { inherit url; diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index e296a0c8..909213d3 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -1,7 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; -let { +with import ./lib; +{ config, pkgs, ... }: let { body = { environment.systemPackages = [ vim-wrapper diff --git a/tv/2configs/xdg.nix b/tv/2configs/xdg.nix index 18bac9b3..b7c14af5 100644 --- a/tv/2configs/xdg.nix +++ b/tv/2configs/xdg.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.variables.XDG_RUNTIME_DIR = "/run/xdg/$LOGNAME"; systemd.tmpfiles.rules = let diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix index a97fb367..51fd1ae8 100644 --- a/tv/2configs/xp-332.nix +++ b/tv/2configs/xp-332.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { environment.etc."utsushi.conf".text = '' diff --git a/tv/2configs/xserver/Xmodmap.nix b/tv/2configs/xserver/Xmodmap.nix index 8e8e3dfd..8e555e92 100644 --- a/tv/2configs/xserver/Xmodmap.nix +++ b/tv/2configs/xserver/Xmodmap.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: -with import ; +with import ./lib; pkgs.writeText "Xmodmap" '' !keycode 66 = Caps_Lock diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 8bedb0e8..f534b557 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -1,6 +1,5 @@ -{ config, pkgs, ... }@args: -with import ; -let +with import ./lib; +{ config, pkgs, ... }@args: let cfg = { cacheDir = cfg.dataDir; configDir = "/var/empty"; diff --git a/tv/2configs/xserver/lib b/tv/2configs/xserver/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/2configs/xserver/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/xserver/sxiv.nix b/tv/2configs/xserver/sxiv.nix index 10e450da..eb862f88 100644 --- a/tv/2configs/xserver/sxiv.nix +++ b/tv/2configs/xserver/sxiv.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg.user = config.krebs.build.user; in { diff --git a/tv/2configs/xserver/urxvt.nix b/tv/2configs/xserver/urxvt.nix index 2d504e16..3502c635 100644 --- a/tv/2configs/xserver/urxvt.nix +++ b/tv/2configs/xserver/urxvt.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg.user = config.krebs.build.user; in { diff --git a/tv/2configs/xserver/xserver.conf.nix b/tv/2configs/xserver/xserver.conf.nix index 99038e5f..3fdfebf1 100644 --- a/tv/2configs/xserver/xserver.conf.nix +++ b/tv/2configs/xserver/xserver.conf.nix @@ -1,6 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; +with import ./lib; +{ config, pkgs, ... }: let cfg = config.services.xserver; diff --git a/tv/3modules/Xresources.nix b/tv/3modules/Xresources.nix index ab233dd6..266531de 100644 --- a/tv/3modules/Xresources.nix +++ b/tv/3modules/Xresources.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg = { enable = config.services.xserver.enable && config.tv.Xresources != {}; diff --git a/tv/3modules/charybdis/config.nix b/tv/3modules/charybdis/config.nix index dccbfde6..4669345e 100644 --- a/tv/3modules/charybdis/config.nix +++ b/tv/3modules/charybdis/config.nix @@ -1,4 +1,4 @@ -{ config, ... }: with import ; let +{ config, ... }: with import ./lib; let cfg = config.tv.charybdis; in toFile "charybdis.conf" '' /* doc/example.conf - brief example configuration file diff --git a/tv/3modules/charybdis/default.nix b/tv/3modules/charybdis/default.nix index 96aae702..4a0f9950 100644 --- a/tv/3modules/charybdis/default.nix +++ b/tv/3modules/charybdis/default.nix @@ -1,4 +1,5 @@ -{ config, lib, pkgs, ... }@args: with import ; let +with import ./lib; +{ config, pkgs, ... }@args: let cfg = config.tv.charybdis; in { options.tv.charybdis = { diff --git a/tv/3modules/charybdis/lib b/tv/3modules/charybdis/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/3modules/charybdis/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/3modules/dnsmasq.nix b/tv/3modules/dnsmasq.nix index ab24ac08..e1dfdea3 100644 --- a/tv/3modules/dnsmasq.nix +++ b/tv/3modules/dnsmasq.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, ... }: let cfg = config.tv.dnsmasq; in { diff --git a/tv/3modules/ejabberd/default.nix b/tv/3modules/ejabberd/default.nix index edc5296b..e3a41a57 100644 --- a/tv/3modules/ejabberd/default.nix +++ b/tv/3modules/ejabberd/default.nix @@ -1,5 +1,5 @@ -{ config, lib, pkgs, ... }@args: with import ; let - +with import ./lib; +{ config, pkgs, ... }: let cfg = config.tv.ejabberd; gen-dhparam = pkgs.writeDash "gen-dhparam" '' diff --git a/tv/3modules/ejabberd/lib b/tv/3modules/ejabberd/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/3modules/ejabberd/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/3modules/focus.nix b/tv/3modules/focus.nix index b1a7b2e5..c16d4424 100644 --- a/tv/3modules/focus.nix +++ b/tv/3modules/focus.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { options.tv.focus.enable = mkEnableOption "tv.focus"; } diff --git a/tv/3modules/hosts.nix b/tv/3modules/hosts.nix index 11874051..2d382e26 100644 --- a/tv/3modules/hosts.nix +++ b/tv/3modules/hosts.nix @@ -1,8 +1,5 @@ -{ config, ... }: - -with import ; - -{ +with import ./lib; +{ config, ... }: { options.tv.hosts = mkOption { type = types.attrsOf types.host; default = diff --git a/tv/3modules/hw.nix b/tv/3modules/hw.nix index 6eb722d2..db1a77c8 100644 --- a/tv/3modules/hw.nix +++ b/tv/3modules/hw.nix @@ -1,5 +1,5 @@ +with import ./lib; let - lib = import ; local.types.screen = lib.types.submodule { options.width = lib.mkOption { type = lib.types.uint; diff --git a/tv/3modules/im.nix b/tv/3modules/im.nix index e98a5732..76a61b19 100644 --- a/tv/3modules/im.nix +++ b/tv/3modules/im.nix @@ -1,6 +1,6 @@ +with import ./lib; { config, pkgs, ... }: let im = config.tv.im; - lib = import ; in { options = { tv.im.client.enable = lib.mkEnableOption "tv.im.client" // { diff --git a/tv/3modules/iptables.nix b/tv/3modules/iptables.nix index 9cf0bd5a..c4bf4644 100644 --- a/tv/3modules/iptables.nix +++ b/tv/3modules/iptables.nix @@ -1,7 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; -let { +with import ./lib; +{ config, pkgs, ... }: let { cfg = config.tv.iptables; body = { diff --git a/tv/3modules/lib b/tv/3modules/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/3modules/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/3modules/org.freedesktop.machine1.host-shell.nix b/tv/3modules/org.freedesktop.machine1.host-shell.nix index e1a5323d..7d31edf9 100644 --- a/tv/3modules/org.freedesktop.machine1.host-shell.nix +++ b/tv/3modules/org.freedesktop.machine1.host-shell.nix @@ -1,4 +1,5 @@ -{ config, ... }: let lib = import ../../lib; in { +with import ./lib; +{ config, ... }: { options.org.freedesktop.machine1.host-shell.access = lib.mkOption { default = {}; type = diff --git a/tv/3modules/slock.nix b/tv/3modules/slock.nix index 926adc8e..a0830321 100644 --- a/tv/3modules/slock.nix +++ b/tv/3modules/slock.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg = config.tv.slock; in { diff --git a/tv/3modules/x0vncserver.nix b/tv/3modules/x0vncserver.nix index 4dbb34df..f19bfebc 100644 --- a/tv/3modules/x0vncserver.nix +++ b/tv/3modules/x0vncserver.nix @@ -1,8 +1,6 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let - cfg = config.tv.x0vncserver; - in { options.tv.x0vncserver = { display = mkOption { diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 494cb9e6..245d0542 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -1,4 +1,4 @@ -with import ../../lib; +with import ./lib; let pushBack = x: xs: if elem x xs then diff --git a/tv/5pkgs/haskell/default.nix b/tv/5pkgs/haskell/default.nix index 33fd2506..f05223d7 100644 --- a/tv/5pkgs/haskell/default.nix +++ b/tv/5pkgs/haskell/default.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; let overrides = self: super: mapNixDir (path: self.callPackage path {}) [ diff --git a/tv/5pkgs/haskell/lib b/tv/5pkgs/haskell/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/5pkgs/haskell/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/lib b/tv/5pkgs/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/5pkgs/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/override/default.nix b/tv/5pkgs/override/default.nix index f719a9f6..87b7ce92 100644 --- a/tv/5pkgs/override/default.nix +++ b/tv/5pkgs/override/default.nix @@ -1,4 +1,4 @@ -with import ../../../lib; +with import ./lib; self: super: mapNixDir (path: import path self super) ./. diff --git a/tv/5pkgs/override/lib b/tv/5pkgs/override/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/5pkgs/override/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/rpi/default.nix b/tv/5pkgs/rpi/default.nix index f0ac47f6..e41d6373 100644 --- a/tv/5pkgs/rpi/default.nix +++ b/tv/5pkgs/rpi/default.nix @@ -1,6 +1,4 @@ -let - lib = import ; -in +with import ./lib; self: super: diff --git a/tv/5pkgs/rpi/lib b/tv/5pkgs/rpi/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/5pkgs/rpi/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/simple/bash-fzf-history.nix b/tv/5pkgs/simple/bash-fzf-history.nix index 88a8e9e4..1166ec7f 100644 --- a/tv/5pkgs/simple/bash-fzf-history.nix +++ b/tv/5pkgs/simple/bash-fzf-history.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { pkgs , edit-key ? "ctrl-e" diff --git a/tv/5pkgs/simple/default.nix b/tv/5pkgs/simple/default.nix index 9fb45dd1..82a19a9b 100644 --- a/tv/5pkgs/simple/default.nix +++ b/tv/5pkgs/simple/default.nix @@ -1,4 +1,4 @@ -with import ../../../lib; +with import ./lib; self: super: diff --git a/tv/5pkgs/simple/lib b/tv/5pkgs/simple/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/5pkgs/simple/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/simple/pinentry-urxvt/default.nix b/tv/5pkgs/simple/pinentry-urxvt/default.nix index 6e4f6b00..c768a9f5 100644 --- a/tv/5pkgs/simple/pinentry-urxvt/default.nix +++ b/tv/5pkgs/simple/pinentry-urxvt/default.nix @@ -1,8 +1,7 @@ +with import ./lib; { pkgs, ... }@args: let - lib = import ; - # config cannot be declared in the input attribute set because that would # cause callPackage to inject the wrong config. Instead, get it from ... # via args. diff --git a/tv/5pkgs/simple/pinentry-urxvt/lib b/tv/5pkgs/simple/pinentry-urxvt/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/5pkgs/simple/pinentry-urxvt/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/simple/q/default.nix b/tv/5pkgs/simple/q/default.nix index e17282e1..2ae71db5 100644 --- a/tv/5pkgs/simple/q/default.nix +++ b/tv/5pkgs/simple/q/default.nix @@ -1,5 +1,5 @@ -{ pkgs, ... }: -with import ; +with import ./lib; +{ pkgs }: let q-cal = let diff --git a/tv/5pkgs/simple/q/lib b/tv/5pkgs/simple/q/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/5pkgs/simple/q/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/vim/default.nix b/tv/5pkgs/vim/default.nix index e0e2761d..c143592a 100644 --- a/tv/5pkgs/vim/default.nix +++ b/tv/5pkgs/vim/default.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; self: super: { tv = super.tv // { diff --git a/tv/5pkgs/vim/hack.nix b/tv/5pkgs/vim/hack.nix index 0e949688..922d85ba 100644 --- a/tv/5pkgs/vim/hack.nix +++ b/tv/5pkgs/vim/hack.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { pkgs }: pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let diff --git a/tv/5pkgs/vim/lib b/tv/5pkgs/vim/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/5pkgs/vim/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/vim/nix.nix b/tv/5pkgs/vim/nix.nix index 01f769f1..43caf46c 100644 --- a/tv/5pkgs/vim/nix.nix +++ b/tv/5pkgs/vim/nix.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { pkgs }: pkgs.tv.vim.makePlugin (pkgs.write "vim-syntax-nix-nested" { diff --git a/tv/5pkgs/vim/vim.nix b/tv/5pkgs/vim/vim.nix index 6034dbda..c5693a24 100644 --- a/tv/5pkgs/vim/vim.nix +++ b/tv/5pkgs/vim/vim.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { pkgs }: pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let diff --git a/tv/lib b/tv/lib new file mode 120000 index 00000000..dc598c56 --- /dev/null +++ b/tv/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file -- cgit v1.2.3 From 3a0d3fed99265617503236e573733cb5c27e7139 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 04:42:09 +0100 Subject: =?UTF-8?q?tv:=20XMONAD=5FSPAWN=5FWORKSPACE=20=E2=86=92=20=5FCURRE?= =?UTF-8?q?NT=5FDESKTOP=5FNAME?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tv/2configs/bash/default.nix | 16 ++++++++++++++-- tv/2configs/default.nix | 2 +- tv/5pkgs/haskell/xmonad-tv/src/main.hs | 9 +-------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix index c0855bb2..e38566b7 100644 --- a/tv/2configs/bash/default.nix +++ b/tv/2configs/bash/default.nix @@ -14,8 +14,20 @@ with import ./lib; case $UID in ${shell.escape (toString config.krebs.users.tv.uid)}) - if test ''${SHLVL-1} = 1; then - case ''${XMONAD_SPAWN_WORKSPACE-} in + if test ''${SHLVL-1} = 1 && test -n "''${DISPLAY-}"; then + _CURRENT_DESKTOP_NAME=''${_CURRENT_DESKTOP_NAME-$( + ${pkgs.xorg.xprop}/bin/xprop -notype -root \ + 32i _NET_CURRENT_DESKTOP \ + 8s _NET_DESKTOP_NAMES \ + | + ${pkgs.gnused}/bin/sed -r 's/.* = //;s/"//g;s/, /\a/g' | + { + read -r _NET_CURRENT_DESKTOP + IFS=$'\a' read -ra _NET_DESKTOP_NAMES + echo "''${_NET_DESKTOP_NAMES[$_NET_CURRENT_DESKTOP]}" + } + )} + case $_CURRENT_DESKTOP_NAME in stockholm) cd ~/stockholm ;; diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 5710f28f..9babb92c 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -37,7 +37,7 @@ with import ./lib; { i18n.defaultLocale = mkDefault "C.UTF-8"; security.sudo.extraConfig = '' - Defaults env_keep+="SSH_CLIENT XMONAD_SPAWN_WORKSPACE" + Defaults env_keep+="SSH_CLIENT _CURRENT_DESKTOP_NAME" Defaults mailto="${config.krebs.users.tv.mail}" Defaults !lecture ''; diff --git a/tv/5pkgs/haskell/xmonad-tv/src/main.hs b/tv/5pkgs/haskell/xmonad-tv/src/main.hs index d346bfd6..c921d428 100644 --- a/tv/5pkgs/haskell/xmonad-tv/src/main.hs +++ b/tv/5pkgs/haskell/xmonad-tv/src/main.hs @@ -118,13 +118,6 @@ spawnRootTerm = Nothing -spawnTermAt :: String -> X () -spawnTermAt ws = do - env <- io getEnvironment - let env' = ("XMONAD_SPAWN_WORKSPACE", ws) : env - forkFile {-pkg:rxvt_unicode-}"urxvtc" [] (Just env') - - myKeys :: XConfig Layout -> Map (KeyMask, KeySym) (X ()) myKeys conf = Map.fromList $ [ ((_4 , xK_Escape ), forkFile {-pkg-}"slock" [] Nothing) @@ -133,7 +126,7 @@ myKeys conf = Map.fromList $ , ((_4 , xK_o ), forkFile {-pkg:fzmenu-}"otpmenu" [] Nothing) , ((_4 , xK_p ), forkFile {-pkg:fzmenu-}"passmenu" [] Nothing) - , ((_4 , xK_x ), chooseAction spawnTermAt) + , ((_4 , xK_x ), forkFile {-pkg:rxvt_unicode-}"urxvtc" [] Nothing) , ((_4C , xK_x ), spawnRootTerm) , ((_C , xK_Menu ), toggleWS) -- cgit v1.2.3 From 02cc22b95eab2f6db7c04ca3560f9c42fb67a9a7 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 04:58:02 +0100 Subject: tv vim: set ttymouse=sgr --- tv/2configs/vim.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 909213d3..b8819ee3 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -77,6 +77,7 @@ with import ./lib; set showmatch set timeoutlen=0 set ttimeoutlen=0 + set ttymouse=sgr set undodir=${dirs.undodir} set undofile set undolevels=1000000 -- cgit v1.2.3 From 3996bc0804dcfb6176f407dc951d814407c47cf2 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 8 Dec 2022 22:45:09 +0100 Subject: tv: init alacritty-tv --- tv/5pkgs/simple/alacritty-font-size.nix | 67 ++++++++++++++++++++++++ tv/5pkgs/simple/alacritty-tv.nix | 93 +++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 tv/5pkgs/simple/alacritty-font-size.nix create mode 100644 tv/5pkgs/simple/alacritty-tv.nix diff --git a/tv/5pkgs/simple/alacritty-font-size.nix b/tv/5pkgs/simple/alacritty-font-size.nix new file mode 100644 index 00000000..84bc3f61 --- /dev/null +++ b/tv/5pkgs/simple/alacritty-font-size.nix @@ -0,0 +1,67 @@ +{ pkgs }: + +pkgs.writeDashBin "font-size-alacritty" '' + # usage: font-size-alacritty (+N|-N|=N) + # Increase by, decrease by, or set font size to the value N. + + set -efu + + min_size=8 + + op=''${1%%[0-9]*} + op=''${op:-=} + + value=''${1#[=+-]} + + window_id=$(${pkgs.xdotool}/bin/xdotool getactivewindow) + + current_size=$( + ${pkgs.xorg.xprop}/bin/xprop -notype -id $window_id FONT_SIZE | + ${pkgs.gnused}/bin/sed -rn 's/.* = ([0-9]+)$/\1/p' + ) + + # usage: set_font_size WINDOW_ID FONT_SIZE + set_font_size() { + ${pkgs.alacritty}/bin/alacritty msg config -w $1 font.size=$2 + ${pkgs.xorg.xprop}/bin/xprop -id $1 -f FONT_SIZE 32c -set FONT_SIZE $2 + } + + # usage: reset_font_size WINDOW_ID + reset_font_size() { + ${pkgs.alacritty}/bin/alacritty msg config -w $1 font.size=$min_size + ${pkgs.xorg.xprop}/bin/xprop -id $1 -remove FONT_SIZE + } + + # usage: make_next_size + make_next_size() { + case $op in + -) next_size=$(expr $current_size - $value) ;; + =) next_size=$value ;; + +) + next_size=$(expr $current_size + $value) + test $next_size -ge $min_size || next_size=$min_size + ;; + esac + } + + if test -z "$current_size"; then + current_size=0 + make_next_size + if test $next_size -ge $min_size; then + ${pkgs.alacritty}/bin/alacritty msg config -w $window_id \ + font.normal.family='Input Mono' \ + font.normal.style=Condensed \ + font.bold.family='Input Mono' \ + font.bold.style=Bold + set_font_size $window_id $next_size + fi + else + make_next_size + if test $next_size -ge $min_size; then + set_font_size $window_id $next_size + else + ${pkgs.alacritty}/bin/alacritty msg config -w $window_id -r + reset_font_size $window_id + fi + fi +'' diff --git a/tv/5pkgs/simple/alacritty-tv.nix b/tv/5pkgs/simple/alacritty-tv.nix new file mode 100644 index 00000000..466ff27c --- /dev/null +++ b/tv/5pkgs/simple/alacritty-tv.nix @@ -0,0 +1,93 @@ +{ pkgs }: + +let + lib = import ./lib; + font-size = arg: { + program = "${pkgs.font-size-alacritty}/bin/font-size-alacritty"; + args = [arg]; + }; + config = { + bell.animation = "EaseOut"; + bell.duration = 50; + bell.color = "#ff00ff"; + colors.cursor.cursor = "#f042b0"; + colors.primary.background = "#202020"; + colors.primary.foreground = "#d0d7d0"; + colors.normal.black = "#000000"; + colors.normal.red = "#cd0000"; + colors.normal.green = "#00cd00"; + colors.normal.yellow = "#bc7004"; + colors.normal.blue = "#4343be"; + colors.normal.magenta = "#cb06cb"; + colors.normal.cyan = "#04c9c9"; + colors.normal.white = "#bebebe"; + colors.bright.black = "#727272"; + colors.bright.red = "#fb6262"; + colors.bright.green = "#72fb72"; + colors.bright.yellow = "#fbfb72"; + colors.bright.blue = "#7272fb"; + colors.bright.magenta = "#fb53fb"; + colors.bright.cyan = "#72fbfb"; + colors.bright.white = "#fbfbfb"; + draw_bold_text_with_bright_colors = true; + font.normal.family = "Clean"; + font.bold.family = "Clean"; + font.bold.style = "Regular"; + font.size = 10; + hints.enabled = [ + { + regex = "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)[^\\u0000-\\u001F\\u007F-\\u009F<>\"\\s{-}\\^⟨⟩`]+"; + mouse.enabled = true; + post_processing = true; + action = "Select"; + } + ]; + key_bindings = [ + { key = "Up"; mods = "Shift|Control"; command = font-size "=14"; } + { key = "Up"; mods = "Control"; command = font-size "+1"; } + { key = "Down"; mods = "Control"; command = font-size "-1"; } + { key = "Down"; mods = "Shift|Control"; command = font-size "=0"; } + ]; + scrolling.multiplier = 8; + }; + config-file = pkgs.writeJSON "alacritty-tv.json" config; +in + +pkgs.symlinkJoin { + name = "alacritty-tv"; + paths = [ + (pkgs.writeDashBin "alacritty" '' + # usage: + # alacritty [--singleton] [ARGS...] + + set -efu + + # Use home so Alacritty can find the configuration without arguments. + # HOME will be reset once in Alacritty. + HOME=$TMPDIR/Alacritty + export HOME + + # Install stored configuration if it has changed. + # This allows for both declarative updates and runtime modifications. + ${pkgs.coreutils}/bin/mkdir -p "$HOME" + ref=$(${pkgs.coreutils}/bin/cat "$HOME"/ref) + if test "$ref" != ${config-file}; then + echo ${config-file} > "$HOME"/ref + ${pkgs.coreutils}/bin/cp ${config-file} "$HOME"/.alacritty.yml + fi + + case ''${1-} in + --singleton) + shift + if ! ${pkgs.alacritty}/bin/alacritty msg create-window "$@"; then + ${pkgs.alacritty}/bin/alacritty "$@" & + fi + ;; + *) + exec ${pkgs.alacritty}/bin/alacritty "$@" + ;; + esac + '') + pkgs.alacritty + ]; +} -- cgit v1.2.3 From ee44d27ef7df359ac82cfb4c0fbdf99714b06988 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 15:04:18 +0100 Subject: krebs-pages: import current krebscode.github.com From https://github.com/krebscode/krebscode.github.com Commit 4676108df07c2a058c4b98f6b0c3ace36fe861b2 --- krebs/5pkgs/simple/krebs-pages/fixtures/index.html | 21 +--- .../simple/krebs-pages/fixtures/thesauron.html | 133 --------------------- 2 files changed, 6 insertions(+), 148 deletions(-) delete mode 100644 krebs/5pkgs/simple/krebs-pages/fixtures/thesauron.html diff --git a/krebs/5pkgs/simple/krebs-pages/fixtures/index.html b/krebs/5pkgs/simple/krebs-pages/fixtures/index.html index e6b7034b..68b2cbad 100644 --- a/krebs/5pkgs/simple/krebs-pages/fixtures/index.html +++ b/krebs/5pkgs/simple/krebs-pages/fixtures/index.html @@ -24,19 +24,10 @@ } -

- - Linuxtag Heckenkrebs Presentation - -

-

- - CTF Writeups - -

-

- - Thesauron - -

+

krops

+

Thesauron

+

Project: The new NixOS wiki

+

Go through this amazon affiliate link and generate krebsgold

+

Go through this aliexpress affiliate link and generate krebsgold

+ diff --git a/krebs/5pkgs/simple/krebs-pages/fixtures/thesauron.html b/krebs/5pkgs/simple/krebs-pages/fixtures/thesauron.html deleted file mode 100644 index bcf1c5d4..00000000 --- a/krebs/5pkgs/simple/krebs-pages/fixtures/thesauron.html +++ /dev/null @@ -1,133 +0,0 @@ -

Cholerab n. -[de] -- Kunstwort aus Kollaboration und Cholera. Beschreibt den Zustand, dass - Zusammenarbeit niemals gut, einfach und ohne Schmerzen funktioniert. -- Teamwork-Plattform für Krebscode.

- -

eigentlich adv. -[de] -- Hinweis darauf, dass der Inhalt eines Satzes eine Soll-Realität beschreibt, - die nicht der Fall ist. -Antonym: tatsaechlich

- -

ghost n. -[de] -- Host im Darknet welcher evtl. irgendwie noch da ist (als dd image auf anderen - Festplatten) aber wohl nie wieder kommen wird. -Siehe: Wiederbelebung

- -

KD;RP abbr. (pronounciation: kah-derp) -[en] -- Short for Krebs Darknet / Retiolum Prefix.

- -

krebs -[de] -- krebs ist ein soziales Experiment, eine Organisation, das zweit aelteste - Softwareprojekt im Shack und viel verteilte infrastruktur.

- -

kremium -[en] -- coinage derived from the words premium and krebs -see: broken -usage: Reaktor ircbot has unfixed broken behavior since ever->“Kremium Software”

- -

KRI abbr. (pronounciation: [en] cry) -[en] -- Short for Krebs Request for Implementation. - Derived from Scheme Requests for Implementation (SRFI).

- -

litterate programming n. -[en] -- any code that has not been proved mathematically.

- -

Nahziel n. -[de] -- Ziel mit höchst möglicher Priorität.

- -

Nahzielerfahrung n. -[de] -- das Erlebnis der (endgültigen) Nichterreichung eines Nahziels (obwohl - nur noch wenig ((quasi-) infinitesimal viel) nötig gewesen wäre).

- -

parentheses of fear -[en] -- unnecessary parentheses, usually used when order of precedence is unknown. - - Examples: 1 + (2 * 3)

- -

Protip n. -[en] -- (Probably vague) description how a task can be solved. - - Antonym: Spoiler - - Example: - - To defeat the Cyberdaemon, shoot at it until it dies. - - RTFM

- -

Punching Lemma n. -[de] -- Sozialer Druck zur Aufrechterhaltung der Ordnung in dem sozialen Geflaecht - von Krebs

- -

ref, n. -[en] -- A reference like an URI, ISBN, name of a person, etc.

- -

reftrace, n. -[en] -- A stacktrace-like representation of refs that lead to some (any kind of) - conclusion. Usually generated by a human. The conclusion can be either on - the top or on the bottom of the stack. If the order is ambiguous, then it - should be communicated explicitly. - - Example: (conclusion first