Some checks failed
CI / Flake Check (push) Has been cancelled
CI / Evaluate Key Configurations (nix-builder) (push) Has been cancelled
CI / Evaluate Key Configurations (nix-desktop1) (push) Has been cancelled
CI / Evaluate Key Configurations (nix-laptop1) (push) Has been cancelled
CI / Evaluate Artifacts (installer-iso-nix-laptop1) (push) Has been cancelled
CI / Evaluate Artifacts (lxc-nix-builder) (push) Has been cancelled
CI / Build and Publish Documentation (push) Has been cancelled
CI / Format Check (push) Has been cancelled
77 lines
2.0 KiB
Nix
77 lines
2.0 KiB
Nix
# ============================================================================
|
|
# Proxmox LXC Container Configuration
|
|
# ============================================================================
|
|
# Configuration for lightweight Linux containers running in Proxmox.
|
|
# Disables boot/disk management and enables remote development support.
|
|
|
|
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.athenix.hw.nix-lxc;
|
|
in
|
|
{
|
|
options.athenix.hw.nix-lxc = mkOption {
|
|
type = types.submodule {
|
|
options = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "Enable Proxmox LXC container hardware configuration.";
|
|
};
|
|
};
|
|
};
|
|
default = { };
|
|
description = "Proxmox LXC hardware type configuration.";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
# ========== 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.headless.enable = lib.mkDefault true;
|
|
};
|
|
}
|