diff --git a/src/nix/hive/eval.nix b/src/nix/hive/eval.nix index 30a57e8..8e17b48 100644 --- a/src/nix/hive/eval.nix +++ b/src/nix/hive/eval.nix @@ -428,6 +428,8 @@ let system.activationScripts.colmena-chown-keys = lib.mkIf (length commands != 0) script; }; in evalConfig { + inherit (npkgs) system; + modules = [ assertionModule nixpkgsModule diff --git a/src/nix/hive/tests/mod.rs b/src/nix/hive/tests/mod.rs index e4c7d62..773c94b 100644 --- a/src/nix/hive/tests/mod.rs +++ b/src/nix/hive/tests/mod.rs @@ -267,6 +267,22 @@ fn test_eval_non_existent_pkg() { // Nixpkgs config tests +#[test] +fn test_nixpkgs_system() { + TempHive::valid(r#" + { + meta = { + nixpkgs = import { + system = "armv5tel-linux"; + }; + }; + test = { pkgs, ... }: { + boot.isContainer = assert pkgs.system == "armv5tel-linux"; true; + }; + } + "#); +} + #[test] fn test_nixpkgs_overlay_meta_nixpkgs() { // Only set overlays in meta.nixpkgs