forked from fediversity/fediversity
30 lines
529 B
Nix
30 lines
529 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
inputs ? null,
|
|
...
|
|
}:
|
|
{
|
|
evalModel =
|
|
module:
|
|
(lib.evalModules {
|
|
specialArgs = {
|
|
inherit pkgs inputs;
|
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
|
};
|
|
modules = [
|
|
./data-model.nix
|
|
module
|
|
];
|
|
}).config;
|
|
toBash =
|
|
v:
|
|
lib.replaceStrings [ "\"" ] [ "\\\"" ] (
|
|
if lib.isPath v || builtins.isNull v then
|
|
toString v
|
|
else if lib.isString v then
|
|
v
|
|
else
|
|
lib.strings.toJSON v
|
|
);
|
|
}
|