Loading pkgs/by-name/ni/nixos-rebuild-ng/README.md +3 −4 Original line number Diff line number Diff line Loading @@ -89,9 +89,8 @@ not possible to fix, please open an issue and we can discuss a solution. your password wrong, it will fail during activation (this can be improved though) - When `--build-host` and `--target-host` are used together, we will use `nix copy` (or 2 `nix-copy-closure` if you're using Nix <2.18) instead of SSH'ing to build host and using `nix-copy-closure --to target-host`. The reason for this is documented in PR copy` instead of SSH'ing to build host and using `nix-copy-closure --to target-host`. The reason for this is documented in PR [#364698](https://github.com/NixOS/nixpkgs/pull/364698). If you do need the previous behavior, you can simulate it using `ssh build-host -- nixos-rebuild-ng switch --target-host target-host`. If that is not the case, Loading Loading @@ -119,7 +118,7 @@ not possible to fix, please open an issue and we can discuss a solution. and there was a need to bootstrap a new version of Nix before evaluating the configuration (otherwise the new Nixpkgs version may have code that is only compatible with a newer version of Nix). Nixpkgs now has a policy to be compatible with Nix 2.3, and even if this is bumped as long we don't do compatible with Nix 2.18, and even if this is bumped as long we don't do drastic minimum version changes this should not be an issue. Also, the daemon itself always run with the previous version since even we can replace Nix in `PATH` (so Nix client), but we can't replace the daemon without switching to Loading pkgs/by-name/ni/nixos-rebuild-ng/nixos-rebuild.8.scd +4 −4 Original line number Diff line number Diff line Loading @@ -251,10 +251,10 @@ It must be one of the following: *--use-substitutes* When set, nixos-rebuild will add *--use-substitutes* to each invocation of _nix-copy-closure_/_nix copy_. This will only affect the behavior of nixos-rebuild if *--target-host* or *--build-host* is also set. This is useful when the target-host connection to cache.nixos.org is faster than the connection between hosts. of _nix copy_. This will only affect the behavior of nixos-rebuild if *--target-host* or *--build-host* is also set. This is useful when the target-host connection to cache.nixos.org is faster than the connection between hosts. *--sudo* When set, *nixos-rebuild* prefixes activation commands with sudo. Loading pkgs/by-name/ni/nixos-rebuild-ng/package.nix +0 −8 Original line number Diff line number Diff line Loading @@ -15,13 +15,6 @@ # Very long tmp dirs lead to "too long for Unix domain socket" # SSH ControlPath errors. Especially macOS sets long TMPDIR paths. withTmpdir ? if stdenv.hostPlatform.isDarwin then "/tmp" else null, # This version is kind of arbitrary, we use some features that were # implemented in newer versions of Nix, but not necessary 2.18. # However, Lix is a fork of Nix 2.18, so this looks like a good version # to cut specific functionality. # ATTN: This currently doesn't disambiguate between Nix and Lix, so using this # in a conditional needs careful checking against both Nix implementations. withNix218 ? lib.versionAtLeast nix.version "2.18", # passthru.tests nixosTests, nixVersions, Loading Loading @@ -62,7 +55,6 @@ python3Packages.buildPythonApplication rec { postPatch = '' substituteInPlace nixos_rebuild/constants.py \ --subst-var-by executable ${executable} \ --subst-var-by withNix218 ${lib.boolToString withNix218} \ --subst-var-by withReexec ${lib.boolToString withReexec} \ --subst-var-by withShellFiles ${lib.boolToString withShellFiles} Loading pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py +1 −4 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ from subprocess import CalledProcessError, run from typing import Final, assert_never from . import nix, services from .constants import EXECUTABLE, WITH_NIX_2_18, WITH_REEXEC, WITH_SHELL_FILES from .constants import EXECUTABLE, WITH_REEXEC, WITH_SHELL_FILES from .models import Action, BuildAttr, Flake, Profile from .process import Remote from .utils import LogFormatter Loading Loading @@ -270,9 +270,6 @@ def parse_args( def execute(argv: list[str]) -> None: args, args_groups = parse_args(argv) if not WITH_NIX_2_18: logger.warning("you're using Nix <2.18, some features will not work correctly") common_flags = vars(args_groups["common_flags"]) common_build_flags = common_flags | vars(args_groups["common_build_flags"]) build_flags = common_build_flags | vars(args_groups["classic_build_flags"]) Loading pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/constants.py +0 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,5 @@ from typing import Final EXECUTABLE: Final[str] = "@executable@" # Use either `== "true"` if the default (e.g.: `python -m nixos_rebuild`) is # `False` or `!= "false"` if the default is `True` WITH_NIX_2_18: Final[bool] = "@withNix218@" != "false" WITH_REEXEC: Final[bool] = "@withReexec@" == "true" WITH_SHELL_FILES: Final[bool] = "@withShellFiles@" == "true" Loading
pkgs/by-name/ni/nixos-rebuild-ng/README.md +3 −4 Original line number Diff line number Diff line Loading @@ -89,9 +89,8 @@ not possible to fix, please open an issue and we can discuss a solution. your password wrong, it will fail during activation (this can be improved though) - When `--build-host` and `--target-host` are used together, we will use `nix copy` (or 2 `nix-copy-closure` if you're using Nix <2.18) instead of SSH'ing to build host and using `nix-copy-closure --to target-host`. The reason for this is documented in PR copy` instead of SSH'ing to build host and using `nix-copy-closure --to target-host`. The reason for this is documented in PR [#364698](https://github.com/NixOS/nixpkgs/pull/364698). If you do need the previous behavior, you can simulate it using `ssh build-host -- nixos-rebuild-ng switch --target-host target-host`. If that is not the case, Loading Loading @@ -119,7 +118,7 @@ not possible to fix, please open an issue and we can discuss a solution. and there was a need to bootstrap a new version of Nix before evaluating the configuration (otherwise the new Nixpkgs version may have code that is only compatible with a newer version of Nix). Nixpkgs now has a policy to be compatible with Nix 2.3, and even if this is bumped as long we don't do compatible with Nix 2.18, and even if this is bumped as long we don't do drastic minimum version changes this should not be an issue. Also, the daemon itself always run with the previous version since even we can replace Nix in `PATH` (so Nix client), but we can't replace the daemon without switching to Loading
pkgs/by-name/ni/nixos-rebuild-ng/nixos-rebuild.8.scd +4 −4 Original line number Diff line number Diff line Loading @@ -251,10 +251,10 @@ It must be one of the following: *--use-substitutes* When set, nixos-rebuild will add *--use-substitutes* to each invocation of _nix-copy-closure_/_nix copy_. This will only affect the behavior of nixos-rebuild if *--target-host* or *--build-host* is also set. This is useful when the target-host connection to cache.nixos.org is faster than the connection between hosts. of _nix copy_. This will only affect the behavior of nixos-rebuild if *--target-host* or *--build-host* is also set. This is useful when the target-host connection to cache.nixos.org is faster than the connection between hosts. *--sudo* When set, *nixos-rebuild* prefixes activation commands with sudo. Loading
pkgs/by-name/ni/nixos-rebuild-ng/package.nix +0 −8 Original line number Diff line number Diff line Loading @@ -15,13 +15,6 @@ # Very long tmp dirs lead to "too long for Unix domain socket" # SSH ControlPath errors. Especially macOS sets long TMPDIR paths. withTmpdir ? if stdenv.hostPlatform.isDarwin then "/tmp" else null, # This version is kind of arbitrary, we use some features that were # implemented in newer versions of Nix, but not necessary 2.18. # However, Lix is a fork of Nix 2.18, so this looks like a good version # to cut specific functionality. # ATTN: This currently doesn't disambiguate between Nix and Lix, so using this # in a conditional needs careful checking against both Nix implementations. withNix218 ? lib.versionAtLeast nix.version "2.18", # passthru.tests nixosTests, nixVersions, Loading Loading @@ -62,7 +55,6 @@ python3Packages.buildPythonApplication rec { postPatch = '' substituteInPlace nixos_rebuild/constants.py \ --subst-var-by executable ${executable} \ --subst-var-by withNix218 ${lib.boolToString withNix218} \ --subst-var-by withReexec ${lib.boolToString withReexec} \ --subst-var-by withShellFiles ${lib.boolToString withShellFiles} Loading
pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py +1 −4 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ from subprocess import CalledProcessError, run from typing import Final, assert_never from . import nix, services from .constants import EXECUTABLE, WITH_NIX_2_18, WITH_REEXEC, WITH_SHELL_FILES from .constants import EXECUTABLE, WITH_REEXEC, WITH_SHELL_FILES from .models import Action, BuildAttr, Flake, Profile from .process import Remote from .utils import LogFormatter Loading Loading @@ -270,9 +270,6 @@ def parse_args( def execute(argv: list[str]) -> None: args, args_groups = parse_args(argv) if not WITH_NIX_2_18: logger.warning("you're using Nix <2.18, some features will not work correctly") common_flags = vars(args_groups["common_flags"]) common_build_flags = common_flags | vars(args_groups["common_build_flags"]) build_flags = common_build_flags | vars(args_groups["classic_build_flags"]) Loading
pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/constants.py +0 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,5 @@ from typing import Final EXECUTABLE: Final[str] = "@executable@" # Use either `== "true"` if the default (e.g.: `python -m nixos_rebuild`) is # `False` or `!= "false"` if the default is `True` WITH_NIX_2_18: Final[bool] = "@withNix218@" != "false" WITH_REEXEC: Final[bool] = "@withReexec@" == "true" WITH_SHELL_FILES: Final[bool] = "@withShellFiles@" == "true"