diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2db3f451..9118510a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,12 +77,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Check Nixpkgs input - uses: DeterminateSystems/flake-checker-action@main - with: - fail-mode: true - check-outdated: false # PRs shouldn't fail because main's nixpkgs is out of date - - name: Install Nix uses: ./ with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c50401a..dc6f89df 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to `experimental-nix-installer` +# Contributing to `nix-installer` Most contributions should be made upstream; see the [upstream contributing guide](https://github.com/DeterminateSystems/nix-installer/blob/main/CONTRIBUTING.md) @@ -32,7 +32,7 @@ If using an editor, it may be preferable to adopt an addon to enter the environm ## Testing Installs -If you're hacking on `experimental-nix-installer`, you likely already have Nix and cannot test locally. +If you're hacking on `nix-installer`, you likely already have Nix and cannot test locally. > That's probably a good thing! You should test in a sandbox. @@ -105,7 +105,7 @@ nix build .#hydraJobs.vm-test.rhel-v7.x86_64-linux.all -L -j 4 For PR review, you can also test arbitrary branches or checkouts like so: ```bash -nix build github:NixOS/experimental-nix-installer/${BRANCH}#hydraJobs.vm-test.ubuntu-v22_04.x86_64-linux.install-default -L +nix build github:NixOS/nix-installer/${BRANCH}#hydraJobs.vm-test.ubuntu-v22_04.x86_64-linux.install-default -L ```
@@ -193,7 +193,7 @@ nix build .#hydraJobs.container-test.ubuntu-v22_04.x86_64-linux.docker -L For PR review, you can also test arbitrary branches or checkouts like so: ```bash -nix build github:NixOS/experimental-nix-installer/${BRANCH}#hydraJobs.container-test.ubuntu-v22_04.x86_64-linux.podman -L +nix build github:NixOS/nix-installer/${BRANCH}#hydraJobs.container-test.ubuntu-v22_04.x86_64-linux.podman -L ```
@@ -260,7 +260,6 @@ You can also remove your `$HOME/nix-installer-wsl-tests-temp` folder whenever yo > [!NOTE] > The documentation below describes a process that used to be mostly manual, and is now driven externally. > The material below is generally kept up to date for documentation, manual releases, and external use purposes. -> Determinate Systems employees, consult the internal release documentation for more details: https://www.notion.so/14553fe7e1dd809eb80affb37228a7c8. This package uses [Semantic Versioning](https://semver.org/). When determining the version number for a new release refer to Semantic Versioning for guidance. You can use the `check-semver` command alias from within the development environment to validate your changes don't break semver. diff --git a/Cargo.toml b/Cargo.toml index 5c41c969..a61f8ab9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ version = "3.11.3" edition = "2021" resolver = "2" license = "LGPL-2.1" -repository = "https://github.com/NixOS/experimental-nix-installer" +repository = "https://github.com/NixOS/nix-installer" [features] default = ["cli"] diff --git a/README.md b/README.md index ff2d47e5..00e193e8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# An experimental fork of the Determinate Nix Installer, to play with upstreaming. +# Experimental Nix Installer Note, this is different from the Determinate Nix Installer, available at https://github.com/DeterminateSystems/nix-installer. @@ -17,7 +17,7 @@ If you used the **Determinate Nix Installer**, report issues at https://github.c This one-liner is the quickest way to get started on any supported system: ```shell -curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ +curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | \ sh -s -- install ``` @@ -37,14 +37,14 @@ curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental You can install Nix with the default [planner](#planners) and options by running this script: ```shell -curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ +curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | \ sh -s -- install ``` To download a platform-specific installer binary yourself: ```shell -curl -sL -o nix-installer https://artifacts.nixos.org/experimental-installer/nix-installer-x86_64-linux +curl -sL -o nix-installer https://artifacts.nixos.org/nix-installer/nix-installer-x86_64-linux chmod +x nix-installer ./nix-installer ``` @@ -53,7 +53,7 @@ This would install Nix on an `x86_64-linux` system but you can replace that with ### Planners -Determinate Nix Installer installs Nix by following a _plan_ made by a _planner_. +The experimental Nix installer installs Nix by following a _plan_ made by a _planner_. To review the available planners: ```shell @@ -70,7 +70,7 @@ To see the options for Linux, for example: You can configure planners using environment variables or command arguments: ```shell -curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ +curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | \ NIX_BUILD_GROUP_NAME=nixbuilder sh -s -- install --nix-build-group-id 4000 # Alternatively: @@ -97,7 +97,7 @@ Alternatively, you can [uninstall](#uninstalling) and [reinstall](#install-nix) ### Uninstalling -You can remove Nix installed by Determinate Nix Installer by running: +You can remove Nix installed by the experimental Nix installer by running: ```shell /nix/nix-installer uninstall @@ -113,7 +113,7 @@ On the default [GitLab] runners, you can install Nix using this configuration: ```yaml test: script: - - curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | sh -s -- install linux --no-confirm --init none + - curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | sh -s -- install linux --no-confirm --init none - . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh - nix run nixpkgs#hello - nix profile install nixpkgs#hello @@ -134,7 +134,7 @@ If you are using different runners, the above example may need to be adjusted. If you don't use [systemd], you can still install Nix by explicitly specifying the `linux` plan and `--init none`: ```shell -curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ +curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | \ sh -s -- install linux --init none ``` @@ -169,7 +169,7 @@ For containers (without an init): FROM ubuntu:latest RUN apt update -y RUN apt install curl -y -RUN curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | sh -s -- install linux \ +RUN curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | sh -s -- install linux \ --extra-conf "sandbox = false" \ --init none \ --no-confirm @@ -194,7 +194,7 @@ For containers with a [systemd] init: FROM ubuntu:latest RUN apt update -y RUN apt install curl systemd -y -RUN curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | sh -s -- install linux \ +RUN curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | sh -s -- install linux \ --extra-conf "sandbox = false" \ --no-start-daemon \ --no-confirm @@ -221,19 +221,19 @@ This repository provides a GitHub Action for installing Nix in CI workflows. **Basic usage:** ```yaml -- uses: NixOS/experimental-nix-installer@main +- uses: NixOS/nix-installer@main ``` **Install specific version:** ```yaml -- uses: NixOS/experimental-nix-installer@main +- uses: NixOS/nix-installer@main with: installer-version: v3.11.3-experimental-prerelease ``` **No-init mode (for containers):** ```yaml -- uses: NixOS/experimental-nix-installer@main +- uses: NixOS/nix-installer@main with: no-init: true ``` @@ -245,7 +245,7 @@ See the [action inputs](action.yml) for all available options. We **strongly recommend** first [enabling systemd][enabling-systemd] and then installing Nix as normal: ```shell -curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ +curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | \ sh -s -- install ``` @@ -271,7 +271,7 @@ If enabling systemd is not an option, pass `--init none` at the end of the comma > ``` ```shell -curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ +curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | \ sh -s -- install linux --init none ``` @@ -280,7 +280,7 @@ curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental If you'd like to bypass the confirmation step, you can apply the `--no-confirm` flag: ```shell -curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ +curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | \ sh -s -- install --no-confirm ``` @@ -321,17 +321,17 @@ See [this guide](./docs/building.md) for instructions on building and distributi ## As a Rust library -The Determinate Nix Installer is available as a standard [Rust] library. +The experimental Nix installer is available as a standard [Rust] library. See [this guide](./docs/rust-library.md) for instructions on using the library in your own Rust code. ## Accessing other versions -You can pin to a specific version of Determinate Nix Installer by modifying the download URL. +You can pin to a specific version of the experimental Nix installer by modifying the download URL. Here's an example: ```shell VERSION="v0.6.0" -curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer/tag/${VERSION}/nix-installer.sh | \ +curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer/tag/${VERSION}/nix-installer.sh | \ sh -s -- install ``` @@ -343,7 +343,7 @@ Here's an example: ```shell VERSION="v0.6.0" ARCH="aarch64-linux" -curl -sSf -L https://github.com/NixOS/experimental-nix-installer/releases/download/${VERSION}/nix-installer-${ARCH} -o nix-installer +curl -sSf -L https://github.com/NixOS/nix-installer/releases/download/${VERSION}/nix-installer-${ARCH} -o nix-installer ./nix-installer install ``` @@ -364,7 +364,7 @@ Differing from the upstream [Nix][upstream-nix] installer scripts: ## Installer settings -Determinate Nix Installer provides a variety of configuration settings, some [general](#general-settings) and some on a per-command basis. +The experimental Nix installer provides a variety of configuration settings, some [general](#general-settings) and some on a per-command basis. All settings are available via flags or via `NIX_INSTALLER_*` environment variables. ### General settings @@ -439,31 +439,20 @@ nix-installer uninstall /path/to/receipt.json `nix-installer self-test` only takes [general settings](#general-settings). [actions]: https://github.com/features/actions -[cache]: https://docs.determinate.systems/flakehub/cache -[det-nix]: https://docs.determinate.systems/determinate-nix -[determinate]: https://docs.determinate.systems -[determinate-flake]: https://github.com/DeterminateSystems/determinate -[detsys]: https://determinate.systems [docker]: https://docker.com [enabling-systemd]: https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/#how-can-you-get-systemd-on-your-machine -[flakehub]: https://flakehub.com [flakes]: https://zero-to-nix.com/concepts/flakes -[forked-installer]: https://github.com/nixos/experimental-nix-installer +[forked-installer]: https://github.com/nixos/nix-installer [gitlab]: https://gitlab.com [gitlab-ci]: https://docs.gitlab.com/ee/ci -[macos-upgrades]: https://determinate.systems/posts/nix-survival-mode-on-macos/ [nix]: https://nixos.org -[nix-installer-action]: https://github.com/DeterminateSystems/nix-installer-action [nixgl]: https://github.com/guibou/nixGL [nixos]: https://zero-to-nix.com/concepts/nixos [openssl]: https://openssl.org [podman]: https://podman.io -[privacy]: https://determinate.systems/policies/privacy -[private-flakes]: https://docs.determinate.systems/flakehub/private-flakes -[releases]: https://github.com/NixOS/experimental-nix-installer/releases +[releases]: https://github.com/NixOS/nix-installer/releases [rust]: https://rust-lang.org [selinux]: https://selinuxproject.org -[semver]: https://docs.determinate.systems/flakehub/concepts/semver [steam-deck]: https://store.steampowered.com/steamdeck [systemd]: https://systemd.io [upstream-nix]: https://github.com/NixOS/nix diff --git a/action.yml b/action.yml index bb72fb2b..dbb04d65 100644 --- a/action.yml +++ b/action.yml @@ -111,9 +111,9 @@ runs: echo "Downloading nix-installer $VERSION for $SYSTEM from GitHub releases" if [ "$VERSION" == "latest" ]; then - DOWNLOAD_URL="https://github.com/NixOS/experimental-nix-installer/releases/latest/download/${BINARY_NAME}" + DOWNLOAD_URL="https://github.com/NixOS/nix-installer/releases/latest/download/${BINARY_NAME}" else - DOWNLOAD_URL="https://github.com/NixOS/experimental-nix-installer/releases/download/${VERSION}/${BINARY_NAME}" + DOWNLOAD_URL="https://github.com/NixOS/nix-installer/releases/download/${VERSION}/${BINARY_NAME}" fi echo "Downloading from: $DOWNLOAD_URL" @@ -122,7 +122,7 @@ runs: if [ $? -ne 0 ] || [ ! -f "$INSTALLER_DIR/$BINARY_NAME" ]; then echo "::error ::Failed to download installer binary: $BINARY_NAME" echo "::error ::Version: $VERSION" - echo "::error ::Check available releases: https://github.com/NixOS/experimental-nix-installer/releases" + echo "::error ::Check available releases: https://github.com/NixOS/nix-installer/releases" exit 1 fi diff --git a/assemble_installer.py b/assemble_installer.py index 4a711912..9bde909e 100644 --- a/assemble_installer.py +++ b/assemble_installer.py @@ -15,7 +15,7 @@ def get_hydra_evals() -> list[dict[str, Any]]: """Fetch evaluations from Hydra jobset.""" - url = "https://hydra.nixos.org/jobset/experimental-nix-installer/experimental-installer/evals" + url = "https://hydra.nixos.org/jobset/nix-installer/nix-installer/evals" req = urllib.request.Request(url, headers={"Accept": "application/json"}) with urllib.request.urlopen(req) as response: data = json.loads(response.read().decode("utf-8")) diff --git a/docs/building.md b/docs/building.md index c11e13b5..84983088 100644 --- a/docs/building.md +++ b/docs/building.md @@ -11,10 +11,10 @@ To build a portable Linux binary on a system with Nix: # to build a local copy nix build -L ".#nix-installer-static" # to build the remote main development branch -nix build -L "github:determinatesystems/nix-installer#nix-installer-static" +nix build -L "github:NixOS/nix-installer#nix-installer-static" # for a specific version of the installer: export NIX_INSTALLER_TAG="v0.6.0" -nix build -L "github:determinatesystems/nix-installer/$NIX_INSTALLER_TAG#nix-installer-static" +nix build -L "github:NixOS/nix-installer/$NIX_INSTALLER_TAG#nix-installer-static" ``` ## On macOS @@ -23,10 +23,10 @@ nix build -L "github:determinatesystems/nix-installer/$NIX_INSTALLER_TAG#nix-ins # to build a local copy nix build -L ".#nix-installer" # to build the remote main development branch -nix build -L "github:determinatesystems/nix-installer#nix-installer" +nix build -L "github:NixOS/nix-installer#nix-installer" # for a specific version of the installer: export NIX_INSTALLER_TAG="v0.6.0" -nix build -L "github:determinatesystems/nix-installer/$NIX_INSTALLER_TAG#nix-installer" +nix build -L "github:NixOS/nix-installer/$NIX_INSTALLER_TAG#nix-installer" ``` ## Copying the executable @@ -38,11 +38,11 @@ You can also add the installer to a system without Nix using [cargo], as there a # to build and run a local copy RUSTFLAGS="--cfg tokio_unstable" cargo run -- --help # to build the remote main development branch -RUSTFLAGS="--cfg tokio_unstable" cargo install --git https://github.com/DeterminateSystems/nix-installer +RUSTFLAGS="--cfg tokio_unstable" cargo install --git https://github.com/NixOS/nix-installer nix-installer --help # for a specific version of the installer: export NIX_INSTALLER_TAG="v0.6.0" -RUSTFLAGS="--cfg tokio_unstable" cargo install --git https://github.com/DeterminateSystems/nix-installer --tag $NIX_INSTALLER_TAG +RUSTFLAGS="--cfg tokio_unstable" cargo install --git https://github.com/NixOS/nix-installer --tag $NIX_INSTALLER_TAG nix-installer --help ``` diff --git a/docs/rust-library.md b/docs/rust-library.md index e84d9867..48fdca25 100644 --- a/docs/rust-library.md +++ b/docs/rust-library.md @@ -1,7 +1,7 @@ ## As a Rust library > [!WARNING] -> Using Determinate Nix Installer as a [Rust] library is still experimental. +> Using the experimental Nix installer as a [Rust] library is still experimental. > This feature is likely to be removed in the future without an advocate. > If you're using this, please let us know and we can provide a path to stabilization. @@ -30,13 +30,6 @@ Then it's possible to review the [documentation]: cargo doc --open -p nix-installer ``` -Documentation is also available via `nix build`: - -```shell -nix build github:DeterminateSystems/nix-installer#nix-installer.doc -firefox result-doc/nix-installer/index.html -``` - [clap]: https://clap.rs [documentation]: https://docs.rs/nix-installer/latest/nix_installer [lib]: https://docs.rs/nix-installer diff --git a/nix-installer.sh b/nix-installer.sh index 80ca111b..7e4f6216 100755 --- a/nix-installer.sh +++ b/nix-installer.sh @@ -2,7 +2,7 @@ # shellcheck shell=dash # If you need an offline install, or you'd prefer to run the binary directly, head to -# https://github.com/DeterminateSystems/nix-installer/releases then pick the version and platform +# https://github.com/NixOS/nix-installer/releases then pick the version and platform # most appropriate for your deployment target. # # This is just a little script that selects and downloads the right `nix-installer`. It does @@ -30,7 +30,7 @@ is_zsh() { set -u # If NIX_INSTALLER_FORCE_ALLOW_HTTP is unset or empty, default it. -NIX_INSTALLER_BINARY_ROOT="${NIX_INSTALLER_BINARY_ROOT:-https://github.com/NixOS/experimental-nix-installer/releases/download/$assemble_installer_templated_version}" +NIX_INSTALLER_BINARY_ROOT="${NIX_INSTALLER_BINARY_ROOT:-https://github.com/NixOS/nix-installer/releases/download/$assemble_installer_templated_version}" main() { downloader --check diff --git a/src/action/common/place_nix_configuration.rs b/src/action/common/place_nix_configuration.rs index f4f31bf9..57c51b64 100644 --- a/src/action/common/place_nix_configuration.rs +++ b/src/action/common/place_nix_configuration.rs @@ -17,13 +17,13 @@ pub const NIX_CONF_FOLDER: &str = "/etc/nix"; pub const NIX_CONF: &str = "/etc/nix/nix.conf"; const CUSTOM_NIX_CONF: &str = "/etc/nix/nix.custom.conf"; -const NIX_CONFIG_HEADER: &str = r#"# Generated by https://github.com/DeterminateSystems/nix-installer. +const NIX_CONFIG_HEADER: &str = r#"# Generated by https://github.com/NixOS/nix-installer # See `/nix/nix-installer --version` for the version details. "#; const NIX_CONFIG_FOOTER: &str = "!include nix.custom.conf"; -pub(crate) const CUSTOM_NIX_CONFIG_HEADER: &str = r#"# Written by https://github.com/DeterminateSystems/nix-installer. +pub(crate) const CUSTOM_NIX_CONFIG_HEADER: &str = r#"# Written by https://github.com/NixOS/nix-installer # The contents below are based on options specified at installation time. "#; @@ -126,10 +126,6 @@ impl PlaceNixConfiguration { "extra-nix-path".to_string(), "nixpkgs=flake:nixpkgs".to_string(), ); - settings.insert( - "upgrade-nix-store-path-url".to_string(), - "https://install.determinate.systems/nix-upgrade/stable/universal".to_string(), - ); // NOTE(cole-h): This is a workaround to hopefully unbreak users of Cachix. // When `cachix use`ing a cache, the Cachix CLI will sanity-check the system configuration diff --git a/src/action/macos/create_fstab_entry.rs b/src/action/macos/create_fstab_entry.rs index 8f0f2678..5fcbe413 100644 --- a/src/action/macos/create_fstab_entry.rs +++ b/src/action/macos/create_fstab_entry.rs @@ -15,7 +15,7 @@ const FSTAB_PATH: &str = "/etc/fstab"; This action queries `diskutil info` on the volume to fetch it's UUID and add the relevant information to `/etc/fstab`. */ -// Initially, a `NAME` was used, however in https://github.com/DeterminateSystems/nix-installer/issues/212 +// Initially, a `NAME` was used, however in https://github.com/NixOS/nix-installer/issues/212 // several users reported issues. Using a UUID resolved the issue for them. #[derive(Debug, serde::Deserialize, serde::Serialize, Clone)] #[serde(tag = "action_name", rename = "create_fstab_entry")] diff --git a/src/action/mod.rs b/src/action/mod.rs index cad1b7be..74ee2a81 100644 --- a/src/action/mod.rs +++ b/src/action/mod.rs @@ -382,8 +382,6 @@ pub enum ActionErrorKind { } }).collect::>().join("\n"))] Multiple(Vec), - #[error("Determinate Nix planned, but this installer is not equipped to install it.")] - DeterminateNixUnavailable, /// The path already exists with different content that expected #[error( "`{0}` exists with different content than planned, consider removing it with `rm {0}`" @@ -556,7 +554,7 @@ pub enum ActionErrorKind { MissingRemoveUserFromGroupCommand, #[error("\ Could not detect systemd; you may be able to get up and running without systemd with `nix-installer install linux --init none`.\n\ - See https://github.com/NixOS/experimental-nix-installer#without-systemd-linux-only for documentation on usage and drawbacks.\ + See https://github.com/NixOS/nix-installer#without-systemd-linux-only for documentation on usage and drawbacks.\ ")] SystemdMissing, #[error("`{command}` failed, message: {message}")] diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 90437ffa..fb6bc7e0 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -15,12 +15,6 @@ use url::Url; use self::subcommand::NixInstallerSubcommand; -const FAIL_PKG_SUGGEST: &str = "\ -The Determinate Nix Installer failed. - -Try our macOS-native package instead, which can handle almost anything: https://dtr.mn/determinate-nix\ -"; - #[async_trait::async_trait] pub trait CommandExecute { async fn execute(self) -> eyre::Result; @@ -102,8 +96,6 @@ impl CommandExecute for NixInstallerCli { eprintln!("{err:?}\n"); } - tracing::warn!("{}\n", FAIL_PKG_SUGGEST.trim()); - return Ok(ExitCode::FAILURE); } } @@ -177,7 +169,7 @@ pub fn ensure_root() -> eyre::Result<()> { "HTTP_PROXY" | "http_proxy" | "HTTPS_PROXY" | "https_proxy" => true, // Our own environments key if key.starts_with("NIX_INSTALLER") => true, - // Our own environments + // Kept for backward compatibility with existing installations key if key.starts_with("DETSYS_") => true, _ => false, }; diff --git a/src/cli/subcommand/install/mod.rs b/src/cli/subcommand/install/mod.rs index 86002940..e7fa2e8e 100644 --- a/src/cli/subcommand/install/mod.rs +++ b/src/cli/subcommand/install/mod.rs @@ -28,7 +28,7 @@ use owo_colors::OwoColorize; const EXISTING_INCOMPATIBLE_PLAN_GUIDANCE: &str = "\ If you are trying to upgrade Nix, try running `sudo -i nix upgrade-nix` instead.\n\ If you are trying to install Nix over an existing install (from an incompatible `nix-installer` install), try running `/nix/nix-installer uninstall` then try to install again.\n\ - If you are using `nix-installer` in an automated curing process and seeing this message, consider pinning the version you use via https://github.com/NixOS/experimental-nix-installer#accessing-other-versions.\ + If you are using `nix-installer` in an automated curing process and seeing this message, consider pinning the version you use via https://github.com/NixOS/nix-installer#accessing-other-versions.\ "; /** @@ -103,7 +103,7 @@ impl CommandExecute for Install { let uninstall_command = match Path::new("/nix/nix-installer").exists() { true => "/nix/nix-installer uninstall".into(), - false => format!("curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/tag/v{} | sh -s -- uninstall", env!("CARGO_PKG_VERSION")), + false => "curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | sh -s -- uninstall" }; if plan.is_some() && maybe_planner.is_some() { diff --git a/src/cli/subcommand/uninstall.rs b/src/cli/subcommand/uninstall.rs index 13c9f0e7..48af2eb7 100644 --- a/src/cli/subcommand/uninstall.rs +++ b/src/cli/subcommand/uninstall.rs @@ -129,7 +129,7 @@ impl CommandExecute for Uninstall { format!( "\ Unable to parse plan, this plan was created by `nix-installer` version `{plan_version}`, this is `nix-installer` version `{current_version}`\n\ - To uninstall, either run `/nix/nix-installer uninstall` or `curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/tag/v{plan_version} | sh -s -- uninstall`\ + To uninstall, either run `/nix/nix-installer uninstall` or `curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | sh -s -- uninstall`\ ").red().to_string() }); }, @@ -139,7 +139,6 @@ impl CommandExecute for Uninstall { }; if let Err(e) = plan.check_compatible() { - let version = plan.version; eprintln!( "{}", format!("\ @@ -147,7 +146,7 @@ impl CommandExecute for Uninstall { \n\ Found existing plan in `{RECEIPT_LOCATION}` which was created by a version incompatible `nix-installer`.\n\ \n - To uninstall, either run `/nix/nix-installer uninstall` or `curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/tag/v${version} | sh -s -- uninstall`\n\ + To uninstall, either run `/nix/nix-installer uninstall` or `curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/nix-installer | sh -s -- uninstall`\n\ \n\ ").red() ); diff --git a/src/lib.rs b/src/lib.rs index 9bea310a..75105739 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ // .filter_map() predicates returns Some/None, which is more clear than .filter()'s -> bool predicates. #![allow(clippy::unnecessary_filter_map)] -/*! The Determinate [Nix](https://github.com/NixOS/nix) Installer +/*! The [Nix](https://github.com/NixOS/nix) installer `nix-installer` breaks down into three main concepts: diff --git a/src/planner/mod.rs b/src/planner/mod.rs index 00f6b41e..d923efa5 100644 --- a/src/planner/mod.rs +++ b/src/planner/mod.rs @@ -384,8 +384,6 @@ pub enum PlannerError { Sysctl(#[from] sysctl::SysctlError), #[error("Detected that this process is running under Rosetta, using Nix in Rosetta is not supported (Please open an issue with your use case)")] RosettaDetected, - #[error("Determinate Nix is not available. See: https://determinate.systems/enterprise")] - DeterminateNixUnavailable, /// A Linux SELinux related error #[error("Unable to install on an SELinux system without common SELinux tooling, the binaries `restorecon`, and `semodule` are required")] SelinuxRequirements, @@ -416,7 +414,6 @@ impl HasExpectedErrors for PlannerError { PlannerError::Sysctl(_) => None, this @ PlannerError::IncompatibleOperatingSystem { .. } => Some(Box::new(this)), this @ PlannerError::RosettaDetected => Some(Box::new(this)), - this @ PlannerError::DeterminateNixUnavailable => Some(Box::new(this)), PlannerError::OsRelease(_) => None, PlannerError::Utf8(_) => None, PlannerError::SelinuxRequirements => Some(Box::new(self)), diff --git a/tests/fixtures/linux/linux.json b/tests/fixtures/linux/linux.json index 1cbf7f72..59534fe9 100644 --- a/tests/fixtures/linux/linux.json +++ b/tests/fixtures/linux/linux.json @@ -1067,11 +1067,10 @@ "extra-trusted-public-keys": "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM= cache.flakehub.com-4:Asi8qIv291s0aYLyH6IOnr5Kf6+OF14WVjkE6t3xMio= cache.flakehub.com-5:zB96CRlL7tiPtzA9/WKyPkp3A2vqxqgdgyTVNGShPDU= cache.flakehub.com-6:W4EGFwAGgBj3he7c5fNh9NkOXw0PUVaxygCVKeuvaqU= cache.flakehub.com-7:mvxJ2DZVHn/kRxlIaxYNMuDG1OvMckZu32um1TadOR8= cache.flakehub.com-8:moO+OVS0mnTjBTcOUh2kYLQEd59ExzyoW1QgQ8XAARQ= cache.flakehub.com-9:wChaSeTI6TeCuV/Sg2513ZIM9i0qJaYsF+lZCXg0J6o= cache.flakehub.com-10:2GqeNlIp6AKp4EF2MVbE1kBOp9iBSyo0UPR9KoR0o1Y=", "bash-prompt-prefix": "(nix:$name)\\040", "max-jobs": "auto", - "extra-nix-path": "nixpkgs=flake:nixpkgs", - "upgrade-nix-store-path-url": "https://install.determinate.systems/nix-upgrade/stable/universal" + "extra-nix-path": "nixpkgs=flake:nixpkgs" } }, - "header": "# Generated by https://github.com/DeterminateSystems/nix-installer.\n# See `/nix/nix-installer --version` for the version details.\n", + "header": "# Generated by https://github.com/NixOS/nix-installer.\n# See `/nix/nix-installer --version` for the version details.\n", "footer": "!include nix.custom.conf" }, "state": "Completed" diff --git a/tests/fixtures/linux/steam-deck.json b/tests/fixtures/linux/steam-deck.json index 98054ca0..d29a4f28 100644 --- a/tests/fixtures/linux/steam-deck.json +++ b/tests/fixtures/linux/steam-deck.json @@ -1092,11 +1092,10 @@ "extra-trusted-public-keys": "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM= cache.flakehub.com-4:Asi8qIv291s0aYLyH6IOnr5Kf6+OF14WVjkE6t3xMio= cache.flakehub.com-5:zB96CRlL7tiPtzA9/WKyPkp3A2vqxqgdgyTVNGShPDU= cache.flakehub.com-6:W4EGFwAGgBj3he7c5fNh9NkOXw0PUVaxygCVKeuvaqU= cache.flakehub.com-7:mvxJ2DZVHn/kRxlIaxYNMuDG1OvMckZu32um1TadOR8= cache.flakehub.com-8:moO+OVS0mnTjBTcOUh2kYLQEd59ExzyoW1QgQ8XAARQ= cache.flakehub.com-9:wChaSeTI6TeCuV/Sg2513ZIM9i0qJaYsF+lZCXg0J6o= cache.flakehub.com-10:2GqeNlIp6AKp4EF2MVbE1kBOp9iBSyo0UPR9KoR0o1Y=", "bash-prompt-prefix": "(nix:$name)\\040", "max-jobs": "auto", - "extra-nix-path": "nixpkgs=flake:nixpkgs", - "upgrade-nix-store-path-url": "https://install.determinate.systems/nix-upgrade/stable/universal" + "extra-nix-path": "nixpkgs=flake:nixpkgs" } }, - "header": "# Generated by https://github.com/DeterminateSystems/nix-installer.\n# See `/nix/nix-installer --version` for the version details.\n", + "header": "# Generated by https://github.com/NixOS/nix-installer.\n# See `/nix/nix-installer --version` for the version details.\n", "footer": "!include nix.custom.conf" }, "state": "Completed" diff --git a/tests/fixtures/macos/macos.json b/tests/fixtures/macos/macos.json index 04db4edd..2fcc275a 100644 --- a/tests/fixtures/macos/macos.json +++ b/tests/fixtures/macos/macos.json @@ -1152,11 +1152,10 @@ "extra-trusted-public-keys": "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM= cache.flakehub.com-4:Asi8qIv291s0aYLyH6IOnr5Kf6+OF14WVjkE6t3xMio= cache.flakehub.com-5:zB96CRlL7tiPtzA9/WKyPkp3A2vqxqgdgyTVNGShPDU= cache.flakehub.com-6:W4EGFwAGgBj3he7c5fNh9NkOXw0PUVaxygCVKeuvaqU= cache.flakehub.com-7:mvxJ2DZVHn/kRxlIaxYNMuDG1OvMckZu32um1TadOR8= cache.flakehub.com-8:moO+OVS0mnTjBTcOUh2kYLQEd59ExzyoW1QgQ8XAARQ= cache.flakehub.com-9:wChaSeTI6TeCuV/Sg2513ZIM9i0qJaYsF+lZCXg0J6o= cache.flakehub.com-10:2GqeNlIp6AKp4EF2MVbE1kBOp9iBSyo0UPR9KoR0o1Y=", "bash-prompt-prefix": "(nix:$name)\\040", "max-jobs": "auto", - "extra-nix-path": "nixpkgs=flake:nixpkgs", - "upgrade-nix-store-path-url": "https://install.determinate.systems/nix-upgrade/stable/universal" + "extra-nix-path": "nixpkgs=flake:nixpkgs" } }, - "header": "# Generated by https://github.com/DeterminateSystems/nix-installer.\n# See `/nix/nix-installer --version` for the version details.\n", + "header": "# Generated by https://github.com/NixOS/nix-installer.\n# See `/nix/nix-installer --version` for the version details.\n", "footer": "!include nix.custom.conf" }, "state": "Completed" diff --git a/upload_s3.sh b/upload_s3.sh index 5e3ba983..a10f8d48 100755 --- a/upload_s3.sh +++ b/upload_s3.sh @@ -35,8 +35,8 @@ for artifact in $(find artifacts/ -type f); do cp "$artifact" "$GIT_ISH"/ done -sed -i "s@https://install.determinate.systems/nix@$DEST_INSTALL_URL@" "$DEST/nix-installer.sh" -sed -i "s@https://install.determinate.systems/nix@https://install.determinate.systems/nix/rev/$GIT_ISH@" "$GIT_ISH/nix-installer.sh" +sed -i "s@https://artifacts.nixos.org/nix-installer@$DEST_INSTALL_URL@" "$DEST/nix-installer.sh" +sed -i "s@https://artifacts.nixos.org/nix-installer@https://artifacts.nixos.org/nix-installer/rev/$GIT_ISH@" "$GIT_ISH/nix-installer.sh" if is_tag; then cp "$DEST/nix-installer.sh" ./nix-installer.sh