New module for standard LXC containers

This commit is contained in:
pazpi 2025-01-08 14:32:49 +01:00
parent 3336068ab9
commit ab86d3e6a2
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,29 @@
{ config, lib, ... }:
let
cfg = config.my.utils.lxc-standard;
in
{
options.my.utils.lxc-standard = {
enable = lib.mkEnableOption "Enable if the host is a service LXC container";
};
config = lib.mkIf cfg.enable {
# Enable SSH
services = {
openssh.enable = true;
};
# Monitor node with node_exporter
services.prometheus.exporters = {
node = {
enable = true;
openFirewall = true;
enabledCollectors = [ "systemd" ];
};
};
networking.nameservers = [ "192.168.1.2" ];
};
}