dot

vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks

14 lines495 bytesBourne Again Shell (bash)executable
1#!/usr/bin/env bash
2# "26.11 · 15 Oct" (release and nixpkgs date) from nixos-version (26.11.20261015.fe13242),
3# for the update tile. With a host, asks it over SSH; "Unreachable" if that fails.
4# nixos-version.sh [host]
5
6if [ -n "$1" ]; then
7 v=$(ssh -o BatchMode=yes -o ConnectTimeout=5 "$1" nixos-version 2>/dev/null)
8else
9 v=$(nixos-version)
10fi
11v=${v%% *}
12[ -n "$v" ] || { echo "Unreachable"; exit 0; }
13IFS=. read -r major minor date _ <<<"$v"
14date -d "$date" "+$major.$minor · %-d %b"