Use nix-index for command-not-found
This commit is contained in:
parent
7e1ef25ec6
commit
771ffc489a
2 changed files with 25 additions and 3 deletions
|
@ -1,8 +1,6 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.command-not-found.enable = true;
|
|
||||||
|
|
||||||
home-manager.users.charlotte = { pkgs, ... }: {
|
home-manager.users.charlotte = { pkgs, ... }: {
|
||||||
home.packages = [ pkgs.autojump ];
|
home.packages = [ pkgs.autojump ];
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
@ -15,13 +13,13 @@
|
||||||
path = "\$HOME/.config/zsh/zsh_history";
|
path = "\$HOME/.config/zsh/zsh_history";
|
||||||
};
|
};
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
|
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
||||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin
|
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin
|
||||||
'';
|
'';
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
"autojump"
|
"autojump"
|
||||||
"command-not-found"
|
|
||||||
"common-aliases"
|
"common-aliases"
|
||||||
"extract"
|
"extract"
|
||||||
"history-substring-search"
|
"history-substring-search"
|
||||||
|
|
|
@ -44,12 +44,36 @@
|
||||||
htop
|
htop
|
||||||
inotify-tools
|
inotify-tools
|
||||||
ncdu
|
ncdu
|
||||||
|
nix-index
|
||||||
(import ../../programs/pass/default.nix { inherit pkgs; })
|
(import ../../programs/pass/default.nix { inherit pkgs; })
|
||||||
(import ../../programs/ssh/default.nix { inherit pkgs; })
|
(import ../../programs/ssh/default.nix { inherit pkgs; })
|
||||||
ripgrep
|
ripgrep
|
||||||
unzip
|
unzip
|
||||||
youtube-dl
|
youtube-dl
|
||||||
];
|
];
|
||||||
|
systemd.user = {
|
||||||
|
services.nix-index = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Service to run nix-index";
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.nix-index}/bin/nix-index";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
timers.nix-index = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Timer that starts nix-index every two hours";
|
||||||
|
PartOf = [ "nix-index.service" ];
|
||||||
|
};
|
||||||
|
Timer = {
|
||||||
|
OnCalendar = "00/2:30";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue