Declare app version per channel and fix Android live updates
- Pin the radiantwave input to tag 1.8 and add channel.appVersion; override the package version so pure builds bake 1.8 instead of RadiantWave's 0.1.0 default. - 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. - Allow unfree in the RPi builder to match x86 and drop the impure NIXPKGS_ALLOW_UNFREE dependency.
This commit is contained in:
@@ -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,16 +62,17 @@
|
||||
# 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; # main
|
||||
atticRepo = "radiantwave"; # main
|
||||
gitRef = ""; # main
|
||||
appVersion = "1.8"; # main
|
||||
};
|
||||
|
||||
# Exposed so CI (see .gitea/workflows/build-prod-*.yml) and humans can
|
||||
@@ -82,16 +83,28 @@
|
||||
# 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}";
|
||||
};
|
||||
};
|
||||
@@ -108,8 +121,8 @@
|
||||
inherit system;
|
||||
|
||||
specialArgs = {
|
||||
inherit radiantwave;
|
||||
inherit upgradeFlakeRef;
|
||||
inherit radiantwave upgradeFlakeRef;
|
||||
radiantwaveApp = appPackage system;
|
||||
radiantwavePlymouth = mkRadiantwavePlymouth;
|
||||
};
|
||||
|
||||
@@ -145,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
|
||||
@@ -232,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 {
|
||||
@@ -242,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.
|
||||
@@ -254,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.
|
||||
@@ -263,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";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user