refactor: create glue/ and variants/ directories
- Add glue/ for fleet generation logic and common configuration - Add variants/ for hardware type modules - Improves separation of concerns and module organization
This commit is contained in:
61
variants/nix-lxc.nix
Normal file
61
variants/nix-lxc.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
# ============================================================================
|
||||
# Proxmox LXC Container Configuration
|
||||
# ============================================================================
|
||||
# Configuration for lightweight Linux containers running in Proxmox.
|
||||
# Disables boot/disk management and enables remote development support.
|
||||
|
||||
{ inputs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.vscode-server.nixosModules.default
|
||||
"${modulesPath}/virtualisation/proxmox-lxc.nix"
|
||||
];
|
||||
|
||||
# ========== Nix Configuration ==========
|
||||
nix.settings.trusted-users = [
|
||||
"root"
|
||||
"engr-ugaif"
|
||||
];
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# ========== Container-Specific Configuration ==========
|
||||
boot.isContainer = true;
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false; # No bootloader in container
|
||||
disko.enableConfig = lib.mkForce false; # No disk management in container
|
||||
console.enable = true;
|
||||
|
||||
# Allow getty to work in containers
|
||||
systemd.services."getty@".unitConfig.ConditionPathExists = [
|
||||
""
|
||||
"/dev/%I"
|
||||
];
|
||||
|
||||
# Suppress unnecessary systemd units for containers
|
||||
systemd.suppressedSystemUnits = [
|
||||
"dev-mqueue.mount"
|
||||
"sys-kernel-debug.mount"
|
||||
"sys-fs-fuse-connections.mount"
|
||||
];
|
||||
|
||||
# ========== Remote Development ==========
|
||||
services.vscode-server.enable = true;
|
||||
|
||||
# ========== System Configuration ==========
|
||||
system.stateVersion = "25.11";
|
||||
athenix.host.buildMethods = lib.mkDefault [
|
||||
"lxc" # LXC container tarball
|
||||
"proxmox" # Proxmox VMA archive
|
||||
];
|
||||
|
||||
athenix.sw.enable = lib.mkDefault true;
|
||||
athenix.sw.type = lib.mkDefault "headless";
|
||||
}
|
||||
Reference in New Issue
Block a user