Hello,
I’m using ansible to deploy and first configure my containers but I’m having a problem with NixOS :
$ lxc exec gaia50012 -- nixos-rebuild switch
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:13
[...]
$ lxc exec gaia50012 -- bash -c 'nixos-rebuild switch'
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:13
[...]
When I run the command after going to the container, it works:
$ lxc exec gaia50012 -- bash
[root@gaia50012:~]# nixos-rebuild switch
building Nix...
building the system configuration...
[...]
Do you have any ideas?
Thank you for reading and to anyone who can help me.