From 294868e5226f1863a8c7a0a3598cd487e194739c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 17 Jan 2026 23:57:27 +0100 Subject: [PATCH 1/9] vanadium: configure remote builders --- nix/configurations/vanadium.nix | 1 + .../vanadium/nixos/remote-builders.nix | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 nix/configurations/vanadium/nixos/remote-builders.nix diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 2f4bec34..99d9c96d 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -94,6 +94,7 @@ in ./vanadium/nixos/input.nix ./vanadium/nixos/misc.nix + ./vanadium/nixos/remote-builders.nix ./vanadium/nixos/display.nix ./vanadium/nixos/gui.nix diff --git a/nix/configurations/vanadium/nixos/remote-builders.nix b/nix/configurations/vanadium/nixos/remote-builders.nix new file mode 100644 index 00000000..87a21592 --- /dev/null +++ b/nix/configurations/vanadium/nixos/remote-builders.nix @@ -0,0 +1,29 @@ +let + supportedFeatures = [ + "nixos-test" + "benchmark" + "big-parallel" + "kvm" + ]; +in +{pkgs, ...}: +{ + nix.buildMachines = [ + # NOTE: these hosts need to be put in the .ssh/config of root. + # https://wiki.nixos.org/wiki/Distributed_build#Recommended_setup:_multi-user_Nix_local_%E2%80%93%3E_multi-user_Nix_remote + { + hostName = "pancake"; + sshUser = "remotebuild"; + speedFactor = 2; + system = pkgs.stdenv.hostPlatform.system; + inherit supportedFeatures; + } + { + hostName = "hetzner_benchmark"; + sshUser = "remotebuild"; + speedFactor = 12; + system = pkgs.stdenv.hostPlatform.system; + inherit supportedFeatures; + } + ]; +} From c43cd8b595b12cb883097a292dd95cf79bd882c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 18 Jan 2026 00:08:19 +0100 Subject: [PATCH 2/9] vanadium: update {min,max}-free with a formula --- nix/configurations/vanadium/nixos/sane-nix.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/configurations/vanadium/nixos/sane-nix.nix b/nix/configurations/vanadium/nixos/sane-nix.nix index 83c080d8..bb710e8e 100644 --- a/nix/configurations/vanadium/nixos/sane-nix.nix +++ b/nix/configurations/vanadium/nixos/sane-nix.nix @@ -1,8 +1,11 @@ # Protect my system from running out of storage or memory +let + totalStorage = 930; +in { nix.settings = { - min-free = 50 * 1024 * 1024 * 1024; - max-free = 100 * 1024 * 1024 * 1024; + min-free = builtins.ceil (totalStorage * 0.2) * 1024 * 1024 * 1024; + max-free = builtins.ceil (totalStorage * 0.3) * 1024 * 1024 * 1024; }; systemd.services.nix-daemon.serviceConfig = { From 3acb95f7455f8ccdd21021242559b6bd7a2fa468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 18 Jan 2026 00:10:07 +0100 Subject: [PATCH 3/9] hetzner_benchmark: update {min,max}-free with a formula --- nix/configurations/hetzner_benchmark/nixos/sane-nix.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nix/configurations/hetzner_benchmark/nixos/sane-nix.nix b/nix/configurations/hetzner_benchmark/nixos/sane-nix.nix index 3419eae6..54f76994 100644 --- a/nix/configurations/hetzner_benchmark/nixos/sane-nix.nix +++ b/nix/configurations/hetzner_benchmark/nixos/sane-nix.nix @@ -1,9 +1,11 @@ # Protect my system from running out of storage or memory +let + totalStorage = 500; +in { - # 500GB Storage nix.settings = { - min-free = 50 * 1024 * 1024 * 1024; - max-free = 100 * 1024 * 1024 * 1024; + min-free = builtins.ceil (totalStorage * 0.2) * 1024 * 1024 * 1024; + max-free = builtins.ceil (totalStorage * 0.3) * 1024 * 1024 * 1024; }; systemd.services.nix-daemon.serviceConfig = { From 0798147e92812dacc07fef98176be11ca1103d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 18 Jan 2026 01:05:15 +0100 Subject: [PATCH 4/9] home/fish: wrap "nix {build,shell}" with nom if possible --- nix/homeModules/common/fish/functions/nix.fish | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 nix/homeModules/common/fish/functions/nix.fish diff --git a/nix/homeModules/common/fish/functions/nix.fish b/nix/homeModules/common/fish/functions/nix.fish new file mode 100644 index 00000000..488220e9 --- /dev/null +++ b/nix/homeModules/common/fish/functions/nix.fish @@ -0,0 +1,11 @@ +function nix + if [ $(count $argv) -lt 1 ] + command nix $argv + end + and if [ $argv[1] = "build" -o $argv[1] = "shell" ] && type -q nom + nom $argv + else + command nix $argv + end +end + From 98125368d3eebb6baf4e4f7aa781a016137dd3c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 18 Jan 2026 01:05:53 +0100 Subject: [PATCH 5/9] home/fish: specify --command $SHELL in alias --- nix/homeModules/common/fish/aliasesAbbrs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/homeModules/common/fish/aliasesAbbrs.nix b/nix/homeModules/common/fish/aliasesAbbrs.nix index 863510f6..8affff1d 100644 --- a/nix/homeModules/common/fish/aliasesAbbrs.nix +++ b/nix/homeModules/common/fish/aliasesAbbrs.nix @@ -7,7 +7,7 @@ programs.fish = { shellAbbrs = lib.mkMerge [ (lib.mkIf pkgs.stdenv.isLinux { - "," = "nix-shell -p"; + "," = "nix-shell --command $SHELL -p"; }) ]; From 8eb2603a8fee85b29778198f2a7b4e949fd5d35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 18 Jan 2026 18:22:42 +0100 Subject: [PATCH 6/9] vanadium/overlay: patch btop waiting for upstream response Related to: https://github.com/NixOS/nixpkgs/issues/481249 --- nix/configurations/vanadium/overlay.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nix/configurations/vanadium/overlay.nix b/nix/configurations/vanadium/overlay.nix index 169bf13b..a73ecd0c 100644 --- a/nix/configurations/vanadium/overlay.nix +++ b/nix/configurations/vanadium/overlay.nix @@ -16,6 +16,14 @@ infuse { ./patches/helix/W-as-write.patch ]; + btop.__output.patches.__append = [ + (final.fetchpatch { + name = "btrfs-io-graph"; + url = "https://patch-diff.githubusercontent.com/raw/aristocratos/btop/pull/1285.patch"; + hash = "sha256-za6B1EiOV1JqKMJwrNQo43RKChw+C4mmC8pcoxLLau4="; + }) + ]; + # TODO: # pinned branch of https://github.com/astrand/xclip/tree/xerror # use this until #43 gets resolved properly From 963b1afacdfaf11b27287e887536d4a29bfb51d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 18 Jan 2026 18:23:56 +0100 Subject: [PATCH 7/9] Revert "home/btop: disable io mode for disks" This reverts commit c33bef854b4cde5ace7b2212f6672de9975b7c43. --- nix/homeModules/common/btop/btop.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nix/homeModules/common/btop/btop.conf b/nix/homeModules/common/btop/btop.conf index 626f09c7..c1973464 100644 --- a/nix/homeModules/common/btop/btop.conf +++ b/nix/homeModules/common/btop/btop.conf @@ -184,8 +184,7 @@ disk_free_priv = False show_io_stat = True #* Toggles io mode for disks, showing big graphs for disk read/write speeds. -# This doesn't seem to have an effect when using btrfs. I'd rather see the disk usage. -io_mode = False +io_mode = True #* Set to True to show combined read/write io graphs in io mode. io_graph_combined = False From 0a34f6cc7dc2682a452a1b51eba510d5afa9b526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 18 Jan 2026 22:23:31 +0100 Subject: [PATCH 8/9] vanadium: +lsr --- nix/configurations/vanadium/home/programs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/configurations/vanadium/home/programs.nix b/nix/configurations/vanadium/home/programs.nix index 32db4e26..74c8bed8 100644 --- a/nix/configurations/vanadium/home/programs.nix +++ b/nix/configurations/vanadium/home/programs.nix @@ -20,6 +20,7 @@ home.packages = [ pkgs.ghc # my favorite calculator + pkgs.lsr # fast ls with io_uring pkgs.nmap pkgs.stow pkgs.zip From 3133e11a96421c209e073d87f9d789fd69dc19da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 18 Jan 2026 22:24:42 +0100 Subject: [PATCH 9/9] fish: wrap ls command --- nix/homeModules/common/fish/functions/ls.fish | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 nix/homeModules/common/fish/functions/ls.fish diff --git a/nix/homeModules/common/fish/functions/ls.fish b/nix/homeModules/common/fish/functions/ls.fish new file mode 100644 index 00000000..785ac319 --- /dev/null +++ b/nix/homeModules/common/fish/functions/ls.fish @@ -0,0 +1,7 @@ +function ls + if type -q lsr + command lsr $argv + else + command ls $argv + end +end