Rename the module evaluation function
This commit is contained in:
parent
d84e2a4740
commit
60497bcc2e
1 changed files with 2 additions and 2 deletions
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
function eval() {
|
function evalModule() {
|
||||||
local modulePath="$1";
|
local modulePath="$1";
|
||||||
local property="$2";
|
local property="$2";
|
||||||
local nixPkgs='import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05") { config = {}; overlays = []; }';
|
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";
|
nix eval --file "$modulePath" "${@:3}" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property";
|
||||||
}
|
}
|
||||||
|
|
||||||
eval $@;
|
evalModule $@;
|
||||||
|
|
Loading…
Reference in a new issue