fix(nixos): support only latest 25.05

Previously, edition fallback logic allowed downloading the correct
"graphical" ISO for 25.05 even when specifying "plasma6" or "gnome".
However, the VM_PATH and directory name still used the original edition
(e.g., nixos-25.05-plasma6). Fixing this would require more complicated
changes to the code.

NixOS 24.11 will reach EOL on 2025-06-30, about two weeks from now.
This commit is contained in:
Kenichi Kamiya 2025-06-12 02:17:04 +09:00 committed by Phil Clifford
parent 91e06a64fd
commit e4c2c5cf2b
1 changed files with 3 additions and 13 deletions

View File

@ -876,14 +876,13 @@ function releases_nitrux() {
}
function releases_nixos() {
# Lists unstable plus the two most recent releases
# Lists unstable plus the most recent release
#shellcheck disable=SC2046
echo unstable $(web_pipe "https://nix-channels.s3.amazonaws.com/?delimiter=/" | grep -o -E 'nixos-[[:digit:]]+\.[[:digit:]]+' | cut -d- -f2 | sort -nru | head -n +2)
echo unstable $(web_pipe "https://nix-channels.s3.amazonaws.com/?delimiter=/" | grep -o -E 'nixos-[[:digit:]]+\.[[:digit:]]+' | cut -d- -f2 | sort -nru | head -n +1)
}
function editions_nixos() {
# TODO: Remove "plasma" and "gnome" editions and use only "graphical" after 24.11 support ends (expected in NixOS 25.11)
echo minimal plasma6 gnome
echo minimal graphical
}
function releases_nwg-shell() {
@ -2248,15 +2247,6 @@ function get_nitrux() {
function get_nixos() {
local HASH=""
# NixOS "gnome" and "plasma" ISOs are unified as "graphical" since 25.05
# https://github.com/NixOS/nixpkgs/pull/355893
case "${EDITION}" in
plasma6|gnome)
if [[ "${RELEASE}" == "25.05" || "${RELEASE}" == "unstable" ]]; then
EDITION="graphical"
fi
;;
esac
local ISO="latest-nixos-${EDITION}-x86_64-linux.iso"
local URL="https://channels.nixos.org/nixos-${RELEASE}"
HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1)