nix: Install shell completions (#1280)
Browse files at this commit1 changed file +7 -0
- flake.nix +7 -0
flake.nixmodified+7 -0
| @@ -39,6 +39,7 @@ | |||
| 39 | rustPlatform, | 39 | rustPlatform, |
| 40 | systemd, | 40 | systemd, |
| 41 | wayland, | 41 | wayland, |
| 42 | + installShellFiles, | ||
| 42 | withDbus ? true, | 43 | withDbus ? true, |
| 43 | withSystemd ? true, | 44 | withSystemd ? true, |
| 44 | withScreencastSupport ? true, | 45 | withScreencastSupport ? true, |
| @@ -79,6 +80,7 @@ | |||
| 79 | nativeBuildInputs = [ | 80 | nativeBuildInputs = [ |
| 80 | rustPlatform.bindgenHook | 81 | rustPlatform.bindgenHook |
| 81 | pkg-config | 82 | pkg-config |
| 83 | + installShellFiles | ||
| 82 | ]; | 84 | ]; |
| 83 | 85 | ||
| 84 | buildInputs = | 86 | buildInputs = |
| @@ -117,6 +119,11 @@ | |||
| 117 | 119 | ||
| 118 | postInstall = | 120 | postInstall = |
| 119 | '' | 121 | '' |
| 122 | + installShellCompletion --cmd niri \ | ||
| 123 | + --bash <($out/bin/niri completions bash) \ | ||
| 124 | + --fish <($out/bin/niri completions fish) \ | ||
| 125 | + --zsh <($out/bin/niri completions zsh) | ||
| 126 | + | ||
| 120 | install -Dm644 resources/niri.desktop -t $out/share/wayland-sessions | 127 | install -Dm644 resources/niri.desktop -t $out/share/wayland-sessions |
| 121 | install -Dm644 resources/niri-portals.conf -t $out/share/xdg-desktop-portal | 128 | install -Dm644 resources/niri-portals.conf -t $out/share/xdg-desktop-portal |
| 122 | '' | 129 | '' |