Rename the module evaluation function

This commit is contained in:
Manuel Thalmann 2024-06-22 23:11:21 +02:00
parent af05f04901
commit 1f1958d185

View file

@ -1,9 +1,9 @@
#!/bin/bash
function eval() {
function evalModule() {
local modulePath="$1";
local property="$2";
local nixPkgs='import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05") { config = {}; overlays = []; }';
nix eval --file "$modulePath" "${@:3}" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property";
}
eval $@;
evalModule $@;