From a580cd067c468677bc6e0a0119732962e55faa0a Mon Sep 17 00:00:00 2001 From: dnsem Date: Fri, 29 Dec 2023 19:52:57 +0100 Subject: [PATCH 1/2] Update faq.mdx I installed nix 2.15 on Ubuntu 22.04 using DeterminateSystems installer. When trying to upgrade nix I got "sudo: nix: command not found". This workaround allowed me to successfully upgrade nix - it is using environment of normal user when running command as root user. --- pages/faq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/faq.mdx b/pages/faq.mdx index 6318a3d..8c831d4 100644 --- a/pages/faq.mdx +++ b/pages/faq.mdx @@ -11,7 +11,7 @@ We at [Determinate Systems][detsys] recommend using Nix **2.18.1** or newer in c You can upgrade Nix using the [`upgrade-nix`][upgrade-nix] command. To upgrade to Nix 2.18.1: ```shell -sudo nix upgrade-nix \ +sudo -E env "PATH=$PATH" nix upgrade-nix \ --nix-store-paths-url https://releases.nixos.org/nix/nix-2.18.1/fallback-paths.nix ``` From fc668deb6ba884342dc8f80eb29f8154c5dfb7ac Mon Sep 17 00:00:00 2001 From: dnsem Date: Wed, 24 Jul 2024 19:56:49 +0200 Subject: [PATCH 2/2] Update faq.mdx Removed '-E' flag as running with modified PATH is enough --- pages/faq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/faq.mdx b/pages/faq.mdx index 8c831d4..479c8f3 100644 --- a/pages/faq.mdx +++ b/pages/faq.mdx @@ -11,7 +11,7 @@ We at [Determinate Systems][detsys] recommend using Nix **2.18.1** or newer in c You can upgrade Nix using the [`upgrade-nix`][upgrade-nix] command. To upgrade to Nix 2.18.1: ```shell -sudo -E env "PATH=$PATH" nix upgrade-nix \ +sudo env "PATH=$PATH" nix upgrade-nix \ --nix-store-paths-url https://releases.nixos.org/nix/nix-2.18.1/fallback-paths.nix ```