NixOS Proxmox Lxc
·1 min
Here are some configs to get a LXC container generated through NixOS workable:
Enabling Console Support #
This will allow us to log in via Console in Proxmox to our container:
{ config, lib, ... }:
{
systemd.services."getty@tty1" = {
enable = lib.mkForce true;
wantedBy = [ "getty.target" ]; # to start at boot
serviceConfig.Restart = "always"; # restart when session is closed
};
console.enable = true;
}
Sbin/Init #
Ensure that /sbin/init
exists, otherwise you’ll have the container fail to load later on.
{
boot.loader.initScript.enable = true;
}