diff --git a/modules/nix.nix b/modules/nix.nix index fe107a4..6dab405 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -3,6 +3,7 @@ let cfg = config.cognix; nixConfig = '' experimental-features = nix-command flakes + ${cfg.nix.extraOptions} ''; registry = builtins.toJSON { version = 2; @@ -32,6 +33,16 @@ in This also sets the NIX_PATH so nixpkgs points to the nixpkgs used in cognix. ''; }; + nix.extraOptions = mkOption { + type = types.lines; + default = ""; + example = '' + cores = 4 + ''; + description = '' + Additional text appended to {file}`nix.conf` inside the image, when includeNix = true. + ''; + }; }; config = lib.mkIf cfg.includeNix { dockerTools.streamLayeredImage = {