docker-nixpkgs/images/nix-flakes/default.nix
V7 c52fdf233b
feat: Allow Nix to accept nixConfig by default (#37)
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`
2022-01-14 20:26:04 +01:00

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;
}