Why this doesn’t work? What gives? #nix #nixos

Reply to this note

Please Login to reply.

Discussion

weird... reproduced.

code is:

v.mkString(state.settings.restrictEval || state.settings.pureEval ? "" : getEnv(name).value_or(""));

It looks like HOSTNAME is something Bash provides but not a standard environment variable. ZSH and Fish doesn’t have it.

ohhh

Ugly hack it is.

let

hostname = builtins.readFile ./whereami;

hostConfigPath = ./${hostname};

hostConfig = if builtins.pathExists hostConfigPath

then import hostConfigPath

else {};

in