This commit is contained in:
Peritia 2025-09-10 12:17:16 +02:00
parent fc0abdd4bb
commit aca73cdd0f
73 changed files with 3873 additions and 381 deletions

View file

@ -0,0 +1,53 @@
# Podman (System Module)
#
# Provides:
# - Podman runtime and CLI
# - Podman Compose
# - User access via `podman` group
#
# Options:
# - enable → Enable Podman system module
# - username → User to add to the podman group
#
# Notes:
# - Adds podman + podman-compose to system packages
# - Enables D-Bus socket activation for Podman
#
{ config, lib, pkgs, ... }:
let
cfg = config.nyx-module.system.podman;
in
{
options.nyx-module.system.podman = {
enable = lib.mkEnableOption "Enable Podman (system module)";
username = lib.mkOption {
type = lib.types.str;
example = "alice";
description = "User to add to the podman group.";
};
};
config = lib.mkIf cfg.enable {
virtualisation.podman.enable = true;
users.users.${cfg.username}.extraGroups = [ "podman" ];
environment.systemPackages = with pkgs; [
podman
podman-compose
];
# Optional: enable Podman socket activation
services.dbus.packages = [ pkgs.podman ];
assertions = [
{
assertion = cfg.username != "";
message = "nyx-module.system.podman.username must be set to a valid user.";
}
];
};
}