diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2018-03-29 21:00:49 +0200 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2018-03-29 21:10:18 +0200 |
| commit | cd049bfdf64d29a2b4859b8e146bb9b448d657ff (patch) | |
| tree | 68523b5036e91b33304ce0c0b4ab1277793f8a95 /modules/nix | |
| parent | 4899b6658f35d39c3698107295c4342de0e1cd70 (diff) | |
nix: use pkgs.nix by default instead of the default profile
This fixes version detection for 2.0.
Diffstat (limited to 'modules/nix')
| -rw-r--r-- | modules/nix/default.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 0997509..540f84d 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -53,10 +53,14 @@ in options = { nix.package = mkOption { type = types.either types.package types.path; - default = "/nix/var/nix/profiles/default"; - example = "pkgs.nix"; + default = pkgs.nix; + defaultText = "pkgs.nix"; + example = "pkgs.nixUnstable"; description = '' This option specifies the package or profile that contains the version of Nix to use throughout the system. + To keep the version of nix originally installed the default profile can be used. + + eg. /nix/var/nix/profiles/default ''; }; @@ -331,6 +335,9 @@ in "/nix/var/nix/profiles/per-user/root/channels" ]); + nix.package = mkIf (config.system.stateVersion < 3) + "/nix/var/nix/profiles/default"; + environment.systemPackages = mkIf (isDerivation cfg.package) [ cfg.package ]; |
