Proxmox Linux Container: Difference between revisions

Nani8ot (talk | contribs)
Add instruction to execute /run/current-system/activate to properly load the current system environment. This makes nixos-rebuild and other commands available.
Nani8ot (talk | contribs)
Add note to only run /run/current-system/activate when no commands can be found, e.g. ls.
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:


With a small amount of work, it is possible to use NixOS as a LXC container under Proxmox.
With a small amount of work, it is possible to use NixOS as a LXC container under Proxmox.
== Generate a container tarball ==
A better way to deploy a NixOS container tarball on Proxmox is described at [[Proxmox Virtual Environment#LXC]].


== Finding a container tarball ==
== Finding a container tarball ==
Line 74: Line 77:
: set (missing) environment variables with <code>[[wikipedia:en:dot (command)#source|.]]</code>
: set (missing) environment variables with <code>[[wikipedia:en:dot (command)#source|.]]</code>
:: <syntaxhighlight lang="shell">sh-5.2# . /etc/profile</syntaxhighlight>
:: <syntaxhighlight lang="shell">sh-5.2# . /etc/profile</syntaxhighlight>
:: <syntaxhighlight lang="bash">[root@nixos:~]#</syntaxhighlight><syntaxhighlight lang="shell">
:: <syntaxhighlight lang="bash">[root@nixos:~]#</syntaxhighlight>
If commands (like ls) still can't be found, try running:
:: <syntaxhighlight lang="shell">
[root@nixos:~] /run/current-system/activate
[root@nixos:~] /run/current-system/activate
</syntaxhighlight>
</syntaxhighlight>