From 0310baf9d035c305b400c0d5f0b748bafc3812ed Mon Sep 17 00:00:00 2001 From: cubernetes Date: Thu, 15 Oct 2026 15:45:36 +0200 Subject: [PATCH 1/9] use nix-unstable and nix-index with small db --- flake.lock | 21 ++++++++++----------- flake.nix | 6 ++++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index af8823e..74ba51a 100644 --- a/flake.lock +++ b/flake.lock @@ -25,16 +25,15 @@ ] }, "locked": { - "lastModified": 1790996401, - "narHash": "sha256-f+kOxEmOUnQazVAmGg0i8hzwgd1kX/geY+k/Dpheye8=", + "lastModified": 1792000010, + "narHash": "sha256-4jtkwQlReQdXsKJJfB9yT7nIf0TlwgZOk2XtxjUgDS8=", "owner": "nix-community", "repo": "home-manager", - "rev": "db7d5e2332710f5abb088f6b5de927d7f9511b35", + "rev": "5a9d300bd619c03857521b50c8877a19dbad7078", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-26.05", "repo": "home-manager", "type": "github" } @@ -46,11 +45,11 @@ ] }, "locked": { - "lastModified": 1790499302, - "narHash": "sha256-Gbf/U9ptJhQh0qnDnJ/+a8MAcq1HXunbArUTHR2wNYk=", + "lastModified": 1791711434, + "narHash": "sha256-LpIhxnuO0tYeZ4k7BbNMxsPs2zJpB4hWXO1jdhUuE7Q=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "161d7c91accd93034bb3c295224d9d895a778573", + "rev": "9a2dd40780eeab8543aa97c59c26f11267025616", "type": "github" }, "original": { @@ -77,16 +76,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1790920529, - "narHash": "sha256-nQyFkMR78WP6PiXKkDW2SjqzLf/spQqjRuxRGSbcV8k=", + "lastModified": 1791956154, + "narHash": "sha256-jBYGPi4udQ9uo4KQp9m2J0546nJVQitG15gvZSaVVAs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "774debe7a0d1b496e35677ad955a1011c6ff74f3", + "rev": "55bfb4d7437bd4e09ab7cba58a43bd68eb310044", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-26.05", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index ae264c9..d93aa33 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,10 @@ description = "NixOs Config Flake"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { - url = "github:nix-community/home-manager/release-26.05"; + url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -44,6 +44,8 @@ environment.systemPackages = [ claude-desktop-nix.packages.${pkgs.stdenv.hostPlatform.system}.default ]; + programs.nix-index.package = + nix-index-database.packages.${pkgs.stdenv.hostPlatform.system}.nix-index-with-small-db; }) ]; }; From 1c376909da9c4065a2e28b501b56f433cccc0317 Mon Sep 17 00:00:00 2001 From: cubernetes Date: Thu, 15 Oct 2026 15:45:43 +0200 Subject: [PATCH 2/9] Use latest kernel --- hosts/fw/configuration.nix | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/hosts/fw/configuration.nix b/hosts/fw/configuration.nix index b4f6a1a..7948d4d 100644 --- a/hosts/fw/configuration.nix +++ b/hosts/fw/configuration.nix @@ -39,7 +39,7 @@ with lib; hardware.uinput.enable = true; - # boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_latest; boot = { extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; @@ -52,18 +52,18 @@ with lib; ]; }; - boot.kernelPackages = pkgs.linuxPackagesFor ( - pkgs.linux_latest.override { - argsOverride = rec { - version = "7.0.6"; - modDirVersion = "7.0.6"; - src = pkgs.fetchurl { - url = "mirror://kernel/linux/kernel/v7.x/linux-${version}.tar.xz"; - sha256 = "08vm18wx6399phzgr3wz94yga3ab4fyca79445ygvbspm904996b"; - }; - }; - } - ); + #boot.kernelPackages = pkgs.linuxPackagesFor ( + # pkgs.linux_latest.override { + # argsOverride = rec { + # version = "7.0.6"; + # modDirVersion = "7.0.6"; + # src = pkgs.fetchurl { + # url = "mirror://kernel/linux/kernel/v7.x/linux-${version}.tar.xz"; + # sha256 = "08vm18wx6399phzgr3wz94yga3ab4fyca79445ygvbspm904996b"; + # }; + # }; + # } + #); # Bootloader. boot.loader.systemd-boot.enable = true; From aad4aec552b964b70efa01b687314001f5416274 Mon Sep 17 00:00:00 2001 From: cubernetes Date: Thu, 15 Oct 2026 15:45:50 +0200 Subject: [PATCH 3/9] Block yt again --- hosts/fw/configuration.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hosts/fw/configuration.nix b/hosts/fw/configuration.nix index 7948d4d..f764f8e 100644 --- a/hosts/fw/configuration.nix +++ b/hosts/fw/configuration.nix @@ -74,10 +74,8 @@ with lib; networking.hostName = "fw"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. networking.extraHosts = '' - # 204.168.170.249 talk.timo.social - # 204.168.170.249 turn.talk.timo.social - # 127.0.0.1 yt.be m.youtube.com youtube.com - # 127.0.0.1 www.youtube.com + 127.0.0.1 yt.be m.youtube.com youtube.com + 127.0.0.1 www.youtube.com ''; # Configure network proxy if necessary From fc3e8e9f3d31b608ade4398ad404c0cc92251996 Mon Sep 17 00:00:00 2001 From: cubernetes Date: Thu, 15 Oct 2026 15:46:30 +0200 Subject: [PATCH 4/9] Sort package list and add virtualbox --- hosts/fw/configuration.nix | 186 +++++++++++++++++++------------------ 1 file changed, 96 insertions(+), 90 deletions(-) diff --git a/hosts/fw/configuration.nix b/hosts/fw/configuration.nix index f764f8e..46ca1aa 100644 --- a/hosts/fw/configuration.nix +++ b/hosts/fw/configuration.nix @@ -172,6 +172,9 @@ with lib; # Allow unfree packages nixpkgs.config.allowUnfree = true; + virtualisation.virtualbox.host.enable = true; + users.extraGroups.vboxusers.members = [ "tsi" ]; + virtualisation.libvirtd.enable = true; virtualisation.docker = { enable = true; @@ -349,112 +352,115 @@ with lib; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - vim alacritty - keepassxc - nextcloud-client - dmenu - arandr - brave - pavucontrol - signal-desktop - simplex-chat-desktop - ayugram-desktop - dnsmasq - file - gnumake - nmap - usbutils - brightnessctl - pulseaudio - moreutils - spacer - yubioath-flutter - slack - mpv - netbird-ui - python3 - dig - htop - gcc - wireguard-tools - gh - rustdesk - anydesk - jq android-tools - gdu - gron - mkvtoolnix-cli - ydiff - wl-clipboard-rs - proton-vpn - iperf3 - pv - libarchive - libreoffice - traceroute - pciutils - usbutils + ansible + anydesk + arandr + ayugram-desktop + bat bc - pstree - tmux - wget - gnupg - mosh - openvpn + brave + brightnessctl clamav conntrack-tools - kdotool - trash-cli - bat - psmisc - mupdf - signal-cli - exfat - fprintd - ranger + convmv + dash + dig dive - openssl_4_0 + dmenu + dnsmasq + exfat + expect + fastfetch + ffmpeg + file + fprintd + gcc + gdu + gh + glow + gnumake + gnupg + gron + guestfs-tools + htop + ijq + iperf3 + jless + jq + kdotool + keepassxc + ksh + libarchive + libreoffice + lynx man-pages man-pages-posix - v4l-utils - ffmpeg - tcpdump - winbox + mkvtoolnix-cli + moreutils + mosh + mpv + mupdf + neomutt + netbird-ui + netcat-openbsd + nextcloud-client + nmap + nodejs_26 + ntfsprogs-plus + obs-studio + openssh + openssl_4_0 + openvpn pangolin-cli paprefs - expect - guestfs-tools - sshpass - nodejs_26 - netcat-openbsd - convmv - ntfsprogs-plus - sshfs - yash - ksh - dash - glow - tt - obs-studio - ydotool - tree - fastfetch - yq - jless - ijq - lynx - virtualenv - openssh + patchelf + pavucontrol + pciutils + proton-vpn + psmisc + pstree + pulseaudio + pv + python3 + ranger + rustdesk scli signal-cli - neomutt - patchelf + signal-cli + signal-desktop + simplex-chat-desktop + slack + spacer + sshfs + sshpass + tcpdump + tmux + traceroute + trash-cli + tree + tt + usbutils + usbutils + v4l-utils + vagrant + vim + virtualenv + wget + winbox + wireguard-tools + wl-clipboard-rs + yash + ydiff + ydotool + yq yt-dlp + yubioath-flutter ]; programs.ydotool.enable = true; + documentation.dev.enable = true; services.openssh = { From 817e776f6e58364f4664dea307ab2681748518e8 Mon Sep 17 00:00:00 2001 From: cubernetes Date: Thu, 15 Oct 2026 15:46:46 +0200 Subject: [PATCH 5/9] Improve keyd mappings --- hosts/fw/configuration.nix | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/hosts/fw/configuration.nix b/hosts/fw/configuration.nix index 46ca1aa..faecbc0 100644 --- a/hosts/fw/configuration.nix +++ b/hosts/fw/configuration.nix @@ -208,12 +208,29 @@ with lib; extraConfig = '' [main] leftcontrol = layer(lctrl) - leftalt = layer(lalt) + leftshift = layer(lshift) + rightshift = layer(lshift) + + # Swapped layout + # leftalt = layer(lsuper) + # rightalt = layer(rsuper) + + # leftmeta = layer(lalt) + # rightmeta = layer(altgr) + + # Normal layout + leftalt = layer(lalt) + rightalt = layer(altgr) + leftmeta = layer(lsuper) - altgr = layer(rightalt) + rightmeta = layer(rsuper) + + capslock = layer(lctrl) [lctrl:C] + j = enter + leftbrace = escape [lalt:A] @@ -221,8 +238,13 @@ with lib; [lsuper:M] + [rsuper:M] + [altgr:G] + [lctrl+lshift] + h = backspace + [lalt+lctrl] h = left j = down From e0100ce27fff5506d1232c8ad8010e7967383974 Mon Sep 17 00:00:00 2001 From: cubernetes Date: Thu, 15 Oct 2026 15:47:10 +0200 Subject: [PATCH 6/9] Explicitly enable command not found hook --- hosts/fw/configuration.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/fw/configuration.nix b/hosts/fw/configuration.nix index faecbc0..ffddada 100644 --- a/hosts/fw/configuration.nix +++ b/hosts/fw/configuration.nix @@ -497,6 +497,8 @@ with lib; }; }; + programs.command-not-found.enable = true; + services.power-profiles-daemon.enable = true; environment.localBinInPath = true; From 6d508d00baa0e39d3cc9b8cf7136ed2bb2bf4fcf Mon Sep 17 00:00:00 2001 From: cubernetes Date: Thu, 15 Oct 2026 15:47:31 +0200 Subject: [PATCH 7/9] Fix comment format in main .bashrc --- modules/home-manager/bash.nix | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/modules/home-manager/bash.nix b/modules/home-manager/bash.nix index 157c231..c239ac9 100644 --- a/modules/home-manager/bash.nix +++ b/modules/home-manager/bash.nix @@ -6,9 +6,9 @@ initExtra = '' [ "''${BASH_COMPLETION_VERSINFO-}" ] || unset -v BASH_COMPLETION_VERSINFO - [ "$DISPLAY" ] && xset r rate 200 60 + [ "$DISPLAY" ] && xset r rate 300 60 - ##################### user specific aliases and functions ###################### + #-##################### user specific aliases and functions ###################### if [ -d ~/.bashrc.d ]; then for rc in ~/.bashrc.d/*; do bn=''${rc##*/} @@ -19,7 +19,7 @@ fi unset rc bn - ########################### shell settings & options ########################### + #-########################### shell settings & options ########################### set -E set -o pipefail @@ -34,7 +34,7 @@ shopt -u histverify _have bash_abbr && shopt -u expand_aliases - ############################### shell variables ################################ + #-############################### shell variables ################################ FIGNORE='.o' HISTCONTROL=ignoreboth:erasedups HISTTIMEFORMAT='%y-%m-%d %H:%M:%S ' @@ -42,7 +42,7 @@ HISTFILESIZE=-1 HISTFILE=''$HOME/.''${USER:-default}_bash_history - ############################ environment variables ############################# + #-############################ environment variables ############################# export PYTHON_BASIC_REPL=1 # I'm good at readline so I'm gonna use readline whereever possible! export LESS='-SRFX' export PAGER='less' GIT_PAGER='less' MANPAGER='less' SYSTEMD_PAGER='less' @@ -50,7 +50,7 @@ export EDITOR='vim' VISUAL='vim' FCEDIT='vim' SYSTEMD_EDITOR='vim' export PATH - ########################## generally useful functions ########################## + #-########################## generally useful functions ########################## take () { : 'Idempotently create directory recursively and cd into it' local out @@ -112,8 +112,8 @@ declare plugin for plugin in "''${plugins[@]}"; do case "''$plugin" in - # Comment below case match if you don'\'''t want to have a pre-selection of plugins to export - # Requires `shopt -s extglob` + #-# Comment below case match if you don'\'''t want to have a pre-selection of plugins to export + #-# Requires `shopt -s extglob` (+([0-9])-@(util|redact|prompt|docker-tools|funcs|init-and-complete|general-aliases|bash-abbr)) selected[''$plugin]=1 ;; (*) selected[''$plugin]= esac @@ -211,7 +211,7 @@ EOF } - #################################### binds ##################################### + #-#################################### binds ##################################### bind '"\e\C-r": kill-region' \ '"\C-x\C-k": kill-whole-line' \ '"\e\C-p": history-search-backward' \ @@ -230,23 +230,23 @@ 'set colored-completion-prefix on' \ 'set colored-stats on' - ################################## autoclear ################################### - # TODO + #-################################## autoclear ################################### + #-# TODO - # prank () { - # line_up_until_cursor=''${READLINE_LINE::READLINE_POINT} - # line_after_cursor=''${READLINE_LINE:READLINE_POINT} - # if [[ ''$((RANDOM % 5)) -eq 0 ]]; then - # READLINE_LINE="''$line_up_until_cursor''$line_after_cursor" - # #READLINE_LINE="''$line_up_until_cursor''${1^}''$line_after_cursor" - # READLINE_POINT=''$((READLINE_POINT+1)) - # else - # READLINE_LINE="''$line_up_until_cursor''$1''$line_after_cursor" - # READLINE_POINT=''$((READLINE_POINT+1)) - # fi - # } - # bind -x '" ": prank " "' - # bind -x '"a": prank "a"' + #-# prank () { + #-# line_up_until_cursor=''${READLINE_LINE::READLINE_POINT} + #-# line_after_cursor=''${READLINE_LINE:READLINE_POINT} + #-# if [[ ''$((RANDOM % 5)) -eq 0 ]]; then + #-# READLINE_LINE="''$line_up_until_cursor''$line_after_cursor" + #-# #READLINE_LINE="''$line_up_until_cursor''${1^}''$line_after_cursor" + #-# READLINE_POINT=''$((READLINE_POINT+1)) + #-# else + #-# READLINE_LINE="''$line_up_until_cursor''$1''$line_after_cursor" + #-# READLINE_POINT=''$((READLINE_POINT+1)) + #-# fi + #-# } + #-# bind -x '" ": prank " "' + #-# bind -x '"a": prank "a"' ''; }; } From 18054755542e7dd7caa45119904ecc5ea91b2a11 Mon Sep 17 00:00:00 2001 From: cubernetes Date: Thu, 15 Oct 2026 15:47:45 +0200 Subject: [PATCH 8/9] Improve cd function to run like ls -artlh but truncated --- modules/home-manager/bash.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/home-manager/bash.nix b/modules/home-manager/bash.nix index c239ac9..d691982 100644 --- a/modules/home-manager/bash.nix +++ b/modules/home-manager/bash.nix @@ -61,8 +61,20 @@ } cd () { - : 'Run cd and if it succeeds, run ls' - builtin cd "''$@" && command ls --color -Ah + : 'Run cd; on success in a terminal, show the 4 newest entries (with a count of hidden ones)' + + builtin cd "''$@" || return + [[ -t 1 ]] || return 0 + command -v ls &>/dev/null || return 0 + + local -a lines + mapfile -t lines < <(command ls --color=always --quoting-style=shell-escape -lArth) + if (( ''${#lines[@]} > 5 )); then + printf '\033[7m... %d more entries ...\033[27m\n' "$(( ''${#lines[@]} - 5 ))"; + printf '%s\n' "''${lines[@]: -4}" + else + printf '%s\n' "''${lines[@]}" + fi } drop_caches () { From e5601e1a3c2c6b3b84739cc7bd6164a617914f5e Mon Sep 17 00:00:00 2001 From: cubernetes Date: Thu, 15 Oct 2026 15:47:48 +0200 Subject: [PATCH 9/9] Enable git rerere --- modules/home-manager/git.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home-manager/git.nix b/modules/home-manager/git.nix index 495eeed..6e18180 100644 --- a/modules/home-manager/git.nix +++ b/modules/home-manager/git.nix @@ -4,6 +4,7 @@ programs.git = { enable = true; settings = { + rerere.enabled = true; user = { name = "cubernetes"; email = "timo42@proton.me";