pinpox / lollypops

Lollypop Operations - NixOS Deployment Tool
https://pinpox.github.io/lollypops/
GNU General Public License v3.0
118 stars 17 forks source link

local-evaluation is broken #22

Closed pf56 closed 1 year ago

pf56 commented 1 year ago

Trying to deploy a configuration with lollypops.deployment.local-evaluation = true gives me an error:

[...]
[ns02:rebuild] error:
[ns02:rebuild]        … while evaluating the attribute 'config.system.build.toplevel'
[ns02:rebuild]
[ns02:rebuild]          at /etc/nix/inputs/nixpkgs/lib/modules.nix:321:9:
[ns02:rebuild]
[ns02:rebuild]           320|         options = checked options;
[ns02:rebuild]           321|         config = checked (removeAttrs config [ "_module" ]);
[ns02:rebuild]              |         ^
[ns02:rebuild]           322|         _module = checked (config._module);
[ns02:rebuild]
[ns02:rebuild]        … while calling the 'seq' builtin
[ns02:rebuild]
[ns02:rebuild]          at /etc/nix/inputs/nixpkgs/lib/modules.nix:321:18:
[ns02:rebuild]
[ns02:rebuild]           320|         options = checked options;
[ns02:rebuild]           321|         config = checked (removeAttrs config [ "_module" ]);
[ns02:rebuild]              |                  ^
[ns02:rebuild]           322|         _module = checked (config._module);
[ns02:rebuild]
[ns02:rebuild]        (stack trace truncated; use '--show-trace' to show the full trace)
[ns02:rebuild]
[ns02:rebuild]        error: file 'nixos-config' was not found in the Nix search path (add it using $NIX_PATH or -I)
[ns02:rebuild]
[ns02:rebuild]        at «none»:0: (source not available)

nixos-rebuild is called as nixos-rebuild {{.REBUILD_ACTION}} --flake '{{.LOCAL_CONFIG_DIR}}#{{.HOSTNAME}}', but LOCAL_CONFIG_DIR doesn't seem to be defined anywhere.

I'm not sure how this is supposed to work, but swapping LOCAL_CONFIG_DIR for LOCAL_FLAKE_SOURCE fixes (see https://github.com/pinpox/lollypops/commit/5ab2c4dd456b6dd9b3c89e55965d58e11e069127) it.

pinpox commented 1 year ago

I seem to have forgotten to rename that var, thanks for reporting!