aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-07-20 11:34:49 +0200
committerKarel Kočí <cynerd@email.cz>2022-07-20 11:34:49 +0200
commitdefa8544d9437116a652827db62cbbf1f8933d5e (patch)
tree22549e76287d72882666256bb4a25196ada0e188 /nixos/modules
parentaea7e04bda37da24c660ff5ab220182dfbb8244f (diff)
downloadnixturris-defa8544d9437116a652827db62cbbf1f8933d5e.tar.gz
nixturris-defa8544d9437116a652827db62cbbf1f8933d5e.tar.bz2
nixturris-defa8544d9437116a652827db62cbbf1f8933d5e.zip
nixos: trim the tarball size
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/turris-tarball.nix19
1 files changed, 8 insertions, 11 deletions
diff --git a/nixos/modules/turris-tarball.nix b/nixos/modules/turris-tarball.nix
index 55187e4..1fe164d 100644
--- a/nixos/modules/turris-tarball.nix
+++ b/nixos/modules/turris-tarball.nix
@@ -45,34 +45,31 @@ let
};
}];
};
+ tarballBuild = tarballVariant.config.system.build.toplevel;
in {
system.build.tarball = pkgs.callPackage "${modulesPath}/../lib/make-system-tarball.nix" {
contents = [
{
- source = "${tarballVariant.config.system.build.toplevel}/.";
- target = "./run/current-system";
- }
- {
source = pkgs.writeText "tarball-extlinux" ''
DEFAULT nixturris-tarball
TIMEOUT 0
LABEL nixturris-tarball
MENU LABEL NixOS Turris - Tarball
- LINUX /run/current-system/kernel
- FDTDIR /run/current-system/dtbs
- INITRD /run/current-system/initrd
- APPEND init=${tarballVariant.config.system.build.toplevel}/init ${builtins.toString tarballVariant.config.boot.kernelParams}
+ LINUX ${tarballBuild}/kernel
+ FDTDIR ${tarballBuild}/dtbs
+ INITRD ${tarballBuild}/initrd
+ APPEND init=${tarballBuild}/init ${builtins.toString tarballVariant.config.boot.kernelParams}
'';
target = "./boot/extlinux/extlinux.conf";
}
];
- storeContents = map (x: { object = x; symlink = "none"; }) [
- tarballVariant.config.system.build.toplevel
+ storeContents = (map (x: { object = x; symlink = "none"; }) [
+ tarballBuild
pkgs.stdenv
- ];
+ ]);
};
}