diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-08-16 22:34:26 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-09-24 10:01:47 +1000 |
commit | 008de9ca3cd22658df19276032f5d3f403a51090 (patch) | |
tree | d9f143e0286fdc6a4e6d67cfffca476ca6ecf6db /nixos/lib | |
parent | f569e1f399633976dbb3142966aaed68dd0d6e5e (diff) |
nixos/{containers,cri-o,podman}: move copyFile to nixos/lib/utils
Diffstat (limited to 'nixos/lib')
-rw-r--r-- | nixos/lib/utils.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index 543c8a8882ea..c9dfdbed99a3 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -2,6 +2,11 @@ pkgs: with pkgs.lib; rec { + # Copy configuration files to avoid having the entire sources in the system closure + copyFile = filePath: pkgs.runCommandNoCC (builtins.unsafeDiscardStringContext (builtins.baseNameOf filePath)) {} '' + cp ${filePath} $out + ''; + # Check whenever fileSystem is needed for boot. NOTE: Make sure # pathsNeededForBoot is closed under the parent relationship, i.e. if /a/b/c # is in the list, put /a and /a/b in as well. |