diff --git a/config/navi/christoph.cheat b/config/navi/christoph.cheat index f387fd8d..6ba326b6 100644 --- a/config/navi/christoph.cheat +++ b/config/navi/christoph.cheat @@ -8,6 +8,16 @@ sudo nixos-rebuild --flake .# $ type: echo -e "switch\nbuild\nboot" $ flake: echo -e "nixinator\nnixtop" +% nixos +# Rebuild the system using nh +nh os +$ mode: echo -e "switch\nbuild\nboot" + +% nixos +# Clean the nix store +nh clean +$ mode: echo -e "all\nuser" + % nixos # Find out why a package is included in the closure when building the system derivation nix why-depends /run/current-system nixpkgs# @@ -22,6 +32,35 @@ $ executable: bash -c "compgen -c" ldd $(readlink -f $(which )) $ executable: bash -c "compgen -c" +% nixos +# Browse closures in the nix store sorted by size +nix-tree + +% nixos +# Search in nixpkgs +nps -e "" + +% nixos +# Search in nixpkgs, nur, nixos and home-manager +nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history + +% nixos +# Compare the current NixOS generation to another one +nvd diff /run/current-system ./result + +% nixos +# Generate a nix fetcher section +nurl "" + +% nixos +# Generate a nix fetcher section for a specific revision +nurl "" "" + +% nixos +# Run an unpatched binary on NixOS +nix-alien-ld -- +$ binary: eza -f -1 + ; =========================== ; SYSTEMD ; =========================== @@ -104,6 +143,37 @@ xdg-mime query default xdg-mime query default $(file --mime-type | awk -F' ' '{print $2}') $ file: eza -f -1 +% ouch +# Extract an archive +ouch decompress "" +$ archive: eza -f -1 + +% pastel +# Generate a color +pastel color +$ color: pastel list + +% pastel +# Generate an adjacent color +pastel color | pastel +$ color: pastel list +$ mode: echo -e "complement\ntextcolor" + +% pastel +# Generate a color gradient +pastel gradient | pastel format hex +$ a: pastel list +$ b: pastel list + +% ripdrag +# Drag & drop file from the terminal +ripdrag +$ file: eza -1 + +% nvidia-smi +# Monitor Nvidia GPUs +watch -d -c -n 0.5 nvidia-smi + ; =========================== ; CODE ; =========================== @@ -138,7 +208,11 @@ yt-dlp -f 'ba' --extract-audio --audio-format mp3 "" % spotdl # Download spotify playlist -spotdl --config /home/christoph/.spotdl/config.json --user-auth --format m4a --bitrate disable --threads 24 --generate-lrc --m3u "" download "" +mkdir -p "" && cd "" && spotdl --client-id (cat /home/christoph/.secrets/spotify_client_id) --client-secret (cat /home/christoph/.secrets/spotify_client_secret) --user-auth --cookie-file /home/christoph/.secrets/youtube_music_cookies --format opus --bitrate disable --threads 24 --m3u "" download "" && cd .. + +% spotdl +# Download spotify item +mkdir -p "" && cd "" && spotdl --client-id (cat /home/christoph/.secrets/spotify_client_id) --client-secret (cat /home/christoph/.secrets/spotify_client_secret) --user-auth --cookie-file /home/christoph/.secrets/youtube_music_cookies --format opus --bitrate disable --threads 24 download "" && cd .. ; =========================== ; FFMPEG