diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ca5e48..eab4ce6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Release 21.11 (unreleased) + +### New Options + +* The `nix.package` can be used to set the system-wide nix package. + ## Release 21.05 ### New Options diff --git a/modules/environment/nix.nix b/modules/environment/nix.nix index 9938b7b..b95503f 100644 --- a/modules/environment/nix.nix +++ b/modules/environment/nix.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE. { config, lib, pkgs, ... }: @@ -15,6 +15,15 @@ in options = { nix = { + package = mkOption { + type = types.package; + default = pkgs.nix; + defaultText = "pkgs.nix"; + description = '' + This option specifies the Nix package instance to use throughout the system. + ''; + }; + substituters = mkOption { type = types.listOf types.str; default = []; diff --git a/modules/environment/path.nix b/modules/environment/path.nix index 7fd80f8..0c0df0f 100644 --- a/modules/environment/path.nix +++ b/modules/environment/path.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE. { config, lib, pkgs, ... }: @@ -42,12 +42,12 @@ in environment = { packages = [ - (pkgs.callPackage ../../nix-on-droid { }) + (pkgs.callPackage ../../nix-on-droid { nix = config.nix.package; }) pkgs.bashInteractive pkgs.cacert pkgs.coreutils pkgs.less # since nix tools really want a pager available, #27 - pkgs.nix + config.nix.package ]; path = pkgs.buildEnv {