diff --git a/modules/programs/bash/command-not-found.nix b/modules/programs/bash/command-not-found.nix index 1aecd9051e5..4eb11d3a172 100644 --- a/modules/programs/bash/command-not-found.nix +++ b/modules/programs/bash/command-not-found.nix @@ -28,7 +28,7 @@ in # This function is called whenever a command is not found. command_not_found_handle() { local p=/run/current-system/sw/bin/command-not-found - if [ -x $p -a -f /var/lib/nixos/programs.sqlite ]; then + if [ -x $p -a -f /nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite ]; then # Run the helper program. $p "$1" # Retry the command if we just installed it. diff --git a/modules/programs/bash/command-not-found.pl b/modules/programs/bash/command-not-found.pl index b497b05d33e..916649059d3 100644 --- a/modules/programs/bash/command-not-found.pl +++ b/modules/programs/bash/command-not-found.pl @@ -7,7 +7,7 @@ use Config; my $program = $ARGV[0]; -my $dbPath = "/var/lib/nixos/programs.sqlite"; +my $dbPath = "/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite"; my $dbh = DBI->connect("dbi:SQLite:dbname=$dbPath", "", "") or die "cannot open database `$dbPath'";