refactor: use inputs.self instead of rel. paths

This commit is contained in:
Swarsel 2024-12-05 02:36:25 +01:00
parent 83bc6af1f6
commit 33046cb4a3
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
19 changed files with 1067 additions and 1711 deletions

View file

@ -1,11 +1,11 @@
{ pkgs, ... }:
{ self, pkgs, ... }:
{
programs.nix-index =
let
commandNotFound = pkgs.runCommandLocal "command-not-found.sh" { } ''
mkdir -p $out/etc/profile.d
substitute ${../../../scripts/command-not-found.sh} \
$out/etc/profile.d/command-not-found.sh \
substitute ${self + /scripts/command-not-found.sh} \
$out/etc/profile.d/command-not-found.sh \
--replace @nix-locate@ ${pkgs.nix-index}/bin/nix-locate \
--replace @tput@ ${pkgs.ncurses}/bin/tput
'';