Last active
June 6, 2019 19:45
-
-
Save jakkn/97a35d22af9ca81e3cc6733a8236b180 to your computer and use it in GitHub Desktop.
Getting started with nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################## | |
# Useful resources: | |
# | |
# https://nixos.org/nixos/options.html | |
# https://nixos.wiki/wiki/NixOS:extend_NixOS | |
# https://nixos.wiki/wiki/Cheatsheet | |
# | |
############################################## | |
#### NixOS #### | |
# Create VM with config | |
NIXOS_CONFIG=`pwd`/client.txt nixos-rebuild build-vm | |
# List installed packages | |
nixos-option environment.systemPackages # installed from /etc/nixos/configuration.nix | |
#### Nix Package Manager #### | |
# Search | |
nix search <package> # replaces nix-env -qa | |
# Install | |
nix-env -i <package> | |
# Remove | |
nix-env -e <package> | |
# Install package with unfree license | |
# edit ~/.config/nixpkgs/config.nix | |
# { allowUnfree = true; } | |
# Remember to reverse after | |
# List installed packages (https://functor.tokyo/blog/2018-02-20-show-packages-installed-on-nixos) | |
nix-env --query # everything installed with package manager (active user profile) | |
sudo nix-env --query # everything installed with package manager (root) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment