1
0
Fork 0

Add bin scripts

This commit is contained in:
Daniel Kempkens 2022-01-05 10:52:59 +01:00
parent 45273bc77f
commit 6558b597db
4 changed files with 25 additions and 2 deletions

12
bins/default.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, ... }:
let
user-bin-directory = "${config.home.homeDirectory}/.bin";
in
{
home.file."${user-bin-directory}" = {
source = ./scripts;
recursive = true;
executable = true;
};
}

View file

@ -0,0 +1,8 @@
#!/bin/sh
mkdir -p "$HOME/.cache/fish"
nix flake metadata "$HOME/.config/nixpkgs" --json 2>/dev/null | \
jq -r '.locks.nodes.nixpkgs.locked | "\(.type):\(.owner)/\(.repo)/\(.rev)"' | \
xargs -I {} nix flake metadata {} --json | \
jq -r '. | "nixpkgs=\(.path)"' >"$HOME/.cache/fish/nix_path_value"

View file

@ -16,6 +16,8 @@
./programs/jq.nix ./programs/jq.nix
./config/yt-dlp.nix ./config/yt-dlp.nix
./bins
]; ];
home = { home = {
@ -40,6 +42,7 @@
qemu qemu
ripgrep ripgrep
rtmpdump rtmpdump
streamlink
tokei tokei
wget wget
xz xz

View file

@ -78,8 +78,8 @@
fenv source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh fenv source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
end end
if test -d "$HOME/bin" if test -d "$HOME/.bin"
set -gx PATH "$HOME/bin" $PATH set -gx PATH "$HOME/.bin" $PATH
end end
for app_path in \ for app_path in \