
This is useful when Nix (with Flakes enabled) is used with Continuous Integration in order to perform actions on a project having `nixConfig` defined in `flake.nix`
18 lines
369 B
Nix
18 lines
369 B
Nix
{ docker-nixpkgs
|
|
, nixFlakes
|
|
, writeTextFile
|
|
, extraContents ? [ ]
|
|
}:
|
|
docker-nixpkgs.nix.override {
|
|
nix = nixFlakes;
|
|
extraContents = [
|
|
(writeTextFile {
|
|
name = "nix.conf";
|
|
destination = "/etc/nix/nix.conf";
|
|
text = ''
|
|
accept-flake-config = true
|
|
experimental-features = nix-command flakes
|
|
'';
|
|
})
|
|
] ++ extraContents;
|
|
}
|