commit 848214d1047532acb902df7c1a534a1cba26f62b
parent ede8f12d2bfa1af2f24048e4a0fd8f36dfbe7f80
Author: Daniel Barlow <dan@telent.net>
Date: Mon, 23 Dec 2024 22:36:14 +0000
add ubivolume output
Diffstat:
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/outputs/ubivolume.nix b/modules/outputs/ubivolume.nix
@@ -18,6 +18,9 @@ in
eraseBlockSize = mkOption { type = types.str; }; # LEB
maxLEBcount = mkOption { type = types.str; }; # LEB
};
+ options.system.outputs.ubivolume = mkOption {
+ type = types.package;
+ };
config = mkIf (config.rootfsType == "ubifs") {
kernel.config = {
@@ -28,7 +31,7 @@ in
};
boot.initramfs.enable = true;
- system.outputs.rootfs =
+ system.outputs.ubivolume =
let
inherit (pkgs.pkgsBuildBuild) runCommand;
ubiVolume = ({ name, volumeId, image, flags ? [] }:
diff --git a/modules/outputs/zyxel-nwa-fit.nix b/modules/outputs/zyxel-nwa-fit.nix
@@ -31,7 +31,7 @@ on a system with pre-existing firmware and OS.
config = mkIf (config.rootfsType == "ubifs") {
system.outputs.zyxel-nwa-fit =
- let
+ let
o = config.system.outputs;
# 8129kb padding.
paddedKernel = pkgs.runCommand "padded-kernel" {} ''
@@ -39,7 +39,7 @@ on a system with pre-existing firmware and OS.
dd if=/dev/zero of=$out bs=1 count=1 seek=8388607
'';
firmwareImage = pkgs.runCommand "firmware-image" {} ''
- cat ${paddedKernel} ${o.rootfs} > $out
+ cat ${paddedKernel} ${o.ubivolume} > $out
'';
dts = pkgs.writeText "image.its" ''
/dts-v1/;