From 1fc3a282bd6cdfe0d050dc8c0fa5b0d5a4500a0f Mon Sep 17 00:00:00 2001 From: Neovoid Pineapple Date: Fri, 3 Feb 2023 14:25:39 +0000 Subject: [PATCH] added nix cheatsheet --- Nix.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Nix.md b/Nix.md index 335ece1..4f17eca 100644 --- a/Nix.md +++ b/Nix.md @@ -17,6 +17,22 @@ You can install packages with `nix-env --install`. `nix-env --query` lists all d For graphical acceleration, desktop integration, and fixing locale warnings, see this [ArchWiki page](https://wiki.archlinux.org/title/Nix). +### Basic of nix package manager (cheatsheet) +|-------------------------+----------------------------------------+----------------------------| +| Description | Command | Example | +|-------------------------+----------------------------------------+----------------------------| +| List All Installed pkgs | nix-env -q | | +| Query Installed pkgs | nix-env -q search_term | nix-env -q librewolf | +| Query Available pkgs | nix-env -qa search_term | nix-env -qa calibre | +| Install pkgs | nix-env -iA nixpkgs.pkg_name | nix-env -iA nixpkgs.sakura | +| Upgrade single pkg | nix-env -u pkg_name | nix-env -u librewolf | +| Upgrade All pkg | nix-env -u | nix-env -u | +| Uninstall pkg | nix-env -e pkg_name | nix-env -e sakura | +|-------------------------+----------------------------------------+----------------------------| + +Note: Installed binaries are stored in ~/.nix-profile/bin + + ## See also - https://nixos.org/guides/dev-environment.html \ No newline at end of file