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, ... }:
{
  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;
}
Neal Fennimore
Author
Neal Fennimore
Seasoned engineer with 15+ years delivering secure, automated CI/CD pipelines, cloud-native security controls, and compliance-by-design solutions for government and enterprise environments. Proven ability to embed SAST/DAST, SIEM, and Zero-Trust architectures into large-scale platforms while driving cost-effective automation and continuous monitoring. Holds a Master’s in Cybersecurity and multiple industry certifications.