docker-nixpkgs/images/nix-flakes/default.nix
erikarvstedt 98e0048215
nix.conf: enable parallel building (#90)
This is a sensible default given Docker images are often used for CI and build jobs.
2025-06-04 16:19:54 +02:00

23 lines
504 B
Nix

{ docker-nixpkgs
, nixVersions
, writeTextFile
, extraContents ? [ ]
}:
docker-nixpkgs.nix.override {
nix = nixVersions.stable;
extraContents = [
(writeTextFile {
name = "nix.conf";
destination = "/etc/nix/nix.conf";
text = ''
accept-flake-config = true
experimental-features = nix-command flakes
max-jobs = auto
'';
})
] ++ extraContents;
extraEnv = [
"PATH=/root/.nix-profile/bin:/usr/bin:/bin" # Not sure how to just prepend
];
}