Skip to content

Commit

Permalink
command-not-found: show newer commands by creating empty profile
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed May 27, 2024
1 parent f9bff18 commit 128e793
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
mailcow
mgit-exporter
nix-index
nix-index-extra
];
ansible_default = default ++ [
nix-unify.nixosModules.ansible
Expand Down
10 changes: 10 additions & 0 deletions modules/nix-index-extra.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let
createEmptyProfile = ''
if [ ! -e "$HOME/.nix-profile/manifest.json" ]; then
nix profile upgrade >/dev/null 2>/dev/null || true
fi
'';
in {
programs.zsh.interactiveShellInit = createEmptyProfile;
programs.bash.interactiveShellInit = createEmptyProfile;
}
3 changes: 2 additions & 1 deletion modules/nixSettings.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ options, ... }@args:
{ options, pkgs, ... }@args:
import ./defaults/_with_unify.nix args true
{
nix.settings = {
Expand All @@ -9,6 +9,7 @@ import ./defaults/_with_unify.nix args true
};
nix.gc.automatic = true;
nix.gc.options = "--delete-older-than 14d";
nix.package = pkgs.nixVersions.latest;
}
{
nix-unify = {
Expand Down

0 comments on commit 128e793

Please sign in to comment.