Skip to main content

Command reference

Every command takes --dir <path> (override repo discovery) and most take --host <name> (default: $(hostname)). Run glix <command> -h for the authoritative flag list.

Bootstrap

glix init

Bootstrap a user-packages flake repo and seed a host.

glix init [--host=<name>] [--user=<name>] [--system=<tuple>]
[--dir=<path>] [--core=<flake-url>]
FlagDefaultNotes
--host$(hostname)Host subdirectory under hosts/
--user$USERPrimary user (Settings.primary_user)
--systemx86_64-linuxNix system tuple
--dir$XDG_CONFIG_HOME/glixosRepo root
--coregithub:donnismoore/glixosglixos repo flake URL

glix init is idempotent for new hosts. Running it again with a different --host on an existing repo adds that host without touching the existing one.

Mutation

glix add

glix add <ref-or-name> [--scope=system|home] [--user=<name>]
[--pin=<rev>] [--name=<override>]
[--apply] [--dry-run]
[--registry-url=<url>] [--refresh]
[--no-nix-registry]
FlagMeaning
--scopesystem (default from [settings] default_scope) or home
--userOnly for scope=home; defaults to Settings.primary_user
--pinLock to a revision via ?rev=<pin> (github/gitlab/sourcehut)
--nameOverride the inferred package name
--applyRun nixos-rebuild switch after staging
--dry-runPrint the planned change without writing
--registry-urlOverride the registry URL for this invocation
--refreshForce a refetch of the registry
--no-nix-registrySkip the nix registry list fallback

Resolution chain (ADR-004): URI passthrough → glixos registry → nix registry list → error with suggestions.

glix remove <name>

Removes the package from glix.toml and the flake.nix inputs region, relocks, and commits. Flags: --apply, --dry-run, --host, --dir.

glix enable <name> / glix disable <name>

Toggle the enabled flag. Disabled packages stay in the manifest but contribute nothing to the generated module list.

glix set <name> <key>=<value>...

Mutate one or more fields on an existing package. Multiple key=value pairs apply atomically.

Keys:

KeyEffect
flake=<uri>Replace the flake reference
scope=system|homeMove between scopes
enabled=true|falseSame as glix enable/disable
pin=<rev>Set the revision pin (empty value clears)
user=<name>For home-scope packages (empty value clears)
config.<key>=<val>Set a per-package config entry (empty value deletes the key)

Examples:

glix set greeting scope=home user=alice
glix set greeting config.message="Hello, world!"
glix set greeting config.message= # delete the key
glix set ferment pin=v1.2.3 enabled=true # multiple in one commit

glix update [<input>...]

Run nix flake update. With no args, updates every input. With named inputs, updates only those.

Recognised input names:

  • Any package name from the manifest.
  • nixpkgs, home-manager, glixos-core.

Flags: --apply, --host, --dir.

Inspection

glix list

glix list [--host=<name>] [--all] [--all-hosts]
FlagMeaning
--allInclude disabled packages
--all-hostsShow every host (adds a HOST column)

glix show <name>

Per-package detail: flake, scope, state, user (for home), pin, host, and the config table if non-empty.

glix info

Repo summary: root, git status and HEAD subject, per-host stats (system, primary_user, enabled/total package counts), and the resolved flake.lock inputs.

glix search <query>

Substring match against the cached registry. --refresh forces a refetch.

glix doctor

Read-only environment and repo health checks. Exits non-zero if any check is FAIL.

System

glix rebuild [action]

Wraps nixos-rebuild --flake .#<host> <action>. Actions: switch (default), boot, test, build, dry-build, dry-activate.

glix rollback

Revert the last manifest commit and relock. See Rollback for the full story (and the relationship with nixos-rebuild --rollback).

glix gc [-delete-old]

Wraps nix-collect-garbage. With -delete-old, passes -d to also remove old generations.

Meta

glix version

Prints the CLI version and the commit it was built from (e.g. glix 0.1.0-m7 (abc1234)). glix --version and glix -v are aliases. When glix is built outside Nix (go build directly) the commit field reads unknown.

glix help

Lists every command with a one-line summary. glix <cmd> -h shows flags for a specific command.