Hi,
From patches to patches, it progresses =D
I tried again, and it failed again :
CONFIGURATION_PATH=/etc/nixos/configuration.nix nixFlakes run github:lapp0/nix-gui
warning: ignoring the user-specified setting 'experimental-features', because it is a restricted setting and you are not a trusted user
Traceback (most recent call last):
File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/bin/.nix-gui-wrapped", line 9, in <module>
sys.exit(main())
File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/main.py", line 10, in main
statemodel = state_model.StateModel()
File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/state_model.py", line 26, in __init__
self.current_values = api.get_option_values_map()
File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/utils/copy_decorator.py", line 6, in fn
return copy.copy(wrapped(*args, **kwargs))
File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/options/api.py", line 75, in get_option_values_map
for option, option_data in get_option_data().items()
File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/utils/copy_decorator.py", line 6, in fn
return copy.copy(wrapped(*args, **kwargs))
File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/options/api.py", line 48, in get_option_data
configured_values = {'.'.join(k): v for k, v in parser.get_all_option_values(os.environ['CONFIGURATION_PATH']).items()}
File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/options/parser.py", line 10, in get_all_option_values
for attr_loc, attr_data in nix_eval.get_modules_defined_attrs(module_path).items():
File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/options/nix_eval.py", line 59, in get_modules_defined_attrs
leaves = nix_instantiate_eval(leaves_expr_template.substitute(module_path=module_path), strict=True)
File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/options/nix_eval.py", line 21, in nix_instantiate_eval
res = subprocess.check_output(cmd, stderr=log_pipe)
File "/nix/store/66fbv9mmx1j4hrn9y06kcp73c3yb196r-python3-3.8.9/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/nix/store/66fbv9mmx1j4hrn9y06kcp73c3yb196r-python3-3.8.9/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['nix-instantiate', '--eval', '-E', '\nlet\n config = import /etc/nixos/configuration.nix {config = {}; pkgs = import <nixpkgs> {}; lib = import <nixpkgs/lib>;};\n closure = builtins.tail (builtins.genericClosure {\n startSet = [{ key = builtins.toJSON []; value = {value = config;}; }];\n operator = {key, value}: builtins.filter (x: x != null) (\n if\n builtins.isAttrs value.value\n then\n builtins.map (new_key:\n let\n pos = (builtins.unsafeGetAttrPos new_key value.value);\n in\n if\n builtins.isNull pos || (pos.file != builtins.toString "/etc/nixos/configuration.nix")\n then null\n else {\n key = builtins.toJSON ((builtins.fromJSON key) ++ [new_key]);\n value = {\n value = builtins.getAttr new_key value.value;\n inherit pos;\n };\n }\n ) (builtins.attrNames value.value)\n else []\n );\n });\n leaves = builtins.filter (x: !(builtins.isAttrs x.value.value)) closure;\nin\nbuiltins.map (x: {name = builtins.fromJSON x.key; position = x.value.pos;}) leaves\n ', '--json', '--strict']' returned non-zero exit status 1.
I copied the executed script in the command line and got this error
nix-shell script.nix
error: attempt to call something which is not a function but a set, at /tmp/script.nix:2:12
(use '--show-trace' to show detailed location information)