Troubleshooting
Arranged by what you noticed, not by what caused it.
“I removed it and it is still installed”
The most common one, and it is not a fault.
You removed it from the selection. If the package is also declared
somewhere in your own NixOS configuration, that declaration is untouched and
still installs it. See the boundary.
Check with:
grep -rn "the-package-name" ~/.config/nixos --include=*.nix
“My packages are not listed”
Same cause, different symptom. The Selection tab lists what nixarchy manages,
which on a machine that had a configuration before nixarchy is a small
fraction of what is installed. How it works explains why, and
why making the list longer would be worse.
“Nothing happened when I pressed the key”
Three likely reasons, in order:
- It was queued, not installed. Look at the footer. If it says 1 change
queued, it worked — press
a.
- The row was a
.settings row (≡). Those configure an app rather
than being one; the panel says so in the message line.
- A writer refused. The message line above the footer is where that
appears. It is easy to miss and it is the machine answering you.
“Everything says it is free”
The index is stale. A search index built before unfree and broken flags
existed carries none of them, so every package reads as free.
The footer says so, for example index built 14 days ago — r to rebuild —
nixpkgs and 4 more changed. Press r. It takes about 45 seconds. (An older
adapter says only index stale — r to rebuild.)
An absent flag is absent evidence, not a “no”.
“the search index is still stale”
r ran the rebuild and the index did not come out fresh. The message line
says why in one line, as `the search index is still stale: -- see
/index-errors.log`. `reindex` also returns the last lines of the
builder's output in `detail`, and `~/.cache/nixarchy/index-errors.log` holds
more; the log may be from an earlier run. To see the builder's own output,
run `nixarchy search` in a terminal.
## "`a` seems to hang"
It is probably waiting for a password on a machine with no polkit agent to
show the prompt, or for an answer to a question the panel cannot draw.
ESC leaves the log; the build keeps running. `SHIFT+A` is refused while
it runs (the footer says *an apply is running*), so wait for it to end.
Next time on this machine, use `SHIFT+A` instead of `a` from the start.
## "An earlier write was interrupted"
A write — a toggle, a package, an option, a draft or an input — was cut off
before it finished, and the next one says so:
> an earlier write was interrupted (…/apps.nix). To put back what was there
> before, run: …/nixarchy-pkg recover. If the files look right as they are,
> run: …/nixarchy-pkg recover --discard. Nothing was changed.
The panel also shows this message in the footer and in the bar's tooltip, and
refuses `a` and `SHIFT+A` until you run `recover` or `recover --discard`. The
message names the script's full path — it is the plugin's own script, not a
command on your `PATH`:
```bash
~/.config/omarchy/plugins/nixarchy.pkg/bin/nixarchy-pkg recover # put back what was there before
~/.config/omarchy/plugins/nixarchy.pkg/bin/nixarchy-pkg recover --discard # keep the files as they are
```
After recovering in a terminal, press `r` (or reopen the menu).
If the message is instead "another write or an apply is running -- try again
when it finishes", something else holds the lock. Wait for it and try again.
If the message is "something an interrupted write started is still running.
Try again when it has finished. Nothing was changed.", a process that the
interrupted write started is still alive. There is no fixed time limit: a Nix
call is stopped after about two minutes, but a writer, or something either of
them started, can run longer. Nothing needs killing unless it never ends; to
see what holds the lock:
```bash
fuser -v ~/.local/state/nixarchy/pkg-children.lock
```
If a write ends with "something this write started is still running, so
nothing was undone. Your backup is kept: run …/nixarchy-pkg recover when it
has finished.", a child outlived a write that failed, so nothing was undone.
Run `recover` once it has finished.
If it says "so the write was neither kept nor undone", the write itself
succeeded but a child was still running. Once it has finished, run
`recover --discard` to keep the change, or `recover` to put back what was
there before.
The backup is in `~/.local/state/nixarchy/pkg-recovery/open/` (or under
`XDG_STATE_HOME`). Each file has an `N.path` naming its live file, and an
`N.data` holding its earlier contents (or `N.absent` if it did not exist), for
restoring by hand.
## "I pressed ESCAPE during a build and it kept going"
Correct. `ESCAPE` stops you watching the log; it does not stop the build. See
[Applying changes](applying).
## "It refused an unfree package"
It did not, quite. The writer adds the package and then tells you whether
your machine's licence policy will let the rebuild use it. If `allowUnfree`
is off — which is unusual, and means somebody turned it off deliberately — it
also scaffolds a *commented* `allowUnfreePredicate` naming just that package,
for you to uncomment.
Read the message line. That scaffold is a licence-policy edit sitting in your
`apps.nix`, commented out, waiting for you.
## "Adding from the other channel wants two presses"
Yes. The channels share no store paths, so it brings an entire second
closure — `nixarchy doctor` measures vlc at 1.5 GB. The first press tells you
what it will cost; the second does it. See [Packages](packages#the-other-channel).
## "I want to see what it would do, without a panel"
```bash
nixarchy-pkg pending | jq
```
[From a terminal](from-a-terminal) has the rest.
## "queue unknown"
The footer says `queue unknown -- ` (and pressing `a` says `queue
unknown -- open the Queue tab and press r`) when `pending` failed or could not read a selection or
flake file (falling back to `could not read the queue` if the adapter gave no
error text). Press `r` on the Queue tab to read the queue again, or run:
```bash
nixarchy-pkg pending
```
## " was edited in the flake"
`nixarchy-apply` records the SHA-256 of each file it writes under
`~/.local/state/nixarchy/applied/`. When a destination file in the flake no
longer matches that record and your live file also differs from it, the Queue
tab shows a conflict row:
- ` was edited in the flake -- apply will keep a copy and overwrite it`
for `apps.nix`, `services.nix`, `advanced.nix` and `flatsnap.nix`
- ` was edited in the flake -- apply will stop` for a draft in
`packages/*.nix`
Press `RETURN` on the row to inspect the diff hunk before applying.
## "a file changed since you reviewed it"
When you arm `a` or `SHIFT+A`, the panel pins the SHA-256 of `apps.nix`,
`services.nix`, `advanced.nix` and `flatsnap.nix`. If one of those files
changes before `nixarchy-apply` copies it, the apply stops before copying or
building and reports:
> a file changed since you reviewed it -- nothing was copied or built; look at
> the queue again
Open the Queue tab, check what changed, and press `a` again.
With `SHIFT+A` the terminal shows `nixarchy-apply`'s own wording instead:
`apps.nix is not what you checked`, followed by the two hashes.
An empty part (one that did not exist when you armed) is checked too, but
only before copying: a file created in that moment can still be copied.
That gap is in `nixarchy-apply` and tracked in
[nixarchy#1789](https://github.com/olafkfreund/nixarchy/issues/1789).
## "superseded -- press c again"
Your selection changed while `c` (`nixarchy-pkg check`) was running, or after
it finished, so the check verdict no longer matches the files on disk. Press
`c` (or `SHIFT+C`) to check the new selection.
## "the check was interrupted"
A running check received a signal before it finished and
answered `the check was interrupted (exit )`. Its temporary directory
under `~/.local/state/nixarchy` was cleaned up; press `c` to run it again.
## "could not check: a write is in progress or was interrupted -- try again, or run recover"
`~/.local/state/nixarchy/pkg-recovery/open` exists, which means a write is
currently running or an earlier write was cut off. Wait a moment and press `c`
again, or run `recover` as shown in [An earlier write was interrupted](#an-earlier-write-was-interrupted).
## "could not check: the flake's nixarchy directory is a symlink -- the check will not write through it"
The flake host base directory, `nixarchy/`, or `nixarchy/packages/` is a
symbolic link. The check refuses to overlay files through a symlink into a
target outside its private copy; replace the symlink with a real directory in
the flake if you want `c` to evaluate it.
## "could not check: the check failed, but this flake reads its own git revision…"
A tracked `.nix` file in the flake references `self.rev`, `self.shortRev`,
`self.dirtyRev`, `self.dirtyShortRev`, `self.lastModified`, or
`self.lastModifiedDate`. Most flakes do, for
`system.configurationRevision`. `check` evaluates a copy, which has no git
revision, so a pass still counts but a failure might come from the missing
revision rather than your selection. Press `RETURN` on the row to read the
error; if it does not mention the revision, the failure is most likely real.
## "could not check: this flake has a relative path input; a copy would not resolve it"
`flake.lock` contains a `path` input whose path does not start with `/`. A
copy of the flake under `~/.local/state/nixarchy` would look for that relative
path in the wrong parent directory.
## "could not check: this flake has git submodules; the check does not copy them"
The flake's git index contains submodule entries (`160000`). `check` copies
only the flake's tracked files and does not check out or copy submodules.
## "could not check: could not copy the flake: …" / "git failed: …"
`git`, `tar` or `cp` failed while snapshotting the flake into
`~/.local/state/nixarchy` (for example, unreadable files or a full disk). The
first line of stderr follows the colon; press `RETURN` on the row to read it.
## "could not check: timed out after 15 minutes"
Evaluating the host configuration took longer than 900 seconds and was
stopped. A dry run that times out does not change the verdict: the check
still says `evaluates`, and the dry-run part reports the error instead.
## "options: "
The footer shows this when the last read of your flake's options failed, and
the list falls back to the one it had before (or to the system manual). The
words after the colon are Nix's first line of error. Common ones:
- `no flake at …`: `NIXARCHY_FLAKE` (default `/etc/nixos`) has no `flake.nix`.
- `this flake has no nixosConfigurations.`: the flake does not define
this machine's host name.
- `timed out after 5 minutes`: evaluating took too long; the previous list
stays. Another read starts after the next apply or `r`.
- `options are already being read`: another read is running; wait for it.
Fix the cause and press `r`, or apply once.
## Still wrong
`nixarchy doctor` checks the machine rather than the panel, and is the right
next step for anything that smells like configuration rather than interface.
If it is the panel, the source is small and commented:
[github.com/olafkfreund/nixarchy-pkg](https://github.com/olafkfreund/nixarchy-pkg).