Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
Don't enable nix-bash-completions when using Nix 2.4
Browse files Browse the repository at this point in the history
2.4 has its own completion script which collides with
nix-bash-completions.
  • Loading branch information
edolstra committed Jun 4, 2020
1 parent 3327b9a commit bbfc473
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 1 addition & 3 deletions nixos/modules/config/system-path.nix
Expand Up @@ -8,8 +8,7 @@ with lib;
let

requiredPackages = map (pkg: setPrio ((pkg.meta.priority or 5) + 3) pkg)
[ config.nix.package
pkgs.acl
[ pkgs.acl
pkgs.attr
pkgs.bashInteractive # bash with ncurses support
pkgs.bzip2
Expand All @@ -33,7 +32,6 @@ let
pkgs.nano
pkgs.ncurses
pkgs.netcat
pkgs.nix-info
config.programs.ssh.package
pkgs.perl
pkgs.procps
Expand Down
3 changes: 0 additions & 3 deletions nixos/modules/programs/bash/bash.nix
Expand Up @@ -238,9 +238,6 @@ in
"/share/bash-completion"
];

environment.systemPackages = optional cfg.enableCompletion
pkgs.nix-bash-completions;

environment.shells =
[ "/run/current-system/sw/bin/bash"
"/run/current-system/sw/bin/sh"
Expand Down
6 changes: 6 additions & 0 deletions nixos/modules/services/misc/nix-daemon.nix
Expand Up @@ -442,6 +442,12 @@ in
nix.binaryCachePublicKeys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
nix.binaryCaches = [ "https://cache.nixos.org/" ];

environment.systemPackages =
[ nix
pkgs.nix-info
]
++ optional (config.programs.bash.enableCompletion && !versionAtLeast nixVersion "2.4pre") pkgs.nix-bash-completions;

environment.etc."nix/nix.conf".source = nixConf;

environment.etc."nix/registry.json".text = builtins.toJSON {
Expand Down

0 comments on commit bbfc473

Please sign in to comment.