Declare app version per channel and fix Android live updates

- Add channel.appVersion and an appPackage override so pure builds bake the pinned version instead of RadiantWave's 0.1.0 default.

- Pin the radiantwave input to tag 1.8 and allow unfree in the RPi builder to match x86.

- radiantwaveUpdaterModule gains a manifestFile arg; Raspberry Pi polls aarch64-manifest.json.

- Launch the rotated/Android kiosk through /var/lib/radiantwave/current so the live updater actually applies.
This commit is contained in:
NeilClack
2026-10-03 11:59:29 -05:00
parent b6de748f8f
commit 8796feddd9
5 changed files with 75 additions and 36 deletions
+45 -16
View File
@@ -4,7 +4,7 @@
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
radiantwave.url = "git+https://gitea.radiantwavetech.com/RadiantWaveTech/radiantwave.git?ref=main";
radiantwave.url = "git+https://gitea.radiantwavetech.com/RadiantWaveTech/radiantwave.git?ref=refs/tags/1.8";
radiantwave-dev.url = "git+https://gitea.radiantwavetech.com/RadiantWaveTech/radiantwave.git?ref=dev";
nixos-raspberrypi.url = "github:nvmd/nixos-raspberrypi/main";
};
@@ -62,28 +62,49 @@
# this channel, so a `dev`-to-`main` merge carries your changes with it
# automatically. There are no more `-dev` sibling configs to copy.
#
# main: appInput = radiantwave (main), atticRepo = "radiantwave",
# gitRef = "" (default branch)
# dev: appInput = radiantwave-dev, atticRepo = "radiantwave-dev",
# gitRef = "?ref=dev"
# main: appInput = radiantwave (tag 1.8), atticRepo = "radiantwave",
# gitRef = "", appVersion = "1.8"
# dev: appInput = radiantwave-dev, atticRepo = "radiantwave-dev",
# gitRef = "?ref=dev", appVersion = <dev fingerprint>
#
# To flip branches, change ONLY these three values (then push/merge).
# To flip branches, change ONLY these four values (then push/merge).
channel = {
appInput = radiantwave-dev; # dev
atticRepo = "radiantwave-dev"; # dev
gitRef = "?ref=dev"; # dev
appVersion = "2917d33"; # dev
};
# Exposed so CI (see .gitea/workflows/build-prod-*.yml) and humans can
# verify which channel this checkout resolves to. On `main` this must be
# "radiantwave"; on `dev` it must be "radiantwave-dev". The prod
# workflows fail fast if this isn't the production channel, so a merge
# that brings a dev-pointing channel block into `main` breaks the build
# instead of silently shipping dev builds as prod ISOs.
channelName = if channel.appInput == radiantwave then "radiantwave" else "radiantwave-dev";
# The App package, pinned to the channel's declared version. RadiantWave's
# own flake only injects its version from the ambient APP_VERSION env var
# on impure evals; pure evals (local `nix build`, build-rpi.sh) fall back
# to its 0.1.0 default. Overriding the version here makes the baked
# baseline correct regardless of eval purity, and matches the Attic
# closure when RadiantWave CI built it with the same version string.
appPackage = system: channel.appInput.packages.${system}.default.override {
version = channel.appVersion;
};
# Live app-update side channel. The manifest is served by the
# fileserver; closures are fetched (never built) from the channel's
# Attic cache. `repo` selects the channel — "radiantwave" (main) or
# "radiantwave-dev" (dev). All variants follow this same update
# procedure; only the channel differs.
radiantwaveUpdaterModule = { repo, baseline }: {
# "radiantwave-dev" (dev) — and `manifestFile` selects the per-arch
# manifest (default "manifest.json"; Raspberry Pi uses
# "aarch64-manifest.json"). All variants follow this same update
# procedure; only the channel/arch differ.
radiantwaveUpdaterModule = { repo, baseline, manifestFile ? "manifest.json" }: {
services.radiantwaveUpdater = {
enable = true;
baselinePackage = baseline;
manifestUrl = "https://files.radiantwavetech.com/${repo}/manifest.json";
manifestUrl = "https://files.radiantwavetech.com/${repo}/${manifestFile}";
atticUrl = "https://attic.radiantwavetech.com/${repo}";
};
};
@@ -100,8 +121,8 @@
inherit system;
specialArgs = {
inherit radiantwave;
inherit upgradeFlakeRef;
inherit radiantwave upgradeFlakeRef;
radiantwaveApp = appPackage system;
radiantwavePlymouth = mkRadiantwavePlymouth;
};
@@ -137,10 +158,12 @@
specialArgs = {
inherit radiantwave upgradeFlakeRef;
inherit nixos-raspberrypi;
radiantwaveApp = appPackage "aarch64-linux";
radiantwavePlymouth = mkRadiantwavePlymouth;
};
modules = [
{ nixpkgs.config.allowUnfree = true; }
({ ... }: {
imports = with nixos-raspberrypi.nixosModules; [
sd-image
@@ -201,6 +224,8 @@
};
in
{
inherit channelName;
packages.x86_64-linux.radiantwavekiosk = self.nixosConfigurations.radiantwavekiosk.config.system.build.toplevel;
packages.x86_64-linux.radiantwavekiosk-commercial = self.nixosConfigurations.radiantwavekiosk-commercial.config.system.build.toplevel;
packages.x86_64-linux.radiantwavekiosk-android = self.nixosConfigurations.radiantwavekiosk-android.config.system.build.toplevel;
@@ -222,7 +247,7 @@
diskModule = ./disk-config.nix;
upgradeFlakeRef = "git+https://gitea.radiantwavetech.com/RadiantWaveTech/KioskConfig.git${channel.gitRef}#radiantwavekiosk";
extraModules = [
(radiantwaveUpdaterModule { repo = channel.atticRepo; baseline = channel.appInput.packages.x86_64-linux.default; })
(radiantwaveUpdaterModule { repo = channel.atticRepo; baseline = appPackage "x86_64-linux"; })
];
};
radiantwavekiosk-commercial = mkKioskSystem {
@@ -232,7 +257,7 @@
diskModule = ./commercial-disk-config.nix;
upgradeFlakeRef = "git+https://gitea.radiantwavetech.com/RadiantWaveTech/KioskConfig.git${channel.gitRef}#radiantwavekiosk-commercial";
extraModules = [
(radiantwaveUpdaterModule { repo = channel.atticRepo; baseline = channel.appInput.packages.x86_64-linux.default; })
(radiantwaveUpdaterModule { repo = channel.atticRepo; baseline = appPackage "x86_64-linux"; })
];
};
# Rotated screen for android-style displays.
@@ -244,7 +269,7 @@
upgradeFlakeRef = "git+https://gitea.radiantwavetech.com/RadiantWaveTech/KioskConfig.git${channel.gitRef}#radiantwavekiosk-android";
extraModules = [
./rotated_display.nix
(radiantwaveUpdaterModule { repo = channel.atticRepo; baseline = channel.appInput.packages.x86_64-linux.default; })
(radiantwaveUpdaterModule { repo = channel.atticRepo; baseline = appPackage "x86_64-linux"; })
];
};
# Raspberry Pi 5.
@@ -253,7 +278,11 @@
hostName = "radiantwavekiosk-rpi";
upgradeFlakeRef = "git+https://gitea.radiantwavetech.com/RadiantWaveTech/KioskConfig.git${channel.gitRef}#radiantwavekiosk-rpi";
extraModules = [
(radiantwaveUpdaterModule { repo = channel.atticRepo; baseline = channel.appInput.packages.aarch64-linux.default; })
(radiantwaveUpdaterModule {
repo = channel.atticRepo;
baseline = appPackage "aarch64-linux";
manifestFile = "aarch64-manifest.json";
})
];
};