chaotic-cx/nyx

[Bug] Home module disables cache.nixos.org

Closed this issue · 2 comments

What happens?

Upon importing the home module, it creates the following at ~/.config/nix/nix.conf :

# WARNING: this file is generated from the nix.settings option in
# your Home Manager configuration at $XDG_CONFIG_HOME/nix/nix.conf.
# Do not edit it!
extra-substituters = https://nyx.chaotic.cx/
extra-trusted-public-keys = nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8= chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=
substituters = https://nyx.chaotic.cx/
trusted-public-keys = nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8= chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=

Which completely disables https://cache.nixos.org (despite it being configured system-wide at /etc/nix/nix.conf), as evidenced by nix show-config :

nix show-config | grep -i subst
builders-use-substitutes = false
max-substitution-jobs = 16
substitute = true
substituters = https://nyx.chaotic.cx/ # Where is https://cache.nixos.org ?

What is expected to happen?

The home module shouldn't override substituters.

If possible, please attach logs

No response

More information

No response

Sorry, I wasn't home.

It's problematic that extra-substituters and substituters have different behaviors in NixOS, Nix on other OSes, and Home-Manager.

I'm buried in the amount of stuff to do, so a PR would be nice, important to note that these use-cases should not break:

  • NixOS users
  • Home-Manager users
  • Ubuntu + Nix (like running nix develop in GitHub's CI)

Sorry for the late fix. In case this didn't work, please feel free to re-open this issue.