dendritic: rewrote entire config

This commit is contained in:
2026-05-23 20:18:11 +02:00
parent a93284ff80
commit c8ee6d85fe
190 changed files with 6764 additions and 8101 deletions
+5 -1
View File
@@ -1,3 +1,7 @@
Used for custom package derivation.
Used for custom package derivation or for scripts.
For example, to use a newer package version that is still not in nixpkgs-unstable.
Some rules about package naming:
* If it is a custom derivation of a package, end with `ManuallyDerived`
* If it is a script, start with `custom-`. The executable, package name (and file name if it is the only thing in this nix file) must be equal.
+13
View File
@@ -0,0 +1,13 @@
{ ... }: {
flake.packages.custom-bottom = { pkgs, ... }:
pkgs.writeShellApplication {
name = "custom-bottom";
runtimeInputs = with pkgs; [
kitty
bottom
];
text = ''
kitty --class "custom-bottom" -o font_size=10 --name "custom-bottom" -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T
'';
};
}
+73
View File
@@ -0,0 +1,73 @@
{ ... }: {
flake.packages.custom-colorpicker = { pkgs, ... }:
pkgs.writeShellApplication {
# useless. Just use hyprpicker
name = "custom-colorpicker";
runtimeInputs = with pkgs; [
hyprpicker
libnotify
toybox
wl-clipboard
];
text = ''
check() {
command -v "$1" 1>/dev/null
}
notify() {
check notify-send && {
notify-send -a "Color Picker" "$@"
return
}
echo "$@"
}
loc="$HOME/.cache/colorpicker"
[ -d "$loc" ] || mkdir -p "$loc"
[ -f "$loc/colors" ] || touch "$loc/colors"
limit=10
[[ $# -eq 1 && $1 = "-l" ]] && {
cat "$loc/colors"
exit
}
[[ $# -eq 1 && $1 = "-j" ]] && {
text="$(head -n 1 "$loc/colors")"
mapfile -t allcolors < <(tail -n +2 "$loc/colors")
# allcolors=($(tail -n +2 "$loc/colors"))
tooltip="<b> COLORS</b>\n\n"
tooltip+="-> <b>$text</b> <span color='$text'>󰸌</span> \n"
for i in "''${allcolors[@]}"; do
tooltip+=" <b>$i</b> <span color='$i'>󰸌</span> \n"
done
cat <<EOF
{ "text":"<span color='$text'>󰸌</span>", "tooltip":"$tooltip"}
EOF
exit
}
check hyprpicker || {
notify "hyprpicker is not installed"
exit
}
killall -q hyprpicker
color=$(hyprpicker)
check wl-copy && {
echo "$color" | sed -z 's/\n//g' | wl-copy
}
prevColors=$(head -n $((limit - 1)) "$loc/colors")
echo "$color" >"$loc/colors"
echo "$prevColors" >>"$loc/colors"
sed -i '/^$/d' "$loc/colors"
pkill -RTMIN+1 waybar
'';
};
}
+83
View File
@@ -0,0 +1,83 @@
{ ... }: {
flake.packages.custom-cowsay = { pkgs, ... }:
pkgs.writeShellApplication {
name = "custom-cowsay";
runtimeInputs = with pkgs; [
cowsay
];
text = ''
cows=("actually" "alpaca" "bud-frogs" "daemon" "elephant-in-snake" "moofasa" "skeleton" "three-eyes" "supermilker" "tux" "vader" "www")
declare -a sentences=(
"Sharing knowledge is the most fundamental act of friendship. Because it is a way you can give something without loosing something. -Richard Stallman"
"Free software' is a matter of liberty, not price. To understand the concept, you should think of 'free' as in 'free speech,' not as in 'free beer'. -Richard Stallman"
"Programming is not a science. Programming is a craft. -Richard Stallman"
"I did write some code in Java once, but that was the island in Indonesia. -Richard Stallman"
"Facebook is not your friend, it is a surveillance engine. -Richard Stallman"
"People said I should accept the world. Bullshit! I don't accept the world. -Richard Stallman"
"You can use any editor you want, but remember that vi vi vi is the text editor of the beast. -Richard Stallman"
"The idea of copyright did not exist in ancient times, when authors frequently copied other authors at length in works of non-fiction. This practice was useful, and is the only way many authors' works have survived even in part. -Richard Stallman"
"Idiots can be defeated but they never admit it. -Richard Stallman"
"Open source is a development methodology; free software is a social movement. -Richard Stallman"
"People sometimes ask me if it is a sin in the Church of Emacs to use vi. Using a free version of vi is not a sin; it is a penance. So happy hacking. -Richard Stallman"
"A computer is like air conditioning - it becomes useless when you open Windows -Linus Torvald"
"Intelligence is the ability to avoid doing work, yet getting the work done. -Linus Torvald"
"Software is like sex: It's better when it's free. -Linus Torvald"
"All operating systems sucks, but Linux just sucks less -Linus Torvald"
"I like offending people, because I think people who get offended should be offended. -Linus Torval"
"Talk is cheap. Show me the code. -Linus Torval"
"Most of the good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program. -Linus Torvald"
"Bad programmers worry about the code. Good programmers worry about data structures and their relationships. -Linus Torvald"
"If Microsoft ever does applications for Linux it means I've won. -Linus Torvald"
"Avoiding complexity reduces bugs. -Linus Torvald"
"Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it. -Linus Torvald"
"Nobody actually creates perfect code the first time around, except me. But there's only one of me. -Linus Torvald"
"Microsoft isn't evil, they just make really crappy operating systems. -Linus Torvald"
"When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, for free.' -Linus Torval"
"C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. -Linus Torvald"
"If you think your users are idiots, only idiots will use it. -Linus Torvald"
"My name is Linus, and I am your God. -Linus Torvald"
"An infinite number of monkeys typing into GNU emacs would never make a good program. -Linus Torvald"
"Object-oriented programming is an exceptionally bad idea which could only have originated in California. -Edgser Dijkstra"
"If debugging is the process of removing software bugs, then programming must be the process of putting them in. -Edgser Dijkstra"
"The art of programming is the art of organizing complexity. -Edgser Dijkstra"
"Program testing can be used to show the presence of bugs, but never to show their absence! -Edgser Dijkstra"
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. -Edgser Dijkstra"
"The effort of using machines to mimic the human mind has always struck me as rather silly. I would rather use them to mimic something better. -Edgser Dijkstra"
"Computer science is no more about computers than astronomy is about telescopes. -Edgser Dijkstra"
"Programming in Basic causes brain damage. -Edgser Dijkstra"
"The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. -Edgser Dijkstra"
"If in physics there's something you don't understand, you can always hide behind the uncharted depths of nature. You can always blame God. You didn't make it so complex yourself. But if your program doesn't work, there is no one to hide behind. You cannot hide behind an obstinate nature. If it doesn't work, you've messed up. -Edgser Dijkstra"
"Teaching COBOL ought to be regarded as a criminal act. -Edgser Dijkstra"
"If you want more effective programmers, you will discover that they should not waste their time debugging, they should not introduce the bugs to start with. -Edgser Dijkstra"
"If we wish to count lines of code, we should not regard them as 'lines produced' but as 'lines spent.' -Edgser Dijkstra"
"In almost every computation a great variety of arrangements for the succession of the processes is possible, and various considerations must influence the selections amongst them for the purposes of a calculating engine. One essential object is to choose that arrangement which shall tend to reduce to a minimum the time necessary for completing the calculation. -Ada Lovelace"
"Im making an operating system myself, so I know what its like to be God. -Terry Davis"
"Im schizophrenic and so am I. -Terry Davis"
"If I was a dog, I would bark. -Terry Davis"
"Who has a better kernel? Debian? No. -Terry Davis"
"Computers are fast, programmers keep it slow. -A random Reddit user"
"Before software can be reusable it first has to be usable. -Ralph Johnson"
"The best thing about a Boolean is that even if you are wrong, you're only off by a bit. -Anonymous"
"It's not a bug, it's a feature. -Programmers"
"NVIDIA, fuck you -Linus Torvald"
)
while true
do
echo
echo
echo
echo
echo
echo
SIndex=$(( RANDOM % ''${#sentences[@]} ))
index=$(( RANDOM % ''${#cows[@]} ))
#cow="/usr/share/cowsay/cows/''${cows[index]}.cow"
cowsay -f "''${cows[index]}" "''${sentences[SIndex]}"
sleep 10
clear
done
'';
# reduce terminal size for actually
};
}
+30
View File
@@ -0,0 +1,30 @@
{ ... }:
{
flake.packages.custom-syllabes = { pkgs, ... }:
# counts how many syllabes in a string.
# not perfect. Does not handle silents e in french
# but that's what I use for writing poetry
pkgs.writers.writePython3Bin "custom-syllabes" {
libraries = with pkgs; [
python3Packages.pyphen
];
} ''
import sys
import pyphen
dic = pyphen.Pyphen(lang="fr")
text = sys.stdin.read().strip()
chunks = []
total = 0
for w in text.split():
hyphenated = dic.inserted(w)
parts = hyphenated.split("-")
chunks.append("/".join(parts))
total += len(parts)
print(f"{total} ({'/'.join(chunks)})")
'';
}
+14
View File
@@ -0,0 +1,14 @@
{ ... }:
{
flake.packages.custom-tomato = { pkgs, ... }:
pkgs.writeShellApplication {
name = "custom-tomato";
runtimeInputs = with pkgs; [
kitty
tomato-c
];
text = ''
kitty --class "custom-pomodoro" --name "custom-pomodoro" -e tomato
'';
};
}
+16
View File
@@ -0,0 +1,16 @@
{ ... }:
{
flake.packages.custom-weather = { pkgs, ... }:
pkgs.writeShellApplication {
name = "custom-weather";
runtimeInputs = with pkgs; [
curl
];
text = ''
while true; do
curl "https://wttr.in/?0&d&q&F&lang=fr"
sleep 7200
done
'';
};
}
-41
View File
@@ -1,41 +0,0 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "deja";
version = "0.2.6";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "Giammarco-Ferranti";
repo = "deja";
tag = "v${finalAttrs.version}";
hash = "sha256-xxbClKhhSwo+jUjAZ2gS4yOS5sSI76dfPpDzA3qdV18=";
};
vendorHash = "sha256-KmLdMK94cGOXMPJwWS6NgLB5OiNmJbszHdnLzauqJm8=";
ldflags = [
"-s"
"-w"
"-X main.version=${finalAttrs.version}"
];
doCheck = true;
nativeCheckInputs = [versionCheckHook];
passthru.updateScript = nix-update-script {};
meta = {
description = "Predictive inline shell autosuggestions for zsh";
homepage = "https://github.com/Giammarco-Ferranti/deja";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [tomasrivera];
mainProgram = "deja";
};
})
+43
View File
@@ -0,0 +1,43 @@
{ ... }: {
flake.packages.dejaManuallyDerived = {
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "deja";
version = "0.2.6";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "Giammarco-Ferranti";
repo = "deja";
tag = "v${finalAttrs.version}";
hash = "sha256-xxbClKhhSwo+jUjAZ2gS4yOS5sSI76dfPpDzA3qdV18=";
};
vendorHash = "sha256-KmLdMK94cGOXMPJwWS6NgLB5OiNmJbszHdnLzauqJm8=";
ldflags = [
"-s"
"-w"
"-X main.version=${finalAttrs.version}"
];
doCheck = true;
nativeCheckInputs = [versionCheckHook];
passthru.updateScript = nix-update-script {};
meta = {
description = "Predictive inline shell autosuggestions for zsh";
homepage = "https://github.com/Giammarco-Ferranti/deja";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [tomasrivera];
mainProgram = "deja";
};
});
}
-123
View File
@@ -1,123 +0,0 @@
{
lib,
stdenv,
fetchpatch,
fetchurl,
cmake,
extra-cmake-modules,
shared-mime-info,
wrapQtAppsHook,
qtbase,
karchive,
kcompletion,
kconfig,
kcoreaddons,
kcrash,
kdoctools,
ki18n,
kiconthemes,
kio,
knewstuff,
kparts,
ktextwidgets,
kxmlgui,
syntax-highlighting,
gsl,
poppler,
fftw,
hdf5,
netcdf,
cfitsio,
libcerf,
# cantor,
zlib,
lz4,
readstat,
matio,
qtserialport,
discount,
}:
stdenv.mkDerivation rec {
pname = "labplot";
version = "2.10.1";
src = fetchurl {
url = "mirror://kde/stable/labplot/labplot-${version}.tar.xz";
sha256 = "sha256-K24YFRfPtuDf/3uJXz6yDHzjWeZzLThUXgdXya6i2u8=";
};
cmakeFlags = [
# Disable Vector BLF since it depends on DBC parser which fails to be detected
"-DENABLE_VECTOR_BLF=OFF"
];
patches = [
(fetchpatch {
name = "matio-fix-compilation-for-latest-version-1.5.27.patch";
url = "https://github.com/KDE/labplot/commit/d6142308ffa492d9f7cea00fad3b4cd1babfd00c.patch";
hash = "sha256-qD5jj6GxBKbQezKJb1Z8HnwFO84WJBGQDawS/6o/wHE=";
})
];
nativeBuildInputs = [
cmake
extra-cmake-modules
shared-mime-info
wrapQtAppsHook
];
buildInputs = [
qtbase
karchive
kcompletion
kconfig
kcoreaddons
kcrash
kdoctools
ki18n
kiconthemes
kio
knewstuff
kparts
ktextwidgets
kxmlgui
syntax-highlighting
gsl
poppler
fftw
hdf5
netcdf
cfitsio
libcerf
# cantor
zlib
lz4
readstat
matio
qtserialport
discount
];
meta = {
description = "Free, open source and cross-platform data visualization and analysis software accessible to everyone";
homepage = "https://labplot.kde.org";
license = with lib.licenses; [
asl20
bsd3
cc-by-30
cc0
gpl2Only
gpl2Plus
gpl3Only
gpl3Plus
lgpl3Plus
mit
];
maintainers = ["tomasriveral"];
mainProgram = "labplot2";
platforms = lib.platforms.unix;
};
}
-51
View File
@@ -1,51 +0,0 @@
{
lib,
python3Packages,
fetchFromGitLab,
frhyme,
haspirater,
}:
python3Packages.buildPythonApplication rec {
pname = "plint";
# No PyPI version mentioned; upstream is git-based
version = "unstable-2026-04-28";
src = fetchFromGitLab {
owner = "a3nm";
repo = "plint";
rev = "master";
sha256 = lib.fakeSha256; # replace after first build
};
propagatedBuildInputs = [
frhyme
haspirater
python3Packages.cherrypy
];
# plint uses scripts + data generation steps, so disable strict tests
doCheck = false;
preBuild = ''
# required data generation steps from README
echo "Generating frhyme.json..."
(cd frhyme/lexique && ./lexique_retrieve.sh > lexique.txt)
(cd frhyme && ./make.sh 4 lexique/lexique.txt additions > frhyme.json)
echo "Generating occurrences file..."
./lexique_occurrences_retrieve.sh > data/occurrences || true
'';
postInstall = ''
# ensure CLI entry point exists
install -Dm755 plint.py $out/bin/plint
'';
meta = with lib; {
description = "French poetry validator (metrics, rhymes, template checking)";
homepage = "https://gitlab.com/a3nm/plint";
license = licenses.gpl3Plus;
platforms = platforms.unix;
};
}
-43
View File
@@ -1,43 +0,0 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "sbb-tui";
version = "1.14.2";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "Necrom4";
repo = "sbb-tui";
tag = "v${finalAttrs.version}";
hash = lib.fakeHash;
};
vendorHash = "sha256-K4DOu3rfSlKAa5JNKCzWWpnWZlXXxtN5Po7p1Spqe1w=";
ldflags = [
"-s"
"-w"
"-X main.version=${finalAttrs.version}"
];
allowGoReference = true;
doCheck = true;
nativeCheckInputs = [versionCheckHook];
passthru.updateScript = nix-update-script {};
meta = {
description = "TUI client for Switzerland's public transport timetables, inspired by SBB/CFF/FFS app";
homepage = "https://github.com/Necrom4/sbb-tui";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [tomasrivera];
mainProgram = "sbb-tui";
};
})
@@ -0,0 +1,45 @@
{ ... }: {
flake.packages.sbb-tuiManuallyDerived = {
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "sbb-tui";
version = "1.14.2";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "Necrom4";
repo = "sbb-tui";
tag = "v${finalAttrs.version}";
hash = lib.fakeHash;
};
vendorHash = "sha256-K4DOu3rfSlKAa5JNKCzWWpnWZlXXxtN5Po7p1Spqe1w=";
ldflags = [
"-s"
"-w"
"-X main.version=${finalAttrs.version}"
];
allowGoReference = true;
doCheck = true;
nativeCheckInputs = [versionCheckHook];
passthru.updateScript = nix-update-script {};
meta = {
description = "TUI client for Switzerland's public transport timetables, inspired by SBB/CFF/FFS app";
homepage = "https://github.com/Necrom4/sbb-tui";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [tomasrivera];
mainProgram = "sbb-tui";
};
});
}
-87
View File
@@ -1,87 +0,0 @@
{
lib,
stdenv,
nix-update-script,
fetchYarnDeps,
fetchFromGitHub,
yarnConfigHook,
npmHooks,
nodejs,
zip,
file,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "vivify";
version = "0.14.0";
src = fetchFromGitHub {
owner = "jannis-baum";
repo = "Vivify";
tag = "v${finalAttrs.version}";
hash = "sha256-CszMG+c0bNHfXWqcI3b4iGpeFJ+FmzHDzxflPS+wEe0=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-svgEanFiBSQn0TdTuB0CnLR71lkANABEaDiKB+Vc0Rc=";
};
installPhase = ''
runHook preInstall
yarn install
substituteInPlace node_modules/.bin/tsc \
--replace-fail '/usr/bin/env node' '${lib.getExe nodejs}'
substituteInPlace node_modules/.bin/webpack \
--replace-fail '/usr/bin/env node' '${lib.getExe nodejs}'
substituteInPlace node_modules/.bin/postject \
--replace-fail '/usr/bin/env node' '${lib.getExe nodejs}'
make VIV_VERSION=${finalAttrs.version} linux
mkdir -p $out/bin
install -Dm755 ./build/linux/viv $out/bin/viv
install -Dm755 ./build/linux/vivify-server $out/bin/vivify-server
wrapProgram $out/bin/viv \
--prefix PATH : ${
lib.makeBinPath [
nodejs
file
]
}
'';
nativeBuildInputs = [
yarnConfigHook
npmHooks.npmInstallHook
zip
nodejs
file
];
# Stripping 'unneeded symbols' causes vivify-server executable to break
# (segmentation fault)
dontStrip = true;
passthru.updateScript = nix-update-script {};
meta = {
description = "Live Markdown viewer";
longDescription = ''
Vivify brings your files to life in the browser!
Vivify is primarily made to render Markdown and Jupyter Notebooks, but will also
serve as a directory browser and let you view code files with syntax highlighting.
'';
homepage = "https://github.com/jannis-baum/Vivify";
changelog = "https://github.com/jannis-baum/Vivify/releases/tag/v${finalAttrs.src.tag}";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [skohtv];
platforms = lib.platforms.linux;
mainProgram = "viv";
};
})
@@ -0,0 +1,89 @@
{ ... }: {
flake.packages.vivifyManuallyDerived = {
lib,
stdenv,
nix-update-script,
fetchYarnDeps,
fetchFromGitHub,
yarnConfigHook,
npmHooks,
nodejs,
zip,
file,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "vivify";
version = "0.14.0";
src = fetchFromGitHub {
owner = "jannis-baum";
repo = "Vivify";
tag = "v${finalAttrs.version}";
hash = "sha256-CszMG+c0bNHfXWqcI3b4iGpeFJ+FmzHDzxflPS+wEe0=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-svgEanFiBSQn0TdTuB0CnLR71lkANABEaDiKB+Vc0Rc=";
};
installPhase = ''
runHook preInstall
yarn install
substituteInPlace node_modules/.bin/tsc \
--replace-fail '/usr/bin/env node' '${lib.getExe nodejs}'
substituteInPlace node_modules/.bin/webpack \
--replace-fail '/usr/bin/env node' '${lib.getExe nodejs}'
substituteInPlace node_modules/.bin/postject \
--replace-fail '/usr/bin/env node' '${lib.getExe nodejs}'
make VIV_VERSION=${finalAttrs.version} linux
mkdir -p $out/bin
install -Dm755 ./build/linux/viv $out/bin/viv
install -Dm755 ./build/linux/vivify-server $out/bin/vivify-server
wrapProgram $out/bin/viv \
--prefix PATH : ${
lib.makeBinPath [
nodejs
file
]
}
'';
nativeBuildInputs = [
yarnConfigHook
npmHooks.npmInstallHook
zip
nodejs
file
];
# Stripping 'unneeded symbols' causes vivify-server executable to break
# (segmentation fault)
dontStrip = true;
passthru.updateScript = nix-update-script {};
meta = {
description = "Live Markdown viewer";
longDescription = ''
Vivify brings your files to life in the browser!
Vivify is primarily made to render Markdown and Jupyter Notebooks, but will also
serve as a directory browser and let you view code files with syntax highlighting.
'';
homepage = "https://github.com/jannis-baum/Vivify";
changelog = "https://github.com/jannis-baum/Vivify/releases/tag/v${finalAttrs.src.tag}";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [skohtv];
platforms = lib.platforms.linux;
mainProgram = "viv";
};
});
}
-31
View File
@@ -1,31 +0,0 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule {
pname = "z13ctl";
version = "1.1.6";
src = fetchFromGitHub {
owner = "dahui";
repo = "z13ctl";
rev = "v1.1.6";
hash = "sha256-21mdAzbw8JISDLG7iSEI4VCephDTtbioN0/RRxvCLR8=";
};
vendorHash = "sha256-ftkcianIR36PNAoMOVuk4lUr7goWUcHhjyNseUraJU0=";
subPackages = ["."];
__structuredAttrs = true;
meta = with lib; {
description = "Utility for ASUS ROG Flow Z13 (2025)";
homepage = "https://github.com/dahui/z13ctl";
license = licenses.asl20;
platforms = platforms.linux;
mainProgram = "z13ctl";
maintainers = with maintainers; [badheuristic];
};
}