yep, more dotfiles

feat(shell): add long awaited unnix shell function

wiro.world 5fd98ed2 092be7a6

verified
Changed files
+13
home-manager
fragments
+13
home-manager/fragments/shell.nix
···
launch = ''nohup $argv &> /dev/null &'';
+
# Transform a store link file to a real one
+
# Useful when playing with config files
+
unnix = ''
+
set -l path $argv[1]
+
set -l realpath (readlink $path)
+
set -l nstore "/nix/store"
+
test (echo $realpath | head -c(string length $nstore)) = "$nstore"
+
+
unlink $path
+
cp "$realpath" "$path"
+
chmod 644 "$path"
+
'';
+
# Quickly explore a derivation (using registry syntax)
# e.g. `cdd nixpkgs#fontforge` or `cdd nixpkgs-unstable#fontforge`
cdd = "cd (nix build --no-link --print-out-paths $argv | ${lib.getExe pkgs.fzf})";