Skip to main content

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, ... }:
{"getty@tty1" = {
    enable = lib.mkForce true;
    wantedBy = [ "" ]; # 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;
Neal Fennimore
Neal Fennimore
Software Engineering and IT Security expert with over 13 years of comprehensive experience in systems development, data analysis, cloud and network security.