forked from DGNum/colmena
eval.nix: Inherit pkgs.system in evalConfig
This commit is contained in:
parent
bd4493da73
commit
8f77184d58
2 changed files with 18 additions and 0 deletions
|
@ -428,6 +428,8 @@ let
|
||||||
system.activationScripts.colmena-chown-keys = lib.mkIf (length commands != 0) script;
|
system.activationScripts.colmena-chown-keys = lib.mkIf (length commands != 0) script;
|
||||||
};
|
};
|
||||||
in evalConfig {
|
in evalConfig {
|
||||||
|
inherit (npkgs) system;
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
assertionModule
|
assertionModule
|
||||||
nixpkgsModule
|
nixpkgsModule
|
||||||
|
|
|
@ -267,6 +267,22 @@ fn test_eval_non_existent_pkg() {
|
||||||
|
|
||||||
// Nixpkgs config tests
|
// Nixpkgs config tests
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_nixpkgs_system() {
|
||||||
|
TempHive::valid(r#"
|
||||||
|
{
|
||||||
|
meta = {
|
||||||
|
nixpkgs = import <nixpkgs> {
|
||||||
|
system = "armv5tel-linux";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
test = { pkgs, ... }: {
|
||||||
|
boot.isContainer = assert pkgs.system == "armv5tel-linux"; true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
"#);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_nixpkgs_overlay_meta_nixpkgs() {
|
fn test_nixpkgs_overlay_meta_nixpkgs() {
|
||||||
// Only set overlays in meta.nixpkgs
|
// Only set overlays in meta.nixpkgs
|
||||||
|
|
Loading…
Reference in a new issue