You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to include extra files in the tarball without exposing them to the /nix/store (e.g. not using environment.etc or systemd.tmpfiles).
Use case: include custom SSH host keys.
Solution
I think the easiest thing would be to add a --extra-files flag to the tarballBuilder script, which is expected to be a folder with the correct directory structure inside, and then do cp -R "${extraFiles}/." "$root". Similar to how it's already done for the config:
Problem
I would like to include extra files in the tarball without exposing them to the
/nix/store
(e.g. not usingenvironment.etc
orsystemd.tmpfiles
).Use case: include custom SSH host keys.
Solution
I think the easiest thing would be to add a
--extra-files
flag to thetarballBuilder
script, which is expected to be a folder with the correct directory structure inside, and then docp -R "${extraFiles}/." "$root"
. Similar to how it's already done for the config:NixOS-WSL/modules/build-tarball.nix
Lines 87 to 89 in dee4425
Inspired by NixOS-anywhere's
--extra-files
: https://github.com/nix-community/nixos-anywhere/blob/97b45ac774699b1cfd267e98a8bdecb74bace593/docs/howtos/extra-files.mdThe text was updated successfully, but these errors were encountered: