nix: add package option

This commit is contained in:
Tobias Happ 2021-07-24 15:23:18 +02:00 committed by Alexander Sosedkin
parent 3e3a4e2d04
commit e4d19673af
3 changed files with 19 additions and 4 deletions

View file

@ -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 = [];

View file

@ -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 {