Option: I would expect that 'nix run .#apps.nixinate.machine' now runs as impure without using the --impure option explicitly :
error:
… in the left operand of the update (//) operator
at /nix/store/7gzgi8zsnh06pv9cphb30yv9h1pyn4nk-source/flake.nix:84:20:
83| )
84| // nixpkgs.lib.genAttrs
| ^
85| (map (a: a + "-dry-run") validMachines)
… while calling the 'listToAttrs' builtin
at /nix/store/f0ddmw6s86y567yg06h5019z72szbzch-source/lib/attrsets.nix:1248:5:
1247| f:
1248| listToAttrs (map (n: nameValuePair n (f n)) names);
| ^
1249|
(stack trace truncated; use '--show-trace' to show the full trace)
error: access to absolute path '/etc/hostname' is forbidden in pure eval mode (use '--impure' to override)
My script tries to read /etc/hostname therefore we ran into problems here.
Option: However if we decide to run 'nix run .#apps.nixinate.machine --impure' we bypass the error.
Option: Just running 'nix run .#apps.nixinate.machine --impure' without settings the nixOption still fails with the pure eval mode error.
So I guess arguments passed to nix run don't really carry over when nixosConfigurations are evaluated/built atleast.
Maybe there is a way to read arguments passed to nix run during evaluation and concat them with the maybe provided nixOptions options?
I have some scripts which require --impure mode to be enabled.
Option: I would expect that 'nix run .#apps.nixinate.machine' now runs as impure without using the --impure option explicitly :
My script tries to read /etc/hostname therefore we ran into problems here.
So I guess arguments passed to nix run don't really carry over when nixosConfigurations are evaluated/built atleast. Maybe there is a way to read arguments passed to nix run during evaluation and concat them with the maybe provided nixOptions options?