aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-08-23 14:45:15 +0200
committerGitHub <noreply@github.com>2022-08-23 14:45:15 +0200
commitb2b607a7a915edc43350873483b7047f27cbac40 (patch)
tree601ade03f859028db082b37c3ca5e3b59faf2444
parentdb71f5646fa1a4cbc01f67d4ac14ea80b0daeece (diff)
parent0eb9946e1d3621cfc2fcffc9378dba334b25fb26 (diff)
Merge pull request #6902 from centromere/optional-nixpkgs
docker.nix: Provide boolean for whether to bundle nixpkgs
-rw-r--r--docker.nix9
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";