In /etc/nixos/configuration.nix, I have this code
{ lib, pkgs, config, modulesPath, ... }:
with lib;
let
nixos-wsl = import ./nixos-wsl;
in
{
imports = [
"${modulesPath}/profiles/minimal.nix"
nixos-wsl.nixosModules.wsl
];
I would like to know what "${modulesPath} is.
I have tried in shell.
echo ${modulesPath}
nothing
I have tried to print it in a nix interpreter.
nix repl
${modulesPath}
error: syntax error, unexpected DOLLAR_CURLY modulePath
error: undefined variable 'modulesPath' nothing too.
Does somebody what is that and more generally how to get the value of "nix constant"
update
I missed something important:
I have to import it in nix repl like this.
nix repl
{modulesPath}: modulesPath
«lambda @ (string):1:1»
It say that it is a lamdba. I thought it would give a string value.