Troubleshooting - hxrmonlka/alice GitHub Wiki

Troubleshooting

Help and fix Alice's weak spots. Each item has a symptom, a cause and a fix.

Nix does not see my new file

  • Cause: a flake only reads files that git tracks.
  • Fix: stage the file before you build.
user $ git add -N path/to/new-file.nix
user $ nh os switch

git add . also works. Use git add -N when you also want git diff to show the new file.

The module name does not exist

  • Symptom: an error that says an attribute is missing, such as nixosModules.hardwareAmd.
  • Cause: the comments at the top of drivers/amd.nix, drivers/nvidia.nix and drivers/framework/default.nix show inputs.self.nixosModules.*. That path is old.
  • Fix: use the real names.
Module Name
AMD self.custom.hardwareModules.hardwareAmd
Intel self.custom.hardwareModules.hardwareIntel
Nvidia self.custom.hardwareModules.hardwareNvidia
Vulkan self.custom.hardwareModules.vulkan
Framework self.nixosModules.hardwareFramework

A module in _systems has no effect

  • Cause: import-tree ignores paths that contain /_. Alice does not load modules/_systems.
  • Fix: rename the directory without the underscore. Then run nix flake show to check that the flake still evaluates.

Two files define the same module name

  • Symptom: an evaluation error about the same option defined two times.
  • Cause: import-tree loads every .nix file under modules. Two files that write the same key, for example flake.custom.alice.yazi, collide.
  • Fix: keep one definition for each key. Search for the name with grep -rn "alice.yazi" modules.

An option assertion stops the build

Some options need others. The module prints a message when you break a rule.

Module Rule
Intel openclNeo needs generation = "xe".
Intel openclLegacy and hybridCodec need generation = "legacy".
Nvidia prime.enable needs prime.intelBusId or prime.amdBusId.
Vulkan defaultDriver = "amdvlk" needs amd.amdvlk = true.
Vulkan defaultDriver = "nvk" needs nvidia.nvk = true.
Framework model = "16-amd-ai300-nvidia" needs nvidia.nvidiaBusId and nvidia.amdBusId.

An unfree package is refused

  • Cause: commonModules.nixSettings sets nixpkgs.config.allowUnfree = false. The Nvidia module only sets it as a default, so false wins.
  • Fix: override it in the host, as Serpentine and Tanuki do:
nixpkgs.config.allowUnfree = lib.mkForce true;

Paths with /home/alice fail for another user

  • Cause: some files are hardcoded to /home/alice.
  • Fix: see the list of files in Installation.

nh os switch cannot find the flake

  • Cause: Serpentine sets programs.nh.flake = "/home/alice/alice".
  • Fix: clone Alice to that path, or change the path in modules/hosts/serpentine/settings/programs.nix. You can also pass the path: nh os switch /path/to/alice.

Lumina changes do not reach Alice

  • Cause: flake.lock pins Lumina to a commit.
  • Fix: update the pin, then rebuild.
user $ nix flake update lumina
user $ nh os switch

The pre-commit hook fails

  • Symptom: error: source file not found: ~/.config/niri/noctalia.kdl.
  • Cause: scripts/install-git-hooks.sh set core.hooksPath to .githooks. The hook copies the Noctalia Niri file. Your machine does not have it.
  • Fix: unset the hook path.
user $ git config --unset core.hooksPath

The VM test does not start

  • Run nix develop first. build-vm exists only inside this shell.
  • Run build-vm in the root of the repository. It uses .#nixosConfigurations.<host>.
⚠️ **GitHub.com Fallback** ⚠️