From 52a5ad90e259b85057bf04bd020563aef40ca3d9 Mon Sep 17 00:00:00 2001 From: Jake Ginesin Date: Sun, 12 Apr 2026 16:56:13 -0400 Subject: [PATCH] lxc patch 11 --- system/lxc.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/system/lxc.nix b/system/lxc.nix index 1a5127f..2546276 100644 --- a/system/lxc.nix +++ b/system/lxc.nix @@ -15,6 +15,22 @@ networking.networkmanager.unmanaged = [ "br0" ]; + virtualisation.lxc.systemConfig = '' + lxc.start.auto = 1 + ''; + + systemd.services.lxc-autostart = { + description = "LXC autostart containers"; + after = [ "network.target" "lxc.service" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStart = "${pkgs.lxc}/bin/lxc-autostart"; + ExecStop = "${pkgs.lxc}/bin/lxc-autostart -s"; + }; + }; + virtualisation.lxc.defaultConfig = '' lxc.net.0.type = veth lxc.net.0.link = br0