diff options
author | Alex Wied <centromere@users.noreply.github.com> | 2022-08-09 23:21:09 -0400 |
---|---|---|
committer | Alex Wied <centromere@users.noreply.github.com> | 2022-08-09 23:21:27 -0400 |
commit | 0eb9946e1d3621cfc2fcffc9378dba334b25fb26 (patch) | |
tree | 273bf2b73870960dd3ea3ba4fac6d99c3c7900c6 /docker.nix | |
parent | 73fde9eed06dfdef5d37b3d798cfc98a542a4d73 (diff) |
docker.nix: Provide boolean for whether to bundle nixpkgs
Diffstat (limited to 'docker.nix')
-rw-r--r-- | docker.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/docker.nix b/docker.nix index 8e6aa227f..e95caf274 100644 --- a/docker.nix +++ b/docker.nix @@ -2,6 +2,7 @@ , lib ? pkgs.lib , name ? "nix" , tag ? "latest" +, bundleNixpkgs ? true , channelName ? "nixpkgs" , channelURL ? "https://nixos.org/channels/nixpkgs-unstable" , extraPkgs ? [] @@ -139,10 +140,12 @@ let baseSystem = let nixpkgs = pkgs.path; - channel = pkgs.runCommand "channel-nixos" { } '' + channel = pkgs.runCommand "channel-nixos" { inherit bundleNixpkgs; } '' mkdir $out - ln -s ${nixpkgs} $out/nixpkgs - echo "[]" > $out/manifest.nix + if [ "$bundleNixpkgs" ]; then + ln -s ${nixpkgs} $out/nixpkgs + echo "[]" > $out/manifest.nix + fi ''; rootEnv = pkgs.buildPackages.buildEnv { name = "root-profile-env"; |