From 61ef53b88c3da128632ff522034233914af20c8b Mon Sep 17 00:00:00 2001 From: nicoo Date: Tue, 16 Jul 2024 15:00:34 +0000 Subject: [PATCH] nixos/nix-channel: don't set `nix-path` Otherwise, the empty path in `nix.conf` takes precedence over `NIX_PATH`, and by extension the `nix.nixPath` configuration option. Introduced in 61afc4d1662fe426f02b28e386f2e053f887b6d6. --- nixos/doc/manual/release-notes/rl-2411.section.md | 3 +++ nixos/modules/config/nix-channel.nix | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 7e1127ba6cb11..636fd36b33f73 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -247,6 +247,9 @@ {option}`services.gitlab-runner.services..authenticationTokenConfigFile` instead of the former {option}`services.gitlab-runner.services..registrationConfigFile` option. +- `nix.channel.enable = false` no longer implies `nix.settings.nix-path = []`. + Since Nix 2.13, a `nix-path` set in `nix.conf` cannot be overriden by the `NIX_PATH` configuration variable. + ## Detailed migration information {#sec-release-24.11-migration} ### `sound` options removal {#sec-release-24.11-migration-sound} diff --git a/nixos/modules/config/nix-channel.nix b/nixos/modules/config/nix-channel.nix index 6498ce6c469ca..3cdd1d1b63665 100644 --- a/nixos/modules/config/nix-channel.nix +++ b/nixos/modules/config/nix-channel.nix @@ -94,8 +94,6 @@ in NIX_PATH = cfg.nixPath; }; - nix.settings.nix-path = mkIf (! cfg.channel.enable) (mkDefault ""); - systemd.tmpfiles.rules = lib.mkIf cfg.channel.enable [ ''f /root/.nix-channels - - - - ${config.system.defaultChannel} nixos\n'' ];