summary refs log tree commit diff
path: root/pkgs/shells/bash/nix-bash-completions/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/shells/bash/nix-bash-completions/default.nix')
-rw-r--r--pkgs/shells/bash/nix-bash-completions/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/shells/bash/nix-bash-completions/default.nix b/pkgs/shells/bash/nix-bash-completions/default.nix
index af516a1bcaa..d6cc156cba1 100644
--- a/pkgs/shells/bash/nix-bash-completions/default.nix
+++ b/pkgs/shells/bash/nix-bash-completions/default.nix
@@ -13,7 +13,10 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     # Nix 2.4+ provides its own completion for the nix command, see https://github.com/hedning/nix-bash-completions/issues/20
-    substituteInPlace _nix --replace 'nix nixos-option' 'nixos-option'
+    # NixOS provides its own completions for nixos-rebuild now.
+    substituteInPlace _nix \
+      --replace 'nix nixos-option' 'nixos-option' \
+      --replace 'nixos-rebuild nixos-install' 'nixos-install'
   '';
 
   strictDeps = true;