nit: fix image output to be a file, not an item inside a folder
This commit is contained in:
parent
56d84dea4d
commit
aa0a395353
|
@ -279,7 +279,7 @@ in
|
||||||
sane.image.extraGPTPadding = 16 * 1024 * 1024;
|
sane.image.extraGPTPadding = 16 * 1024 * 1024;
|
||||||
sane.image.firstPartGap = 0;
|
sane.image.firstPartGap = 0;
|
||||||
sane.image.installBootloader = ''
|
sane.image.installBootloader = ''
|
||||||
dd if=${pkgs.tow-boot-pinephone}/Tow-Boot.noenv.bin of=$out/nixos.img bs=1024 seek=8 conv=notrunc
|
dd if=${pkgs.tow-boot-pinephone}/Tow-Boot.noenv.bin of=$out bs=1024 seek=8 conv=notrunc
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sane.programs.swaynotificationcenter.config = {
|
sane.programs.swaynotificationcenter.config = {
|
||||||
|
|
|
@ -173,17 +173,20 @@ in
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable
|
lib.mkIf cfg.enable
|
||||||
{
|
{
|
||||||
system.build.img = (if cfg.installBootloader == null then
|
system.build.img = pkgs.runCommandLocal "nixos-with-bootloader" {
|
||||||
img
|
|
||||||
else pkgs.runCommand "nixos-with-bootloader" {} ''
|
|
||||||
cp -vR ${img} $out
|
|
||||||
chmod -R +w $out
|
|
||||||
${cfg.installBootloader}
|
|
||||||
'') // {
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit bootFsImg nixFsImg;
|
inherit bootFsImg nixFsImg;
|
||||||
withoutBootloader = img;
|
withoutBootloader = img; #< XXX: this derivation places the image at $out/nixos.img
|
||||||
};
|
};
|
||||||
};
|
} (
|
||||||
|
if cfg.installBootloader == null then ''
|
||||||
|
ln -s ${img}/nixos.img $out
|
||||||
|
'' else ''
|
||||||
|
cp ${img}/nixos.img $out
|
||||||
|
chmod +w $out
|
||||||
|
${cfg.installBootloader}
|
||||||
|
chmod -w $out
|
||||||
|
''
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user