mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-05 16:27:03 +00:00
nix: use pkgs.nix by default instead of the default profile
This fixes version detection for 2.0.
This commit is contained in:
parent
4899b6658f
commit
cd049bfdf6
2 changed files with 10 additions and 3 deletions
|
@ -53,10 +53,14 @@ in
|
||||||
options = {
|
options = {
|
||||||
nix.package = mkOption {
|
nix.package = mkOption {
|
||||||
type = types.either types.package types.path;
|
type = types.either types.package types.path;
|
||||||
default = "/nix/var/nix/profiles/default";
|
default = pkgs.nix;
|
||||||
example = "pkgs.nix";
|
defaultText = "pkgs.nix";
|
||||||
|
example = "pkgs.nixUnstable";
|
||||||
description = ''
|
description = ''
|
||||||
This option specifies the package or profile that contains the version of Nix to use throughout the system.
|
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/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)
|
environment.systemPackages = mkIf (isDerivation cfg.package)
|
||||||
[ cfg.package ];
|
[ cfg.package ];
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ in
|
||||||
options = {
|
options = {
|
||||||
system.stateVersion = mkOption {
|
system.stateVersion = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 2;
|
default = 3;
|
||||||
description = ''
|
description = ''
|
||||||
Every once in a while, a new NixOS release may change
|
Every once in a while, a new NixOS release may change
|
||||||
configuration defaults in a way incompatible with stateful
|
configuration defaults in a way incompatible with stateful
|
||||||
|
|
Loading…
Add table
Reference in a new issue