vix – a thin wrapper for interacting with the Nix CLI ecosystem.
vix [global-options] [<command>] [command-options] [arguments ...]vix accepts the following options:
--help display usage information and exit
--version display version and exit
-v, --verbose verbosity [default: 0]vix provides the following sub commands:
install, i add a package into a profile
uninstall, u remove packages from a profile
upgrade, up upgrade packages using their most recent flake
list, l list the installed packages
rollback, a roll back to a previous version of a profile
history, h show all versions of a profile
wipe-history, wh delete non-current versions of a profile
flake, f flake commands
develop, d run a dev shell
make run `make' inside a dev shell
command, exec execute a command inside a dev shell
rebuild, rb rebuild the system configuration from a flake
search search for packages
find, / search for packages in the `nixpkgs' flake
run run a Nix application
repl start an interactive environment for evaluating Nix expressions
registry, r manipulate the Nix registry
store, o manipulate the Nix store
eval, e evaluate a Nix expression
shell, sh run a shell in which the specified packages are available
build build a derivation or fetch a store path
bundle bundle an application so that it works outside of the Nix store
copy start an interactive environment for evaluating Nix expressions
edit open the Nix expression of a Nix package in $EDITOR
daemon daemon to perform store operations on behalf of non-root clients
config, conf manage the Nix settings
hash compute and convert cryptographic hashes
key generate and convert Nix signing keys
nar create or inspect nar files
fmt, format reformat your code in the standard style
path-info query information about store paths
derivation, drv work with derivations
why-depends, wd show why a package has another package in its closure
print-dev-env, pde print shell code of derivation
realisation manipulate a Nix realisation
upgrade-nix, un upgrade Nix to the latest stable version
collect-garbage, g run the garbage collector
zsh-completions, zsh generate the Zsh completion script
print-doc, doc, pd print the documentationvix install – add a package into a profile
vix install <package>...vix install accepts the following options:
--help display usage information and exit
--version display version and exitInstall a package from Nixpkgs:
vix i n#helloInstall a package from a specific Nixpkgs revision:
vix i nixpkgs/d734#hellovix uninstall – remove packages from a profile
vix uninstall <package>...vix uninstall accepts the following options:
--help display usage information and exit
--version display version and exitUninstall a package by name:
vix u helloRemove all packages:
vix u -- --allvix upgrade – upgrade packages using their most recent flake
vix upgrade <package>...vix upgrade accepts the following options:
--help display usage information and exit
--version display version and exitUpgrade a specific package by name:
vix up hellovix list – list the installed packages
vix list vix list accepts the following options:
--help display usage information and exit
--version display version and exitList packages installed in the default profile:
vix lvix rollback – roll back to a previous version of a profile
vix rollback vix rollback accepts the following options:
--help display usage information and exit
--version display version and exitRoll back your default profile to the previous version:
vix bRoll back your default profile to version 500:
vix b -- --to 500vix history – show all versions of a profile
vix history vix history accepts the following options:
--help display usage information and exit
--version display version and exitShow the changes between each version of your default profile:
vix hvix wipe-history – delete non-current versions of a profile
vix wipe-history vix wipe-history accepts the following options:
--help display usage information and exit
--version display version and exitDelete all versions of the default profile older than 30 days:
vix wh -- --profile /tmp/profile --older-than 30dvix flake – flake commands
vix flake <command>vix flake accepts the following options:
--help display usage information and exit
--version display version and exitvix flake provides the following sub commands:
init, i create a flake in the current directory
metadata, m show flake metadata
show, s show the outputs provided by a flake
update, u update flake lock file
new, n create a flake in the specified directory from a template
clone, c clone flake repository
check, k check whether the flake evaluates and run its tests
archive, a copy a flake and all its inputs to a store
prefetch, p download the flake source tree into the Nix storevix flake init – create a flake in the current directory
vix flake init vix flake init accepts the following options:
--help display usage information and exit
--version display version and exitCreate a flake using the default template:
vix f ivix flake metadata – show flake metadata
vix flake metadata vix flake metadata accepts the following options:
--help display usage information and exit
--version display version and exitShow flake metadata:
vix f mvix flake show – show the outputs provided by a flake
vix flake show vix flake show accepts the following options:
--help display usage information and exit
--version display version and exitShow the output attributes provided by the CWD flake:
vix f sList available templates:
vix f s templatesvix flake update – update flake lock file
vix flake update vix flake update accepts the following options:
--help display usage information and exit
--version display version and exitUpdate all inputs:
vix f uvix flake new – create a flake in the specified directory from a
template
vix flake new <directory>vix flake new accepts the following options:
--help display usage information and exit
--version display version and exitCreate a flake in the directory `hello’:
vix f n helloCreate a flake in the directory =hello’ using the template=haskell-hello’:
vix f n hello -t templates#haskell-hellovix flake clone – clone flake repository
vix flake clone <flake>vix flake clone accepts the following options:
--help display usage information and exit
--version display version and exitCheck out the source code of the dwarffs flake:
vix f c dwarffs -- --dest dwarffsvix flake check – check whether the flake evaluates and run its tests
vix flake check vix flake check accepts the following options:
--help display usage information and exit
--version display version and exitEvaluate the flake in the current directory, and build its checks:
vix f kvix flake archive – copy a flake and all its inputs to a store
vix flake archive vix flake archive accepts the following options:
--help display usage information and exit
--version display version and exitFetch the dwarffs flake to the local Nix store:
vix f a dwarffsvix flake prefetch – download the flake source tree into the Nix
store
vix flake prefetch vix flake prefetch accepts the following options:
--help display usage information and exit
--version display version and exitDownload the dwarffs flake:
vix f p dwarffsvix develop – run a dev shell
vix develop [<argument>...|<option>...]vix develop accepts the following options:
--help display usage information and exit
--version display version and exitRun a dev shell:
vix dRun a dev shell and run `htop’ inside:
vix d -- -c htopvix make – run `make’ inside a dev shell
vix make [<argument>...|<option>...]vix make accepts the following options:
--help display usage information and exit
--version display version and exitRun `make’ inside a dev shell:
vix makevix command – execute a command inside a dev shell
vix command command...vix command accepts the following options:
--help display usage information and exit
--version display version and exitRun `ncdu’ inside a dev shell:
vix exec ncduvix rebuild – rebuild the system configuration from a flake
vix rebuild [-f <flake>] [-s] [-u]vix rebuild accepts the following options:
--help display usage information and exit
--version display version and exit
-f, --flake <VALUE> specify flake to use [default: /Users/ebzzry/etc/nix/]
-s, --switch switch to profile after rebuild [default: TRUE]
-u, --upgrade upgrade to latest version [default: FALSE]Rebuild the system from the flake specified in `~/src/system/’:
vix rb -f ~/src/system -sRebuild the system from the default flake and switch to it:
vix rb -svix search – search for packages
vix search [-n|<flake>] <package>...vix search accepts the following options:
--help display usage information and exit
--version display version and exitSearch in =nixpkgs’ flake for packages named=firefox’:
vix search nixpkgs firefoxvix find – search for packages in the `nixpkgs’ flake
vix find <package>...vix find accepts the following options:
--help display usage information and exit
--version display version and exitSearch in =nixpkgs’ flake for packages named=firefox’:
vix / firefoxvix run – run a Nix application
vix run [<argument>...|<option>...]vix run accepts the following options:
--help display usage information and exit
--version display version and exitRun =vim’ from the=nixpkgs’ flake:
vix run n#vimvix repl – start an interactive environment for evaluating Nix
expressions
vix repl [<argument>...|<option>...]vix repl accepts the following options:
--help display usage information and exit
--version display version and exitEvaluate some simple Nix expressions:
vix replvix registry – manipulate the Nix registry
vix registry <command>vix registry accepts the following options:
--help display usage information and exit
--version display version and exitvix registry provides the following sub commands:
list, l list available Nix flakes
add create a flake in the current directory
remove, r remove flake from user flake registry
pin, p pin a flake to its current versionvix registry list – list available Nix flakes
vix registry list vix registry list accepts the following options:
--help display usage information and exit
--version display version and exitShow the contents of all registries:
vix r lvix registry add – create a flake in the current directory
vix registry add <flake> <location>vix registry add accepts the following options:
--help display usage information and exit
--version display version and exitSet the `nixpkgs’ flake identifier to a specific branch of Nixpkgs:
vix r a nixpkgs github:NixOS/nixpkgs/nixos-20.03vix registry remove – remove flake from user flake registry
vix registry remove <flake>vix registry remove accepts the following options:
--help display usage information and exit
--version display version and exitRemove the `nixpkgs’ flake from the registry:
vix r r nixpkgsvix registry pin – pin a flake to its current version
vix registry pin <flake>vix registry pin accepts the following options:
--help display usage information and exit
--version display version and exitPin the `nixpkgs’ flake to its most recent revision:
vix r p nixpkgsvix store – manipulate the Nix store
vix store <command>vix store accepts the following options:
--help display usage information and exit
--version display version and exitvix store provides the following sub commands:
add, a add a file or directory to the Nix store
cat, c print the contents of a file in the Nix store on stdout
copy-log, cl copy build logs between Nix stores
copy-sigs, cs copy store path signatures from substituters
delete, d delete paths from the Nix store
diff-closures, dc show what packages and versions were added and removed
dump-path, dp serialise a store path to stdout in NAR format
gc perform garbage collection on a Nix store
info, i test whether a store can be accessed
ls, l show information about a path in the Nix store
make-content-addressed, mka rewrite a path or closure to content-addressed form
optimise, o replace identical files in the store by hard links
path-from-hash-part get a store path from its hash part
prefetch-file, f download a file into the Nix store
repair, r repair store paths
sign sign store paths with a local key
verify verify the integrity of store pathsvix store add – add a file or directory to the Nix store
vix store add <location>vix store add accepts the following options:
--help display usage information and exit
--version display version and exitAdd a directory to the store:
vix o a ./dirvix store cat – print the contents of a file in the Nix store on
stdout
vix store cat <location>vix store cat accepts the following options:
--help display usage information and exit
--version display version and exitShow the contents of a file in a binary cache:
vix o c --store https://cache.nixos.org/ /nix/store/0i2jd68mp5g6h2sa5k9c85rb80sn8hi9-hello-2.10/bin/hellovix store copy-log – copy build logs between Nix stores
vix store copy-log <location>vix store copy-log accepts the following options:
--help display usage information and exit
--version display version and exitCopy build logs between Nix stores:
vix o cl --from https://cache.nixos.org --eval-store auto n#hellovix store copy-sigs – copy store path signatures from substituters
vix store copy-sigs vix store copy-sigs accepts the following options:
--help display usage information and exit
--version display version and exitCopy sigs:
vix o csvix store delete – delete paths from the Nix store
vix store delete <path>...vix store delete accepts the following options:
--help display usage information and exit
--version display version and exitDelete a specific store path:
vix o d /nix/store/yb5q57zxv6hgqql42d5r8b5k5mcq6kay-hello-2.10vix store diff-closures – show what packages and versions were added
and removed
vix store diff-closures <path>...vix store diff-closures accepts the following options:
--help display usage information and exit
--version display version and exitShow what got added and removed between two versions of the NixOS system profile:
vix o dc /nix/var/nix/profiles/system-655-link /nix/var/nix/profiles/system-658-linkvix store dump-path – serialise a store path to stdout in NAR format
vix store dump-path <path>vix store dump-path accepts the following options:
--help display usage information and exit
--version display version and exitTo get a NAR from the binary cache https://cache.nixos.org/:
vix o dp -- --store https://cache.nixos.org/ /nix/store/7crrmih8c52r8fbnqb933dxrsp44md93-glibc-2.25 > glibc.narvix store gc – perform garbage collection on a Nix store
vix store gc vix store gc accepts the following options:
--help display usage information and exit
--version display version and exitDelete unreachable paths in the Nix store:
vix o gcvix store info – test whether a store can be accessed
vix store info <path>vix store info accepts the following options:
--help display usage information and exit
--version display version and exitTest whether connecting to a remote Nix store via SSH works:
vix o i -- --store ssh://mac1vix store ls – show information about a path in the Nix store
vix store ls <path>vix store ls accepts the following options:
--help display usage information and exit
--version display version and exitTo list the contents of a store path in a binary cache:
vix o l -- --store https://cache.nixos.org/ --long --recursive /nix/store/0i2jd68mp5g6h2sa5k9c85rb80sn8hi9-hello-2.10vix store make-content-addressed – rewrite a path or closure to
content-addressed form
vix store make-content-addressed <path>vix store make-content-addressed accepts the following options:
--help display usage information and exit
--version display version and exitCreate a content-addressed representation of the closure of `hello’:
vix o mka n#hellovix store optimise – replace identical files in the store by hard
links
vix store optimise vix store optimise accepts the following options:
--help display usage information and exit
--version display version and exitOptimise the Nix store:
vix o ovix store path-from-hash-part – get a store path from its hash part
vix store path-from-hash-part <path>vix store path-from-hash-part accepts the following options:
--help display usage information and exit
--version display version and exitReturn the full store path with the given hash part:
vix o h --store https://cache.nixos.org/ 0i2jd68mp5g6h2sa5k9c85rb80sn8hi9vix store prefetch-file – download a file into the Nix store
vix store prefetch-file <loca>tionvix store prefetch-file accepts the following options:
--help display usage information and exit
--version display version and exitDownload a file to the Nix store:
vix o f https://releases.nixos.org/nix/nix-2.3.10/nix-2.3.10.tar.xzvix store repair – repair store paths
vix store repair <path>vix store repair accepts the following options:
--help display usage information and exit
--version display version and exitRepair a store path, after determining that it is corrupt:
vix o r /nix/store/yb5q57zxv6hgqql42d5r8b5k5mcq6kay-hello-2.10vix store sign – sign store paths with a local key
vix store sign vix store sign accepts the following options:
--help display usage information and exit
--version display version and exitSign store:
vix o signvix store verify – verify the integrity of store paths
vix store verify vix store verify accepts the following options:
--help display usage information and exit
--version display version and exitVerify the entire Nix store:
vix o verify -- --allvix eval – evaluate a Nix expression
vix eval [<argument>...|<option>...]vix eval accepts the following options:
--help display usage information and exit
--version display version and exitEvaluate a Nix expression given on the command line:
vix e -- --expr '1 + 2'Print the store path of the `hello’ package:
vix e -- --raw n#hellovix shell – run a shell in which the specified packages are available
vix shell [<argument>...|<option>...]vix shell accepts the following options:
--help display usage information and exit
--version display version and exitStart a shell providing =yt-dlp’ from the=nixpkgs’ flake:
vix sh n#yt-dlpvix build – build a derivation or fetch a store path
vix build [<argument>...|<option>...]vix build accepts the following options:
--help display usage information and exit
--version display version and exitBuild the default package from the flake in the current directory:
vix buildBuild =hello’ and=cowsay’ from `nixpkgs’ flake, leaving two result symlinks:
vix build n#hello n#cowsayvix bundle – bundle an application so that it works outside of the
Nix store
vix bundle [<argument>...|<option>...]vix bundle accepts the following options:
--help display usage information and exit
--version display version and exitBundle `hello’:
vix bundle n#vimvix copy – start an interactive environment for evaluating Nix
expressions
vix copy [<argument>...|<option>...]vix copy accepts the following options:
--help display usage information and exit
--version display version and exitCopy all store paths from a local binary cache:
vix copy -- --all --from file:///tmp/cachevix edit – open the Nix expression of a Nix package in $EDITOR
vix edit [<argument>...|<option>...]vix edit accepts the following options:
--help display usage information and exit
--version display version and exitOpen the Nix expression of the `hello’ package:
vix edit n#hellovix daemon – daemon to perform store operations on behalf of non-root
clients
vix daemon [<argument>...|<option>...]vix daemon accepts the following options:
--help display usage information and exit
--version display version and exitRun the daemon:
vix daemonRun the daemon and force all connections to be trusted:
vix daemon -- --force-trustedvix config – manage the Nix settings
vix config <command>vix config accepts the following options:
--help display usage information and exit
--version display version and exitvix config provides the following sub commands:
show show the Nix configuration or the value of a specific setting
check check your system for potential problemsvix config show – show the Nix configuration or the value of a
specific setting
vix config show vix config show accepts the following options:
--help display usage information and exit
--version display version and exitShow configuration:
vix conf showvix config check – check your system for potential problems
vix config check vix config check accepts the following options:
--help display usage information and exit
--version display version and exitCheck for problems:
vix conf kvix hash – compute and convert cryptographic hashes
vix hash <command>vix hash accepts the following options:
--help display usage information and exit
--version display version and exitvix hash provides the following sub commands:
file, f print hash of a regular file
path, p print hash of the NAR serialisation of a path
convert, c convert between hash formatsvix hash file – print hash of a regular file
vix hash file <file>vix hash file accepts the following options:
--help display usage information and exit
--version display version and exitPrint hash of `file.txt’:
vix hash f file.txtvix hash path – print hash of the NAR serialisation of a path
vix hash path <path>vix hash path accepts the following options:
--help display usage information and exit
--version display version and exitPrint hash of path `/foo/bar/’:
vix hash p /foo/bar/vix hash convert – convert between hash formats
vix hash convert <path>vix hash convert accepts the following options:
--help display usage information and exit
--version display version and exitConvert a hash:
vix hash c -- --hash-algo sha1 800d59cfcd3c05e900cb4e214be48f6b886a08dfvix key – generate and convert Nix signing keys
vix key <command>vix key accepts the following options:
--help display usage information and exit
--version display version and exitvix key provides the following sub commands:
convert, con generate a public key for verifying store paths
generate, gen generate a secret key for signing store pathsvix key convert – generate a public key for verifying store paths
vix key convert <key>vix key convert accepts the following options:
--help display usage information and exit
--version display version and exitConvert a secret key to a public key:
vix key con foovix key generate – generate a secret key for signing store paths
vix key generate vix key generate accepts the following options:
--help display usage information and exit
--version display version and exitGenerate a new secret key:
vix key gen -- --key-name cache.example.org-1 > ./secret-keyvix nar – create or inspect nar files
vix nar <command>vix nar accepts the following options:
--help display usage information and exit
--version display version and exitvix nar provides the following sub commands:
cat, c print the contents of a file inside a NAR file on stdout
dump-path, d serialise a path to stdout in NAR format
ls, l show information about a path inside a NAR filevix nar cat – print the contents of a file inside a NAR file on
stdout
vix nar cat <file>vix nar cat accepts the following options:
--help display usage information and exit
--version display version and exitTo display a file in a NAR file:
vix nar c ./hello.nar /share/man/man1/hello.1.gz | gunzipvix nar dump-path – serialise a path to stdout in NAR format
vix nar dump-path <path>vix nar dump-path accepts the following options:
--help display usage information and exit
--version display version and exitTo serialise directory `foo’ as a NAR file:
vix nar d ./foo > foo.narvix nar ls – show information about a path inside a NAR file
vix nar ls <path>vix nar ls accepts the following options:
--help display usage information and exit
--version display version and exitTo list a specific file in a NAR file:
vix nar l -- --long ./hello.nar /bin/hellovix fmt – reformat your code in the standard style
vix fmt [<argument>...|<option>...]vix fmt accepts the following options:
--help display usage information and exit
--version display version and exitFormat the current flake:
vix fmtvix path-info – query information about store paths
vix path-info [<argument>...|<option>...]vix path-info accepts the following options:
--help display usage information and exit
--version display version and exitPrint the store path produced by n#hello:
vix pi n#hellovix derivation – work with derivations
vix derivation <command>vix derivation accepts the following options:
--help display usage information and exit
--version display version and exitvix derivation provides the following sub commands:
add add a store derivation
show show the contents of a store derivationvix derivation add – add a store derivation
vix derivation add <path>vix derivation add accepts the following options:
--help display usage information and exit
--version display version and exitAdd a derivation:
vix drv dadd pathvix derivation show – show the contents of a store derivation
vix derivation show <derivation>vix derivation show accepts the following options:
--help display usage information and exit
--version display version and exitShow the `hello’ derivation:
vix drv dshow n#hellovix why-depends – show why a package has another package in its
closure
vix why-depends [<argument>...|<option>...]vix why-depends accepts the following options:
--help display usage information and exit
--version display version and exitShow one path through the dependency graph leading from =hello’ to=glibc’:
vix wd n#hello n#glibcvix print-dev-env – print shell code of derivation
vix print-dev-env [<argument>...|<option>...]vix print-dev-env accepts the following options:
--help display usage information and exit
--version display version and exitGet the build environment of `hello’:
vix print-dev-env n#hellovix realisation – manipulate a Nix realisation
vix realisation [<argument>...|<option>...]vix realisation accepts the following options:
--help display usage information and exit
--version display version and exitShow some information about the realisation of the package `hello’:
vix realisation n#hellovix upgrade-nix – upgrade Nix to the latest stable version
vix upgrade-nix vix upgrade-nix accepts the following options:
--help display usage information and exit
--version display version and exitUpgrade Nix to the stable version declared in `nixpkgs’ flake:
vix upgrade-nixvix collect-garbage – run the garbage collector
vix collect-garbage [<argument>...|<option>...]vix collect-garbage accepts the following options:
--help display usage information and exit
--version display version and exitGarbage collect:
vix gGargage collect and delete old versions:
vix g -- -dvix zsh-completions – generate the Zsh completion script
vix zsh-completions vix zsh-completions accepts the following options:
--help display usage information and exit
--version display version and exitGenerate the Zsh completions of Vix and enable them:
vix zsh-completions > ~/.zsh-completions/_vix
cat >>! ~/.zshenv << EOF
fpath=(~/.zsh-completions $fpath)
autoload -U compinit
compinit
EOFvix print-doc – print the documentation
vix print-doc vix print-doc accepts the following options:
--help display usage information and exit
--version display version and exitGenerate the Markdown documentation of Vix and save it to README.md:
vix print-doc > README.md