From defa8544d9437116a652827db62cbbf1f8933d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 20 Jul 2022 11:34:49 +0200 Subject: nixos: trim the tarball size --- nixos/modules/turris-tarball.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'nixos/modules') 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 - ]; + ]); }; } -- cgit v1.2.3