Ihar Hancharenka 5dff80e88e first
2023-03-27 16:52:17 +03:00

57 строки
1.9 KiB
Plaintext

nix-env
--dry-run
-v, --verbose
-u|--upgrade [*]
upgrade (all packages if argument is not specified or just specified package[s])
https://nixos.org/manual/nix/stable/#operation-upgrade
# nix-channel --update nixpkgs
--dry-run
dry run
-i|--install args...
!!!
https://nixos.wiki/wiki/FAQ#Why_not_use_nix-env_-i_hello.3F
-f <some-stuff.nix> -E <specific-nix-expr>
-f https://github.com/NixOS/nixpkgs-channels/archive/nixos-14.12.tar.gz -iA firefox
A|--attr
install attribute [nixpgks.<name>]
... Alternatively, like for nix-build, one can use [-A] to specify an attribute name instead of a derivation name:
$ nix-env -f '<mypkgs>' -i -A graphviz
-e|--uninstall drvnames...
https://nixos.org/manual/nix/stable/#operation-uninstall
-e '*'
for uninstall everyting from the user environment
--list-generations
-G, --switch-generation <num>
https://nixos.org/manual/nix/stable/#operation-switch-generation
--delete-generations generations...
https://nixos.org/manual/nix/stable/#operation-delete-generations
--rollback
https://nixos.org/manual/nix/stable/#operation-rollback
-q|--query [--installed]
list installed derivations
-qa [package]
search for a package on a channel
-qaf /path/to/nixpkgs
... at the custom path
-qas
status of available packages
I - installed in your current user env
P - present on your system
S - substitute for the package (prebuilt package)
https://cache.nixos.org - cache of binary packages
-qaP ...
nixos.<bla-bla> -> pkgs.<bla-bla> at configuration.nix
????
? list stuff
-f <dir>
In order to specify an alternative to ~/.nix-defexpr it's possible to use the [-f] option: