Skip to content

Commit

Permalink
Add nix.extraOptions option
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickvP committed Jun 13, 2024
1 parent 69bbc89 commit 44910c5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ let
cfg = config.cognix;
nixConfig = ''
experimental-features = nix-command flakes
${cfg.nix.extraOptions}
'';
registry = builtins.toJSON {
version = 2;
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 44910c5

Please sign in to comment.