Current nixpkgs deferred nixpkgs.config breaks generated NixOS hosts
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Área
- build-system
Línea de trabajo
Start with flake.nix and the mkFlake channel configuration, then reproduce the failure with the provided nix eval command. Check the pinned flake-utils-plus host wrapper and upstream issue #162; done means Snowfall evaluates the affected NixOS hosts without the deferred nixpkgs.config assertion after an upstream update or compatibility patch.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Current nixpkgs breaks Snowfall-generated NixOS configurations because Snowfall still pins a flake-utils-plus host wrapper whose nixpkgs.config detection is incompatible with the option's current deferred-module semantics.
This is related to, but distinct from, #24 and #73. Those reports involved user modules explicitly setting nixpkgs.config. In this case the failure occurs on a host that has no host-level nixpkgs.config definition.
Versions
- Snowfall Lib:
6ee3542cb459ca4b038cfe50ceb8797f05cdabad(currentmainwhen reproduced) - Snowfall's pinned flake-utils-plus:
3542fe9126dc492e53ddd252bb0260fe035f2c0f - nixpkgs:
f13ff45afd1bb73e640eaa08a7066dbed07e3238fromnixos-unstable
Reproduction
A normal Snowfall configuration with channel configuration is sufficient:
lib.mkFlake {
channels-config.allowUnfree = true;
# regular discovered systems/modules
}
Then evaluate a discovered NixOS host which does not define nixpkgs.config itself:
$ nix eval '.#nixosConfigurations.ceres.config.system.build.toplevel.drvPath'
error:
Failed assertions:
- Your system configures nixpkgs with an externally created instance.
`nixpkgs.config` options should be passed when creating the instance instead.
Defined in:
- .../flake.nix
Cause
Snowfall maps channels-config to flake-utils-plus' channelsConfig, which is correct. The problem is in the pinned flake-utils-plus host builder.
It pre-evaluates the host and tests:
hostConfig.nixpkgs.config == { }
Current nixpkgs declares nixpkgs.config as a deferredModuleWith option and applies it as:
apply = _: finalPkgs.config;
Therefore reading hostConfig.nixpkgs.config returns the fully applied pkgs.config, not the raw module definitions. The empty-config check is no longer valid and the wrapper takes its re-import path even when the host did not configure the option.
The wrapper then defines both:
nixpkgs.pkgs = ...;
nixpkgs.config = lib.mkForce { };
Current nixpkgs rejects any non-default definition of nixpkgs.config when nixpkgs.pkgs is externally supplied, including an explicitly forced empty value.
Tested workaround / fix direction
I tested overriding Snowfall's transitive flake-utils-plus input with a compatibility version that:
- Keeps the raw channel configuration and overlay list when importing each channel.
- Stops pre-evaluating and reading the applied
hostConfig.nixpkgs.configvalue. - Does not define external
nixpkgs.pkgsfor NixOS hosts. - Supplies the raw channel config and overlays as ordinary
nixpkgs.configandnixpkgs.overlaysmodule definitions, allowing NixOS to construct the package set.
With that change, three active hosts evaluate, including one with a host-specific permittedInsecurePackages value. Home Manager still uses global packages and the configured overlays remain active.
Simply overriding to flake-utils-plus v1.6.0 did not help because the relevant host wrapper is still present there.
Would you be open to updating the transitive dependency once flake-utils-plus fixes this, or carrying a compatibility patch in Snowfall in the meantime?
Related upstream issues: gytis-ivaskevicius/flake-utils-plus#136 and gytis-ivaskevicius/flake-utils-plus#142.
Tracking
The corresponding flake-utils-plus report is gytis-ivaskevicius/flake-utils-plus#162. The underlying wrapper fix belongs there; this issue tracks updating or patching Snowfall's transitive dependency.
- Lenguaje dominante
- Nix
- Estrellas
- 627
- Forks
- 66
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de snowfallorg/lib
-
Documentation: `/homes/${system}/${user}` vs `/homes/${system}/${user}@${host}` capabilitiesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
snowfallorg/lib#159 · 3 reacciones ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
snowfallorg/lib#190 · 1 comentario ·
-
`_modules.args` is not respectedAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
snowfallorg/lib#188 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
snowfallorg/lib#186 ·
-
nixos-generators is deprecatedAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
snowfallorg/lib#185 · 5 comentarios ·
Todos los issues de snowfallorg/lib
Issues similares
-
AssignTargetPath does not recognize forward slashes in relative path specifiersPosiblemente ocupada @AustinAviv la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 2 días
-
devtools: new version 1.5.3Abiertoout-of-date
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
CachyOS/CachyOS-PKGBUILDS#1981 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Dev image build fails: `npm install` in the root Dockerfile runs out of memory (exit 134)Posiblemente ocupada @andest01 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
100 points complexity:trivial drips-wave enhancement good first issue trivial
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
sorotrail/SoroBeacon#438 ·
Los mantenedores suelen responder en 1 día
-
area: backend bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
snapotter-hq/SnapOtter#2415 ·
Los mantenedores suelen responder en 1 día